Index: Source/platform/graphics/GraphicsContext.h |
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h |
index e87a86483b657123c43cfe11b55fa82dc7fc606d..add6d3c26e59a1e6324dce9fc15eb4094038e3fd 100644 |
--- a/Source/platform/graphics/GraphicsContext.h |
+++ b/Source/platform/graphics/GraphicsContext.h |
@@ -79,7 +79,7 @@ public: |
SkCanvas* canvas() |
{ |
// Flush any pending saves. |
- realizeCanvasSave(SkCanvas::kMatrixClip_SaveFlag); |
+ realizeCanvasSave(); |
return m_canvas; |
} |
@@ -446,12 +446,13 @@ private: |
} |
// Apply deferred canvas state saves |
- void realizeCanvasSave(SkCanvas::SaveFlags flags) |
+ void realizeCanvasSave() |
{ |
- if (m_canvasSaveFlags & flags) { |
- m_canvas->save((SkCanvas::SaveFlags)m_canvasSaveFlags); |
- m_canvasSaveFlags = 0; |
- } |
+ if (!m_pendingCanvasSave) |
+ return; |
+ |
+ m_canvas->save(); |
+ m_pendingCanvasSave = false; |
} |
void didDrawTextInRect(const SkRect& textRect); |
@@ -475,12 +476,9 @@ private: |
// Currently pending save flags for Skia Canvas state. |
// Canvas state includes the canavs, it's matrix and clips. Think of it as _where_ |
// the draw operations will happen. |
- // FIXME: While defined as a bitmask of SkCanvas::SaveFlags, this is mostly used as a bool. |
- // It will come in handy when adding granular save() support (clip vs. matrix vs. paint). |
- // crbug.com/233713 |
struct CanvasSaveState; |
- unsigned m_canvasSaveFlags; |
Vector<CanvasSaveState> m_canvasStateStack; |
+ bool m_pendingCanvasSave; |
Stephen Chennney
2014/03/27 14:15:41
Maybe in a follow up, move this and the other bool
|
AnnotationModeFlags m_annotationMode; |