| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| index 751fc5eb2408c10122df21f26b728efe6570c8f7..e6e7081a33e8b15cd35d1fafb308138015f7ffd6 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -1182,6 +1182,7 @@ void WebGLRenderingContextBase::initializeNewContext() {
|
| ASSERT(drawingBuffer());
|
|
|
| m_markedCanvasDirty = false;
|
| + m_paintInvalidatedForCurrentFrame = false;
|
| m_activeTextureUnit = 0;
|
| m_packAlignment = 4;
|
| m_unpackAlignment = 4;
|
| @@ -1397,17 +1398,23 @@ void WebGLRenderingContextBase::markContextChanged(
|
| if (!canvas())
|
| return;
|
|
|
| - LayoutBox* layoutBox = canvas()->layoutBox();
|
| - if (layoutBox && layoutBox->hasAcceleratedCompositing()) {
|
| - layoutBox->contentChanged(changeType);
|
| - }
|
| - if (!m_markedCanvasDirty) {
|
| - m_markedCanvasDirty = true;
|
| + m_markedCanvasDirty = true;
|
| +
|
| + if (!m_paintInvalidatedForCurrentFrame) {
|
| + m_paintInvalidatedForCurrentFrame = true;
|
| + LayoutBox* layoutBox = canvas()->layoutBox();
|
| + if (layoutBox && layoutBox->hasAcceleratedCompositing()) {
|
| + layoutBox->contentChanged(changeType);
|
| + }
|
| IntSize canvasSize = clampedCanvasSize();
|
| didDraw(SkIRect::MakeXYWH(0, 0, canvasSize.width(), canvasSize.height()));
|
| }
|
| }
|
|
|
| +void WebGLRenderingContextBase::finalizeFrame() {
|
| + m_paintInvalidatedForCurrentFrame = false;
|
| +}
|
| +
|
| void WebGLRenderingContextBase::onErrorMessage(const char* message,
|
| int32_t id) {
|
| if (m_synthesizedErrorsToConsole)
|
|
|