Refactoring SkDeferredCanvas to use SkGPipe.
Keeping the refactor hidden behind a config macro for now.
TEST=covered by existing skia gm tests
BUG=https://code.google.com/p/chromium/issues/detail?id=133432
Review URL: https://codereview.appspot.com/6405054
git-svn-id: http://skia.googlecode.com/svn/trunk@4656 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 9007163..fc40006 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -350,6 +350,8 @@
}
}
+ void flushRecording(bool detachCurrentBlock);
+
// overrides from SkCanvas
virtual int save(SaveFlags) SK_OVERRIDE;
virtual int saveLayer(const SkRect* bounds, const SkPaint*,
@@ -1077,6 +1079,14 @@
}
}
+void SkGPipeCanvas::flushRecording(bool detachCurrentBlock) {
+ doNotify();
+ if (detachCurrentBlock) {
+ // force a new block to be requested for the next recorded command
+ fBlockSize = 0;
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
template <typename T> uint32_t castToU32(T value) {
@@ -1219,3 +1229,7 @@
}
}
+void SkGPipeWriter::flushRecording(bool detachCurrentBlock){
+ fCanvas->flushRecording(detachCurrentBlock);
+}
+