Changeset 63923 in webkit


Ignore:
Timestamp:
Jul 22, 2010 5:18:58 PM (14 years ago)
Author:
jamesr@google.com
Message:

2010-07-22 James Robinson <jamesr@chromium.org>

Reviewed by Simon Fraser.

REGRESSION: box shadows on WebGL canvas elements repainted every frame
https://bugs.webkit.org/show_bug.cgi?id=42852

Avoid calling HTMLCanvasElement::willDraw() every time a WebGL canvas'
contents update. This call is only needed in the non-compositing
rendering path.

Covered by fast/canvas/webgl/canvas-test.html

  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::markContextChanged): (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63919 r63923  
     12010-07-22  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        REGRESSION: box shadows on WebGL canvas elements repainted every frame
     6        https://bugs.webkit.org/show_bug.cgi?id=42852
     7
     8        Avoid calling HTMLCanvasElement::willDraw() every time a WebGL canvas'
     9        contents update.  This call is only needed in the non-compositing
     10        rendering path.
     11
     12        Covered by fast/canvas/webgl/canvas-test.html
     13
     14        * html/canvas/WebGLRenderingContext.cpp:
     15        (WebCore::WebGLRenderingContext::markContextChanged):
     16        (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
     17
    1182010-07-22  Patrick Gansterer  <paroga@paroga.com>
    219
  • trunk/WebCore/html/canvas/WebGLRenderingContext.cpp

    r63505 r63923  
    142142    if (renderBox && renderBox->hasLayer() && renderBox->layer()->hasAcceleratedCompositing())
    143143        renderBox->layer()->rendererContentChanged();
     144    else {
    144145#endif
    145     if (!m_markedCanvasDirty) {
    146         // Make sure the canvas's image buffer is allocated.
    147         canvas()->buffer();
    148         canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
    149         m_markedCanvasDirty = true;
    150     }
     146        if (!m_markedCanvasDirty)
     147            canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
     148#if USE(ACCELERATED_COMPOSITING)
     149    }
     150#endif
     151    m_markedCanvasDirty = true;
    151152}
    152153
     
    154155{
    155156    if (m_markedCanvasDirty) {
     157        // FIXME: It should not be necessary to clear the image before doing a readback.
     158        // Investigate why this is needed and remove if possible.
     159        canvas()->buffer()->clearImage();
    156160        m_markedCanvasDirty = false;
    157161        m_context->paintRenderingResultsToCanvas(this);
Note: See TracChangeset for help on using the changeset viewer.