Title: [139182] trunk/Source/WebCore
- Revision
- 139182
- Author
- [email protected]
- Date
- 2013-01-09 03:25:12 -0800 (Wed, 09 Jan 2013)
Log Message
[Qt][Mac] GraphicsSurface does not need glEnable/glDisable for texture targets.
https://bugs.webkit.org/show_bug.cgi?id=106310
glEnable/glDisable for texture targets is only necessary
when using the fixed function pipeline.
Enabling or disabling the target might cause unexpected
behavior to texture bindings and is therefore considered harmful.
Reviewed by Noam Rosenthal.
* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::createTexture):
(WebCore::GraphicsSurfacePrivate::copyFromTexture):
(WebCore::GraphicsSurface::platformCopyToGLTexture):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (139181 => 139182)
--- trunk/Source/WebCore/ChangeLog 2013-01-09 11:23:14 UTC (rev 139181)
+++ trunk/Source/WebCore/ChangeLog 2013-01-09 11:25:12 UTC (rev 139182)
@@ -1,3 +1,20 @@
+2013-01-09 Zeno Albisser <[email protected]>
+
+ [Qt][Mac] GraphicsSurface does not need glEnable/glDisable for texture targets.
+ https://bugs.webkit.org/show_bug.cgi?id=106310
+
+ glEnable/glDisable for texture targets is only necessary
+ when using the fixed function pipeline.
+ Enabling or disabling the target might cause unexpected
+ behavior to texture bindings and is therefore considered harmful.
+
+ Reviewed by Noam Rosenthal.
+
+ * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
+ (WebCore::createTexture):
+ (WebCore::GraphicsSurfacePrivate::copyFromTexture):
+ (WebCore::GraphicsSurface::platformCopyToGLTexture):
+
2013-01-09 Kunihiko Sakamoto <[email protected]>
INPUT_MULTIPLE_FIELDS_UI: min/max attributes should not make all fields read-only
Modified: trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp (139181 => 139182)
--- trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp 2013-01-09 11:23:14 UTC (rev 139181)
+++ trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp 2013-01-09 11:25:12 UTC (rev 139182)
@@ -50,10 +50,7 @@
return 0;
GLint prevTexture;
- GLboolean wasEnabled = glIsEnabled(GL_TEXTURE_RECTANGLE_ARB);
glGetIntegerv(GL_TEXTURE_RECTANGLE_ARB, &prevTexture);
- if (!wasEnabled)
- glEnable(GL_TEXTURE_RECTANGLE_ARB);
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texture);
@@ -64,8 +61,6 @@
}
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, prevTexture);
- if (!wasEnabled)
- glDisable(GL_TEXTURE_RECTANGLE_ARB);
return texture;
}
@@ -216,7 +211,6 @@
glFlush(); // Make sure the texture has actually been completely written in the original context.
makeCurrent();
- glEnable(GL_TEXTURE_RECTANGLE_ARB);
int x = sourceRect.x();
int y = sourceRect.y();
@@ -319,8 +313,6 @@
if (!m_fbo)
glGenFramebuffers(1, &m_fbo);
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
- glEnable(GL_TEXTURE_RECTANGLE_ARB);
- glEnable(target);
glBindTexture(target, id);
glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo);
glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ARB, m_private->frontBufferTextureID(), 0);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes