Title: [161297] trunk/Source/WebCore
Revision
161297
Author
[email protected]
Date
2014-01-03 16:52:16 -0800 (Fri, 03 Jan 2014)

Log Message

[WebGL] Blit operation from Multisample FBO to rendering FBO must ignore GL_SCISSOR test
https://bugs.webkit.org/show_bug.cgi?id=126470
<rdar://problem/15201370>

Reviewed by Dean Jackson.

Covered by webgl/1.0.2/resources/webgl_test_files/conformance/rendering/gl-scissor-test.html

* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): Temporarily deactivate the GL_SCISSOR
test while we do our blit, then reactivate if necessary.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161296 => 161297)


--- trunk/Source/WebCore/ChangeLog	2014-01-04 00:35:59 UTC (rev 161296)
+++ trunk/Source/WebCore/ChangeLog	2014-01-04 00:52:16 UTC (rev 161297)
@@ -1,5 +1,19 @@
 2014-01-03  Brent Fulgham  <[email protected]>
 
+        [WebGL] Blit operation from Multisample FBO to rendering FBO must ignore GL_SCISSOR test
+        https://bugs.webkit.org/show_bug.cgi?id=126470
+        <rdar://problem/15201370>
+
+        Reviewed by Dean Jackson.
+
+        Covered by webgl/1.0.2/resources/webgl_test_files/conformance/rendering/gl-scissor-test.html
+
+        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
+        (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): Temporarily deactivate the GL_SCISSOR
+        test while we do our blit, then reactivate if necessary.
+
+2014-01-03  Brent Fulgham  <[email protected]>
+
         [WebGL] CGLPixelFormat should specify SampleBuffer and Sample count when using MSAA
         https://bugs.webkit.org/show_bug.cgi?id=126468
 

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp (161296 => 161297)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp	2014-01-04 00:35:59 UTC (rev 161296)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp	2014-01-04 00:52:16 UTC (rev 161297)
@@ -161,6 +161,11 @@
 
 void GraphicsContext3D::resolveMultisamplingIfNecessary(const IntRect& rect)
 {
+    GLboolean isScissorEnabled = ::glIsEnabled(GL_SCISSOR_TEST);
+    ::glDisable(GL_SCISSOR_TEST);
+    GLboolean isDitherEnabled = ::glIsEnabled(GL_DITHER);
+    ::glDisable(GL_DITHER);
+    
     ::glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
     ::glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
 
@@ -169,6 +174,11 @@
         resolveRect = IntRect(0, 0, m_currentWidth, m_currentHeight);
 
     ::glBlitFramebufferEXT(resolveRect.x(), resolveRect.y(), resolveRect.maxX(), resolveRect.maxY(), resolveRect.x(), resolveRect.y(), resolveRect.maxX(), resolveRect.maxY(), GL_COLOR_BUFFER_BIT, GL_LINEAR);
+
+    if (isScissorEnabled)
+        ::glEnable(GL_SCISSOR_TEST);
+    if (isDitherEnabled)
+        ::glEnable(GL_DITHER);
 }
 
 void GraphicsContext3D::renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to