Title: [193893] trunk/Source/WebCore
Revision
193893
Author
zandober...@gmail.com
Date
2015-12-10 00:28:19 -0800 (Thu, 10 Dec 2015)

Log Message

[TexMap] Remove the TEXMAP_OPENGL_ES_2 define
https://bugs.webkit.org/show_bug.cgi?id=152069

Reviewed by Alex Christensen.

Remove the TEXMAP_OPENGL_ES_2 macro define and clean up the code
that it was (not) guarding.

* platform/graphics/texmap/BitmapTexture.h:
* platform/graphics/texmap/BitmapTextureGL.cpp: Remove the TEXMAP_OPENGL_ES_2
guard. Keep the GL_UNSIGNED_INT_8_8_8_8_REV define for OS(DARWIN), but use
the GraphicsContext3D constants for other values.
(WebCore::BitmapTextureGL::updateContentsNoSwizzle):
(WebCore::BitmapTextureGL::initializeStencil): Remove the TEXMAP_OPENGL_ES_2
guard and default to calling the renderbufferStorage() function with the
GraphicsContext3D::STENCIL_INDEX8 argument.
* platform/graphics/texmap/BitmapTexturePool.h:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp: Remove both the TEXMAP_OPENGL_ES_2
guard and the code it guarded. Because we were defining TEXMAP_OPENGL_ES_2 and not
USE_TEXMAP_OPENGL_ES_2, the guarded defines were always enforced, but they're never
actually used in this file anyway.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (193892 => 193893)


