Modified: trunk/Source/WebCore/ChangeLog (144358 => 144359)
--- trunk/Source/WebCore/ChangeLog 2013-02-28 21:35:15 UTC (rev 144358)
+++ trunk/Source/WebCore/ChangeLog 2013-02-28 21:37:47 UTC (rev 144359)
@@ -1,3 +1,18 @@
+2013-02-28 Bruno de Oliveira Abinader <[email protected]>
+
+ [texmap] Remove redundant defines on TextureMapperGL
+ https://bugs.webkit.org/show_bug.cgi?id=111090
+
+ Reviewed by Antonio Gomes.
+
+ driverSupportsSubImage() already uses OpenGL ES defines to return
+ correct support, thus no need for these additional defines.
+
+ No behavior changes, thus covered by existing tests.
+
+ * platform/graphics/texmap/TextureMapperGL.cpp:
+ (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
+
2013-02-26 Zhenyao Mo <[email protected]>
EXT_draw_buffers needs implementation
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (144358 => 144359)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2013-02-28 21:35:15 UTC (rev 144358)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2013-02-28 21:37:47 UTC (rev 144359)
@@ -639,22 +639,18 @@
void BitmapTextureGL::updateContentsNoSwizzle(const void* srcData, const IntRect& targetRect, const IntPoint& sourceOffset, int bytesPerLine, unsigned bytesPerPixel, Platform3DObject glFormat)
{
m_context3D->bindTexture(GraphicsContext3D::TEXTURE_2D, m_id);
-#if !defined(TEXMAP_OPENGL_ES_2)
if (driverSupportsSubImage()) { // For ES drivers that don't support sub-images.
// 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());
}
-#endif
m_context3D->texSubImage2D(GraphicsContext3D::TEXTURE_2D, 0, targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(), glFormat, DEFAULT_TEXTURE_PIXEL_TRANSFER_TYPE, srcData);
-#if !defined(TEXMAP_OPENGL_ES_2)
if (driverSupportsSubImage()) { // For ES drivers that don't support sub-images.
m_context3D->pixelStorei(GL_UNPACK_ROW_LENGTH, 0);
m_context3D->pixelStorei(GL_UNPACK_SKIP_ROWS, 0);
m_context3D->pixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
}
-#endif
}
void BitmapTextureGL::updateContents(const void* srcData, const IntRect& targetRect, const IntPoint& sourceOffset, int bytesPerLine, UpdateContentsFlag updateContentsFlag)