Title: [197674] releases/WebKitGTK/webkit-2.12/Source/WebCore
Revision
197674
Author
[email protected]
Date
2016-03-07 03:30:57 -0800 (Mon, 07 Mar 2016)

Log Message

Merge r197386 - ImageBufferCairo should support OpenGL ES 2 configurations
https://bugs.webkit.org/show_bug.cgi?id=154790

Reviewed by Carlos Garcia Campos.

When building with OpenGL ES 2 and with accelerated 2D canvas support,
the GLES2 header should be included instead of the OpenGLShims.h header.

The glTexParameterf() calls targeting GL_TEXTURE_WRAP_S and
GL_TEXTURE_WRAP_T parameters should use the GL_CLAMP_TO_EDGE value.
GL_CLAMP isn't available in OpenGL ES 2 and was dropped in OpenGL 3.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::createCairoGLSurface):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (197673 => 197674)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-03-07 11:30:07 UTC (rev 197673)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-03-07 11:30:57 UTC (rev 197674)
@@ -1,5 +1,22 @@
 2016-02-29  Zan Dobersek  <[email protected]>
 
+        ImageBufferCairo should support OpenGL ES 2 configurations
+        https://bugs.webkit.org/show_bug.cgi?id=154790
+
+        Reviewed by Carlos Garcia Campos.
+
+        When building with OpenGL ES 2 and with accelerated 2D canvas support,
+        the GLES2 header should be included instead of the OpenGLShims.h header.
+
+        The glTexParameterf() calls targeting GL_TEXTURE_WRAP_S and
+        GL_TEXTURE_WRAP_T parameters should use the GL_CLAMP_TO_EDGE value.
+        GL_CLAMP isn't available in OpenGL ES 2 and was dropped in OpenGL 3.
+
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        (WebCore::ImageBufferData::createCairoGLSurface):
+
+2016-02-29  Zan Dobersek  <[email protected]>
+
         TextureMapperGL: beginPainting() should handle the PaintingMirrored value in PaintFlags
         https://bugs.webkit.org/show_bug.cgi?id=154789
 

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (197673 => 197674)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2016-03-07 11:30:07 UTC (rev 197673)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2016-03-07 11:30:57 UTC (rev 197674)
@@ -49,9 +49,15 @@
 
 #if ENABLE(ACCELERATED_2D_CANVAS)
 #include "GLContext.h"
-#include "OpenGLShims.h"
 #include "TextureMapperGL.h"
 #include <cairo-gl.h>
+
+#if USE(OPENGL_ES_2)
+#include <GLES2/gl2.h>
+#else
+#include "OpenGLShims.h"
+#endif
+
 #if USE(COORDINATED_GRAPHICS_THREADED)
 #include "TextureMapperPlatformLayerBuffer.h"
 #include "TextureMapperPlatformLayerProxy.h"
@@ -136,8 +142,8 @@
     // from a pre-existing surface.
     glGenTextures(1, &m_texture);
     glBindTexture(GL_TEXTURE_2D, m_texture);
-    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
-    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to