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

Unified Diff: third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp

Issue 2391373002: Refactor CRC2D::reset() to avoid non-additive SkCanvas state operations (Closed)
Patch Set: review Created 4 years, 2 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: third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
index 2b9a2c6b1a3dc92ba0f6decbc75549b716983ad1..cbdbd570fbf01f9ad8c1f63714fef6fad560e204 100644
--- a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
@@ -52,6 +52,11 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(
m_surface =
SkSurface::MakeRaster(info, Opaque == opacityMode ? 0 : &disableLCDProps);
+ // Always save an initial frame, to support resetting the top level matrix
+ // and clip.
+ if (m_surface)
+ m_surface->getCanvas()->save();
+
if (initializationMode == InitializeImagePixels) {
if (m_surface)
clear();

Powered by Google App Engine
This is Rietveld 408576698