Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: Source/platform/graphics/RecordingImageBufferSurface.cpp

Issue 413313002: Treat calls to CanvasRenderingContext2D.clearRect as operations that clear the canvas (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/RecordingImageBufferSurface.cpp
diff --git a/Source/platform/graphics/RecordingImageBufferSurface.cpp b/Source/platform/graphics/RecordingImageBufferSurface.cpp
index 7edbb5de40da972b25bf3369a8ad57f127d7ecdf..f3326eeb433aece11a133590778ace94de285f0b 100644
--- a/Source/platform/graphics/RecordingImageBufferSurface.cpp
+++ b/Source/platform/graphics/RecordingImageBufferSurface.cpp
@@ -37,6 +37,7 @@ void RecordingImageBufferSurface::initializeCurrentFrame()
if (m_graphicsContext) {
m_graphicsContext->resetCanvas(m_currentFrame->getRecordingCanvas());
m_graphicsContext->setTrackOpaqueRegion(true);
+ m_graphicsContext->setTreatOverwriteAsOpaque(true);
}
}
@@ -45,6 +46,7 @@ void RecordingImageBufferSurface::setImageBuffer(ImageBuffer* imageBuffer)
m_graphicsContext = imageBuffer ? imageBuffer->context() : 0;
if (m_currentFrame && m_graphicsContext) {
m_graphicsContext->setTrackOpaqueRegion(true);
+ m_graphicsContext->setTreatOverwriteAsOpaque(true);
m_graphicsContext->resetCanvas(m_currentFrame->getRecordingCanvas());
}
}

Powered by Google App Engine
This is Rietveld 408576698