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

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

Issue 212993004: GC::saveLayer() may taint the current clip. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Always save the clip & matrix. Created 6 years, 9 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 | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 5f8fc1109c2669579e506d99d1ce31415100ce46..69cae52ea38d0d12fcb63c94c1742b96582aed76 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -179,14 +179,19 @@ void GraphicsContext::restore()
m_canvas->restoreToCount(savedState.m_restoreCount);
}
-void GraphicsContext::saveLayer(const SkRect* bounds, const SkPaint* paint, SkCanvas::SaveFlags saveFlags)
+void GraphicsContext::saveLayer(const SkRect* bounds, const SkPaint* paint,
+ SkCanvas::SaveFlags extraFlags)
{
if (paintingDisabled())
return;
realizeCanvasSave(SkCanvas::kMatrixClip_SaveFlag);
- m_canvas->saveLayer(bounds, paint, saveFlags);
+ // Always save the clip & matrix.
+ SkCanvas::SaveFlags flags = static_cast<SkCanvas::SaveFlags>(
+ SkCanvas::kMatrixClip_SaveFlag | extraFlags);
Stephen White 2014/03/26 17:45:52 Just an idea, but we could probably set these in t
f(malita) 2014/03/26 19:31:28 Done.
+ m_canvas->saveLayer(bounds, paint, flags);
+
if (bounds)
m_canvas->clipRect(*bounds);
if (m_trackOpaqueRegion)
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698