[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

zmo at google.com zmo at google.com
Sun Feb 20 23:45:15 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 092f84002677d137a701e898133b4bb0a480a0ba
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 24 22:42:12 2011 +0000

    2011-01-24  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Darin Adler.
    
            Remove sizeInBytes from GraphicsContext3D's various implementations
            https://bugs.webkit.org/show_bug.cgi?id=52339
    
            * src/GraphicsContext3DChromium.cpp:
            * src/GraphicsContext3DInternal.h:
    2011-01-24  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Darin Adler.
    
            Remove sizeInBytes from GraphicsContext3D's various implementations
            https://bugs.webkit.org/show_bug.cgi?id=52339
    
            * html/canvas/WebGLRenderingContext.cpp:
            (WebCore::WebGLRenderingContext::sizeInBytes):
            * platform/graphics/GraphicsContext3D.h:
            * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
            * platform/graphics/qt/GraphicsContext3DQt.cpp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76549 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 2ab6e7c..77a69a8 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-24  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Darin Adler.
+
+        Remove sizeInBytes from GraphicsContext3D's various implementations
+        https://bugs.webkit.org/show_bug.cgi?id=52339
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::sizeInBytes):
+        * platform/graphics/GraphicsContext3D.h:
+        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
+        * platform/graphics/qt/GraphicsContext3DQt.cpp:
+
 2011-01-24  Adam Roben  <aroben at apple.com>
 
         Windows Production build fix
diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
index a3b9699..1894485 100644
--- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -487,7 +487,24 @@ void WebGLRenderingContext::reshape(int width, int height)
 
 unsigned int WebGLRenderingContext::sizeInBytes(GC3Denum type)
 {
-    return m_context->sizeInBytes(type);
+    switch (type) {
+    case GraphicsContext3D::BYTE:
+        return sizeof(GC3Dbyte);
+    case GraphicsContext3D::UNSIGNED_BYTE:
+        return sizeof(GC3Dubyte);
+    case GraphicsContext3D::SHORT:
+        return sizeof(GC3Dshort);
+    case GraphicsContext3D::UNSIGNED_SHORT:
+        return sizeof(GC3Dushort);
+    case GraphicsContext3D::INT:
+        return sizeof(GC3Dint);
+    case GraphicsContext3D::UNSIGNED_INT:
+        return sizeof(GC3Duint);
+    case GraphicsContext3D::FLOAT:
+        return sizeof(GC3Dfloat);
+    }
+    ASSERT_NOT_REACHED();
+    return 0;
 }
 
 void WebGLRenderingContext::activeTexture(GC3Denum texture, ExceptionCode& ec)
diff --git a/Source/WebCore/platform/graphics/GraphicsContext3D.h b/Source/WebCore/platform/graphics/GraphicsContext3D.h
index 24827e5..47b953e 100644
--- a/Source/WebCore/platform/graphics/GraphicsContext3D.h
+++ b/Source/WebCore/platform/graphics/GraphicsContext3D.h
@@ -47,7 +47,9 @@
 typedef unsigned int GC3Denum;
 typedef unsigned char GC3Dboolean;
 typedef unsigned int GC3Dbitfield;
+typedef signed char GC3Dbyte;
 typedef unsigned char GC3Dubyte;
+typedef short GC3Dshort;
 typedef unsigned short GC3Dushort;
 typedef int GC3Dint;
 typedef int GC3Dsizei;
@@ -487,10 +489,6 @@ public:
     void prepareTexture();
 #endif
 
-    // Helper to return the size in bytes of OpenGL data types
-    // like GL_FLOAT, GL_INT, etc.
-    unsigned int sizeInBytes(GC3Denum type);
-
     // Helper to texImage2D with pixel==0 case: pixels are initialized to 0.
     // Return true if no GL error is synthesized.
     // By default, alignment is 4, the OpenGL default setting.
diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
index 7c103f3..7cef26d 100644
--- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
@@ -1437,28 +1437,6 @@ void GraphicsContext3D::deleteTexture(Platform3DObject texture)
     glDeleteTextures(1, &texture);
 }
 
-uint32_t GraphicsContext3D::sizeInBytes(GC3Denum type)
-{
-    switch (type) {
-        case GL_BYTE:
-            return sizeof(GLbyte);
-        case GL_UNSIGNED_BYTE:
-            return sizeof(GLubyte);
-        case GL_SHORT:
-            return sizeof(GLshort);
-        case GL_UNSIGNED_SHORT:
-            return sizeof(GLushort);
-        case GL_INT:
-            return sizeof(GLint);
-        case GL_UNSIGNED_INT:
-            return sizeof(GLuint);
-        case GL_FLOAT:
-            return sizeof(GLfloat);
-        default:
-            return 0;
-    }
-}
-
 void GraphicsContext3D::synthesizeGLError(GC3Denum error)
 {
     m_syntheticErrors.add(error);
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
index 295212c..63a8d40 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
@@ -1611,28 +1611,6 @@ void GraphicsContext3D::deleteTexture(Platform3DObject texture)
     glDeleteTextures(1, &texture);
 }
 
-unsigned int GraphicsContext3D::sizeInBytes(GC3Denum type)
-{
-    switch (type) {
-    case GraphicsContext3D::BYTE:
-        return sizeof(GLbyte);
-    case GraphicsContext3D::UNSIGNED_BYTE:
-        return sizeof(GLubyte);
-    case GraphicsContext3D::SHORT:
-        return sizeof(GLshort);
-    case GraphicsContext3D::UNSIGNED_SHORT:
-        return sizeof(GLushort);
-    case GraphicsContext3D::INT:
-        return sizeof(GLint);
-    case GraphicsContext3D::UNSIGNED_INT:
-        return sizeof(GLuint);
-    case GraphicsContext3D::FLOAT:
-        return sizeof(GLfloat);
-    default:
-        return 0;
-    }
-}
-
 void GraphicsContext3D::synthesizeGLError(GC3Denum error)
 {
     m_internal->m_syntheticErrors.add(error);
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 6fc13fc..d5fd184 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-24  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Darin Adler.
+
+        Remove sizeInBytes from GraphicsContext3D's various implementations
+        https://bugs.webkit.org/show_bug.cgi?id=52339
+
+        * src/GraphicsContext3DChromium.cpp:
+        * src/GraphicsContext3DInternal.h:
+
 2011-01-24  Tony Chang  <tony at chromium.org>
 
         Reviewed by James Robinson.
diff --git a/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index 8148ff6..75b40c5 100644
--- a/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -365,7 +365,6 @@ rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7
 }
 
 DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
-DELEGATE_TO_IMPL_1R(sizeInBytes, GC3Denum, unsigned int)
 
 bool GraphicsContext3DInternal::isGLES2Compliant() const
 {
@@ -897,7 +896,6 @@ PlatformLayer* GraphicsContext3D::platformLayer() const
 #endif
 
 DELEGATE_TO_INTERNAL(makeContextCurrent)
-DELEGATE_TO_INTERNAL_1R(sizeInBytes, GC3Denum, unsigned int)
 DELEGATE_TO_INTERNAL_2(reshape, int, int)
 DELEGATE_TO_INTERNAL_R(getInternalFramebufferSize, IntSize)
 
diff --git a/Source/WebKit/chromium/src/GraphicsContext3DInternal.h b/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
index 30a8e57..18e3089 100644
--- a/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
+++ b/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
@@ -62,8 +62,6 @@ public:
 
     bool makeContextCurrent();
 
-    unsigned int sizeInBytes(GC3Denum type);
-
     void reshape(int width, int height);
     IntSize getInternalFramebufferSize();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list