[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zmo at google.com zmo at google.com
Wed Dec 22 12:51:15 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit af9e1bd804813e93c950e0aa332786721ab2ec7f
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 31 18:01:06 2010 +0000

    2010-08-30  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Kenneth Russell.
    
            [Chromium] bindTexture(TEXTURE_CUBE_MAP) shouldn't generate errors with valid cubemap texture
            https://bugs.webkit.org/show_bug.cgi?id=44922
    
            * html/canvas/WebGLRenderingContext.cpp: Remove TEXTURE_WRAP_R code.
            (WebCore::WebGLRenderingContext::bindTexture):
            * html/canvas/WebGLTexture.cpp: Remove the code for tracking TEXTURE_WRAP_R.
            (WebCore::WebGLTexture::WebGLTexture):
            * html/canvas/WebGLTexture.h: Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3f11764..ad066db 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-30  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        [Chromium] bindTexture(TEXTURE_CUBE_MAP) shouldn't generate errors with valid cubemap texture
+        https://bugs.webkit.org/show_bug.cgi?id=44922
+
+        * html/canvas/WebGLRenderingContext.cpp: Remove TEXTURE_WRAP_R code.
+        (WebCore::WebGLRenderingContext::bindTexture):
+        * html/canvas/WebGLTexture.cpp: Remove the code for tracking TEXTURE_WRAP_R.
+        (WebCore::WebGLTexture::WebGLTexture):
+        * html/canvas/WebGLTexture.h: Ditto.
+
 2010-08-31  Jian Li  <jianli at chromium.org>
 
         Rubber-stamped by David Levin.
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 9591a53..2a1464a 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -311,23 +311,14 @@ void WebGLRenderingContext::bindTexture(unsigned long target, WebGLTexture* text
     if (texture)
         texture->setTarget(target, maxLevel);
 
-    // FIXME: do we want to do this on all platforms?
-#if PLATFORM(CHROMIUM)
-    // FIXME: GL_TEXTURE_WRAP_R isn't exposed in the OpenGL ES 2.0
-    // API. On desktop OpenGL implementations it seems necessary to
-    // set this wrap mode to GL_CLAMP_TO_EDGE to get correct behavior
-    // of cube maps.
-    if (texture) {
-        if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) {
-            if (!texture->isCubeMapRWrapModeInitialized()) {
-                static const int textureWrapR = 0x8072;
-                texParameteri(GraphicsContext3D::TEXTURE_CUBE_MAP, textureWrapR, GraphicsContext3D::CLAMP_TO_EDGE);
-                texture->setCubeMapRWrapModeInitialized(true);
-            }
-        } else
-            texture->setCubeMapRWrapModeInitialized(false);
-    }
-#endif
+    // Note: previously we used to automatically set the TEXTURE_WRAP_R
+    // repeat mode to CLAMP_TO_EDGE for cube map textures, because OpenGL
+    // ES 2.0 doesn't expose this flag (a bug in the specification) and
+    // otherwise the application has no control over the seams in this
+    // dimension. However, it appears that supporting this properly on all
+    // platforms is fairly involved (will require a HashMap from texture ID
+    // in all ports), and we have not had any complaints, so the logic has
+    // been removed.
 
     cleanupAfterGraphicsCall(false);
 }
diff --git a/WebCore/html/canvas/WebGLTexture.cpp b/WebCore/html/canvas/WebGLTexture.cpp
index 7b2869f..7fc84ad 100644
--- a/WebCore/html/canvas/WebGLTexture.cpp
+++ b/WebCore/html/canvas/WebGLTexture.cpp
@@ -40,7 +40,6 @@ PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContext* ctx)
 
 WebGLTexture::WebGLTexture(WebGLRenderingContext* ctx)
     : WebGLObject(ctx)
-    , cubeMapRWrapModeInitialized(false)
     , m_target(0)
     , m_minFilter(GraphicsContext3D::NEAREST_MIPMAP_LINEAR)
     , m_magFilter(GraphicsContext3D::LINEAR)
diff --git a/WebCore/html/canvas/WebGLTexture.h b/WebCore/html/canvas/WebGLTexture.h
index a1ce348..191957d 100644
--- a/WebCore/html/canvas/WebGLTexture.h
+++ b/WebCore/html/canvas/WebGLTexture.h
@@ -40,16 +40,6 @@ public:
 
     static PassRefPtr<WebGLTexture> create(WebGLRenderingContext*);
 
-    bool isCubeMapRWrapModeInitialized()
-    {
-        return cubeMapRWrapModeInitialized;
-    }
-
-    void setCubeMapRWrapModeInitialized(bool initialized)
-    {
-        cubeMapRWrapModeInitialized = initialized;
-    }
-
     void setTarget(unsigned long target, int maxLevel);
     void setParameteri(unsigned long pname, int param);
     void setParameterf(unsigned long pname, float param);
@@ -83,8 +73,6 @@ private:
 
     int mapTargetToIndex(unsigned long);
 
-    bool cubeMapRWrapModeInitialized;
-
     unsigned long m_target;
 
     int m_minFilter;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list