--- trunk/Source/WebCore/ChangeLog	2015-12-10 07:09:34 UTC (rev 193892)
+++ trunk/Source/WebCore/ChangeLog	2015-12-10 08:28:19 UTC (rev 193893)
@@ -1,3 +1,28 @@
+2015-12-10  Zan Dobersek  <zdober...@igalia.com>
+
+        [TexMap] Remove the TEXMAP_OPENGL_ES_2 define
+        https://bugs.webkit.org/show_bug.cgi?id=152069
+
+        Reviewed by Alex Christensen.
+
+        Remove the TEXMAP_OPENGL_ES_2 macro define and clean up the code
+        that it was (not) guarding.
+
+        * platform/graphics/texmap/BitmapTexture.h:
+        * platform/graphics/texmap/BitmapTextureGL.cpp: Remove the TEXMAP_OPENGL_ES_2
+        guard. Keep the GL_UNSIGNED_INT_8_8_8_8_REV define for OS(DARWIN), but use
+        the GraphicsContext3D constants for other values.
+        (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
+        (WebCore::BitmapTextureGL::initializeStencil): Remove the TEXMAP_OPENGL_ES_2
+        guard and default to calling the renderbufferStorage() function with the
+        GraphicsContext3D::STENCIL_INDEX8 argument.
+        * platform/graphics/texmap/BitmapTexturePool.h:
+        * platform/graphics/texmap/TextureMapper.h:
+        * platform/graphics/texmap/TextureMapperGL.cpp: Remove both the TEXMAP_OPENGL_ES_2
+        guard and the code it guarded. Because we were defining TEXMAP_OPENGL_ES_2 and not
+        USE_TEXMAP_OPENGL_ES_2, the guarded defines were always enforced, but they're never
+        actually used in this file anyway.
+
 2015-12-09  Brady Eidson  <beid...@apple.com>
 
         Modern IDB: storage/indexeddb/objectstore-basics.html fails.

Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h (193892 => 193893)


--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h	2015-12-10 07:09:34 UTC (rev 193892)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h	2015-12-10 08:28:19 UTC (rev 193893)
@@ -27,10 +27,6 @@
 #ifndef BitmapTexture_h
 #define BitmapTexture_h
 
-#if USE(OPENGL_ES_2)
-#define TEXMAP_OPENGL_ES_2
-#endif
-
 #include "IntPoint.h"
 #include "IntRect.h"
 #include "IntSize.h"

Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp (193892 => 193893)


--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp	2015-12-10 07:09:34 UTC (rev 193892)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp	2015-12-10 08:28:19 UTC (rev 193893)
@@ -44,12 +44,8 @@
 #include <wtf/text/CString.h>
 #endif
 
-#if !USE(TEXMAP_OPENGL_ES_2)
-// FIXME: Move to Extensions3D.h.
+#if OS(DARWIN)
 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
 #endif
 
 namespace WebCore {
@@ -132,18 +128,18 @@
     // For ES drivers that don't support sub-images.
     if (driverSupportsSubImage(m_context3D.get())) {
         // Use the OpenGL sub-image extension, now that we know it's available.
-        m_context3D->pixelStorei(GL_UNPACK_ROW_LENGTH, bytesPerLine / bytesPerPixel);
-        m_context3D->pixelStorei(GL_UNPACK_SKIP_ROWS, sourceOffset.y());
-        m_context3D->pixelStorei(GL_UNPACK_SKIP_PIXELS, sourceOffset.x());
+        m_context3D->pixelStorei(GraphicsContext3D::UNPACK_ROW_LENGTH, bytesPerLine / bytesPerPixel);
+        m_context3D->pixelStorei(GraphicsContext3D::UNPACK_SKIP_ROWS, sourceOffset.y());
+        m_context3D->pixelStorei(GraphicsContext3D::UNPACK_SKIP_PIXELS, sourceOffset.x());
     }
 
     m_context3D->texSubImage2D(GraphicsContext3D::TEXTURE_2D, 0, targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(), glFormat, m_type, srcData);
 
     // For ES drivers that don't support sub-images.
     if (driverSupportsSubImage(m_context3D.get())) {
-        m_context3D->pixelStorei(GL_UNPACK_ROW_LENGTH, 0);
-        m_context3D->pixelStorei(GL_UNPACK_SKIP_ROWS, 0);
-        m_context3D->pixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+        m_context3D->pixelStorei(GraphicsContext3D::UNPACK_ROW_LENGTH, 0);
+        m_context3D->pixelStorei(GraphicsContext3D::UNPACK_SKIP_ROWS, 0);
+        m_context3D->pixelStorei(GraphicsContext3D::UNPACK_SKIP_PIXELS, 0);
     }
 }
 
@@ -276,11 +272,7 @@
 
     m_rbo = m_context3D->createRenderbuffer();
     m_context3D->bindRenderbuffer(GraphicsContext3D::RENDERBUFFER, m_rbo);
-#ifdef TEXMAP_OPENGL_ES_2
     m_context3D->renderbufferStorage(GraphicsContext3D::RENDERBUFFER, GraphicsContext3D::STENCIL_INDEX8, m_textureSize.width(), m_textureSize.height());
-#else
-    m_context3D->renderbufferStorage(GraphicsContext3D::RENDERBUFFER, GraphicsContext3D::DEPTH_STENCIL, m_textureSize.width(), m_textureSize.height());
-#endif
     m_context3D->bindRenderbuffer(GraphicsContext3D::RENDERBUFFER, 0);
     m_context3D->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, m_rbo);
     m_context3D->clearStencil(0);

Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h (193892 => 193893)


--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h	2015-12-10 07:09:34 UTC (rev 193892)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h	2015-12-10 08:28:19 UTC (rev 193893)
@@ -27,10 +27,6 @@
 #ifndef BitmapTexturePool_h
 #define BitmapTexturePool_h
 
-#if USE(OPENGL_ES_2)
-#define TEXMAP_OPENGL_ES_2
-#endif
-
 #include "BitmapTexture.h"
 #include "IntRect.h"
 #include "IntSize.h"

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h (193892 => 193893)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2015-12-10 07:09:34 UTC (rev 193892)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2015-12-10 08:28:19 UTC (rev 193893)
@@ -22,10 +22,6 @@
 
 #if USE(TEXTURE_MAPPER)
 
-#if USE(OPENGL_ES_2)
-#define TEXMAP_OPENGL_ES_2
-#endif
-
 #include "BitmapTexture.h"
 #include "GraphicsContext.h"
 #include "IntRect.h"

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (193892 => 193893)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2015-12-10 07:09:34 UTC (rev 193892)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2015-12-10 08:28:19 UTC (rev 193893)
@@ -46,14 +46,6 @@
 #include <wtf/text/CString.h>
 #endif
 
-#if !USE(TEXMAP_OPENGL_ES_2)
-// FIXME: Move to Extensions3D.h.
-#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#endif
-
 namespace WebCore {
 struct TextureMapperGLData {
     WTF_MAKE_FAST_ALLOCATED;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to