aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2014-10-30 11:29:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-30 11:29:00 -0700
commit902d4d18dec27b6991516a235fc04a7af7290287 (patch)
tree099dd34a45a317ed331449edc4dccb63e3c0a5f7 /include
parent650076027f958a67584c1a906181d4f5c75a6d2a (diff)
Add SkDocument::getStream() method.
Motivation: SkDocument_PDF can be refactored to stream all PDF objects as SkCanvas calls are made, to save memory! BUG=skia:3030 BUG=skia:2683 Review URL: https://codereview.chromium.org/691783002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkDocument.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h
index dbf4bc5957..bd9e5ec890 100644
--- a/include/core/SkDocument.h
+++ b/include/core/SkDocument.h
@@ -122,6 +122,9 @@ protected:
virtual bool onClose(SkWStream*) = 0;
virtual void onAbort() = 0;
+ // Allows subclasses to write to the stream as pages are written.
+ SkWStream* getStream() { return fStream; }
+
enum State {
kBetweenPages_State,
kInPage_State,