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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
index 0f25ff226a7c893f4c6cefb0d10885810f2c0f5e..f4e2ec0192b06e8e5f9984f42d40589b2cb3e687 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
@@ -58,9 +58,13 @@ AcceleratedImageBufferSurface::AcceleratedImageBufferSurface(
m_surface = SkSurface::MakeRenderTarget(
grContext, SkBudgeted::kYes, info, 0 /* sampleCount */,
Opaque == opacityMode ? nullptr : &disableLCDProps);
- if (!m_surface.get())
+ if (!m_surface)
return;
clear();
+
+ // Always save an initial frame, to support resetting the top level matrix
+ // and clip.
+ m_surface->getCanvas()->save();
}
bool AcceleratedImageBufferSurface::isValid() const {
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698