Title: [145649] trunk/Source/WebCore
Revision
145649
Author
[email protected]
Date
2013-03-12 18:14:34 -0700 (Tue, 12 Mar 2013)

Log Message

Unreviewed, rolling out r145280.
http://trac.webkit.org/changeset/145280
https://bugs.webkit.org/show_bug.cgi?id=112217

This patch broke chromium WebGL conformance tests (Requested
by shawnsingh on #webkit).

Patch by Sheriff Bot <[email protected]> on 2013-03-12

* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::reset):
* platform/graphics/gpu/DrawingBuffer.h:
(DrawingBuffer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (145648 => 145649)


--- trunk/Source/WebCore/ChangeLog	2013-03-13 01:12:32 UTC (rev 145648)
+++ trunk/Source/WebCore/ChangeLog	2013-03-13 01:14:34 UTC (rev 145649)
@@ -1,3 +1,17 @@
+2013-03-12  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r145280.
+        http://trac.webkit.org/changeset/145280
+        https://bugs.webkit.org/show_bug.cgi?id=112217
+
+        This patch broke chromium WebGL conformance tests (Requested
+        by shawnsingh on #webkit).
+
+        * platform/graphics/gpu/DrawingBuffer.cpp:
+        (WebCore::DrawingBuffer::reset):
+        * platform/graphics/gpu/DrawingBuffer.h:
+        (DrawingBuffer):
+
 2013-03-12  Dean Jackson  <[email protected]>
 
         Don't send events to plugins that are being snapshotted

Modified: trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp (145648 => 145649)


--- trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp	2013-03-13 01:12:32 UTC (rev 145648)
+++ trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp	2013-03-13 01:14:34 UTC (rev 145649)
@@ -189,25 +189,6 @@
     }
 }
 
-// Only way to ensure that we're not getting a bad framebuffer on some AMD/OSX devices.
-// FIXME: This can be removed once renderbufferStorageMultisample starts reporting GL_OUT_OF_MEMORY properly.
-bool DrawingBuffer::checkBufferIntegrity()
-{
-    if (!m_multisampleFBO)
-        return true;
-
-    m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO);
-    m_context->clearColor(1.0f, 0.0f, 1.0f, 1.0f);
-    m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT);
-
-    commit(0, 0, 1, 1);
-
-    unsigned char pixel[4] = {0, 0, 0, 0};
-    m_context->readPixels(0, 0, 1, 1, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, &pixel);
-
-    return (pixel[0] == 0xFF && pixel[1] == 0x00 && pixel[2] == 0xFF && pixel[3] == 0xFF);
-}
-
 bool DrawingBuffer::reset(const IntSize& newSize)
 {
     if (!m_context)
@@ -257,6 +238,7 @@
             internalRenderbufferFormat = Extensions3D::RGB8_OES;
         }
 
+
         do {
             m_size = adjustedSize;
             // resize multisample FBO
@@ -270,12 +252,6 @@
 
                 m_context->bindRenderbuffer(GraphicsContext3D::RENDERBUFFER, m_multisampleColorBuffer);
                 m_context->getExtensions()->renderbufferStorageMultisample(GraphicsContext3D::RENDERBUFFER, sampleCount, internalRenderbufferFormat, m_size.width(), m_size.height());
-
-                if (m_context->getError() == GraphicsContext3D::OUT_OF_MEMORY) {
-                    adjustedSize.scale(s_resourceAdjustedRatio);
-                    continue;
-                }
-
                 m_context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::RENDERBUFFER, m_multisampleColorBuffer);
                 resizeDepthStencil(sampleCount);
                 if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
@@ -302,21 +278,10 @@
 
             if (!multisample())
                 resizeDepthStencil(0);
-            if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
-                adjustedSize.scale(s_resourceAdjustedRatio);
-                continue;
-            }
+            if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) == GraphicsContext3D::FRAMEBUFFER_COMPLETE)
+                break;
+            adjustedSize.scale(s_resourceAdjustedRatio);
 
-#if OS(DARWIN)
-            // FIXME: This can be removed once renderbufferStorageMultisample starts reporting GL_OUT_OF_MEMORY properly on OSX.
-            if (!checkBufferIntegrity()) {
-                adjustedSize.scale(s_resourceAdjustedRatio);
-                continue;
-            }
-#endif
-
-            break;
-
         } while (!adjustedSize.isEmpty());
 
         pixelDelta = m_size.width() * m_size.height();

Modified: trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.h (145648 => 145649)


--- trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.h	2013-03-13 01:12:32 UTC (rev 145648)
+++ trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.h	2013-03-13 01:14:34 UTC (rev 145649)
@@ -140,8 +140,6 @@
 
     void initialize(const IntSize&);
 
-    bool checkBufferIntegrity();
-
     PreserveDrawingBuffer m_preserveDrawingBuffer;
     AlphaRequirement m_alpha;
     bool m_scissorEnabled;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to