Changeset 145649 in webkit


Ignore:
Timestamp:
Mar 12, 2013 6:14:34 PM (11 years ago)
Author:
commit-queue@webkit.org
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 <webkit.review.bot@gmail.com> on 2013-03-12

  • platform/graphics/gpu/DrawingBuffer.cpp:

(WebCore::DrawingBuffer::reset):

  • platform/graphics/gpu/DrawingBuffer.h:

(DrawingBuffer):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r145645 r145649  
     12013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r145280.
     4        http://trac.webkit.org/changeset/145280
     5        https://bugs.webkit.org/show_bug.cgi?id=112217
     6
     7        This patch broke chromium WebGL conformance tests (Requested
     8        by shawnsingh on #webkit).
     9
     10        * platform/graphics/gpu/DrawingBuffer.cpp:
     11        (WebCore::DrawingBuffer::reset):
     12        * platform/graphics/gpu/DrawingBuffer.h:
     13        (DrawingBuffer):
     14
    1152013-03-12  Dean Jackson  <dino@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp

    r145280 r145649  
    190190}
    191191
    192 // Only way to ensure that we're not getting a bad framebuffer on some AMD/OSX devices.
    193 // FIXME: This can be removed once renderbufferStorageMultisample starts reporting GL_OUT_OF_MEMORY properly.
    194 bool DrawingBuffer::checkBufferIntegrity()
    195 {
    196     if (!m_multisampleFBO)
    197         return true;
    198 
    199     m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO);
    200     m_context->clearColor(1.0f, 0.0f, 1.0f, 1.0f);
    201     m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT);
    202 
    203     commit(0, 0, 1, 1);
    204 
    205     unsigned char pixel[4] = {0, 0, 0, 0};
    206     m_context->readPixels(0, 0, 1, 1, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, &pixel);
    207 
    208     return (pixel[0] == 0xFF && pixel[1] == 0x00 && pixel[2] == 0xFF && pixel[3] == 0xFF);
    209 }
    210 
    211192bool DrawingBuffer::reset(const IntSize& newSize)
    212193{
     
    258239        }
    259240
     241
    260242        do {
    261243            m_size = adjustedSize;
     
    271253                m_context->bindRenderbuffer(GraphicsContext3D::RENDERBUFFER, m_multisampleColorBuffer);
    272254                m_context->getExtensions()->renderbufferStorageMultisample(GraphicsContext3D::RENDERBUFFER, sampleCount, internalRenderbufferFormat, m_size.width(), m_size.height());
    273 
    274                 if (m_context->getError() == GraphicsContext3D::OUT_OF_MEMORY) {
    275                     adjustedSize.scale(s_resourceAdjustedRatio);
    276                     continue;
    277                 }
    278 
    279255                m_context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::RENDERBUFFER, m_multisampleColorBuffer);
    280256                resizeDepthStencil(sampleCount);
     
    303279            if (!multisample())
    304280                resizeDepthStencil(0);
    305             if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
    306                 adjustedSize.scale(s_resourceAdjustedRatio);
    307                 continue;
    308             }
    309 
    310 #if OS(DARWIN)
    311             // FIXME: This can be removed once renderbufferStorageMultisample starts reporting GL_OUT_OF_MEMORY properly on OSX.
    312             if (!checkBufferIntegrity()) {
    313                 adjustedSize.scale(s_resourceAdjustedRatio);
    314                 continue;
    315             }
    316 #endif
    317 
    318             break;
     281            if (m_context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) == GraphicsContext3D::FRAMEBUFFER_COMPLETE)
     282                break;
     283            adjustedSize.scale(s_resourceAdjustedRatio);
    319284
    320285        } while (!adjustedSize.isEmpty());
  • trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.h

    r145280 r145649  
    141141    void initialize(const IntSize&);
    142142
    143     bool checkBufferIntegrity();
    144 
    145143    PreserveDrawingBuffer m_preserveDrawingBuffer;
    146144    AlphaRequirement m_alpha;
Note: See TracChangeset for help on using the changeset viewer.