Changeset 95114 in webkit


Ignore:
Timestamp:
Sep 14, 2011 1:12:19 PM (13 years ago)
Author:
jamesr@google.com
Message:

[skia] fast/canvas/setWidthResetAfterForcedRender is flaky
https://bugs.webkit.org/show_bug.cgi?id=67955

Reviewed by Stephen White.

When destroying an ImageBuffer due to a canvas resize, we weren't clearing the texture ID on the layer,
resulting in future compositor draw calls binding an invalid texture. This results in the test failing and
possibly drawing from a bad texture.

Covered by fast/canvas/setWidthResetAfterForcedRender.html in the GPU configuration.

  • platform/graphics/chromium/Canvas2DLayerChromium.cpp:

(WebCore::Canvas2DLayerChromium::drawsContent)

  • platform/graphics/skia/ImageBufferSkia.cpp:

(WebCore::ImageBuffer::~ImageBuffer):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95112 r95114  
     12011-09-14  James Robinson  <jamesr@chromium.org>
     2
     3        [skia] fast/canvas/setWidthResetAfterForcedRender is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=67955
     5
     6        Reviewed by Stephen White.
     7
     8        When destroying an ImageBuffer due to a canvas resize, we weren't clearing the texture ID on the layer,
     9        resulting in future compositor draw calls binding an invalid texture.  This results in the test failing and
     10        possibly drawing from a bad texture.
     11
     12        Covered by fast/canvas/setWidthResetAfterForcedRender.html in the GPU configuration.
     13
     14        * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
     15        (WebCore::Canvas2DLayerChromium::drawsContent)
     16        * platform/graphics/skia/ImageBufferSkia.cpp:
     17        (WebCore::ImageBuffer::~ImageBuffer):
     18
    1192011-09-14  Eric Seidel  <eric@webkit.org>
    220
  • trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp

    r93988 r95114  
    6161bool Canvas2DLayerChromium::drawsContent() const
    6262{
    63     return (m_context
     63    return m_textureId && (m_context
    6464            && (m_context->getExtensions()->getGraphicsResetStatusARB() == GraphicsContext3D::NO_ERROR));
    6565}
  • trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp

    r94982 r95114  
    117117ImageBuffer::~ImageBuffer()
    118118{
     119#if USE(ACCELERATED_COMPOSITING)
     120    if (m_data.m_platformLayer)
     121        m_data.m_platformLayer->setTextureId(0);
     122#endif
    119123    if (m_context && m_context->platformContext()) {
    120124        // This is so that the SkGpuDevice destructor has the correct context.
Note: See TracChangeset for help on using the changeset viewer.