diff options
author | halcanary <halcanary@google.com> | 2015-08-19 12:26:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-19 12:26:46 -0700 |
commit | a060eba0836f98902ca078d5f9fc6191ba0c0a52 (patch) | |
tree | e7ea42436a780f5b85005da1bf511dd20a6bf1b0 /src/pdf/SkPDFGraphicState.h | |
parent | 216b643fc77e754a3fabbb0ed397e7cf55d1954d (diff) |
SkPDF: Simplify PDFStream / emitObject() const
Compress SkPDFStream's data on setData(), not emitObject(); no longer stateful.
SkPDFObject::emitObject is now const. This makes it easier to reason about state.
Minimal performance gains.
Review URL: https://codereview.chromium.org/1304493002
Diffstat (limited to 'src/pdf/SkPDFGraphicState.h')
-rw-r--r-- | src/pdf/SkPDFGraphicState.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pdf/SkPDFGraphicState.h b/src/pdf/SkPDFGraphicState.h index 1b11fe4f48..45a32d430e 100644 --- a/src/pdf/SkPDFGraphicState.h +++ b/src/pdf/SkPDFGraphicState.h @@ -32,9 +32,9 @@ public: // Override emitObject so that we can populate the dictionary on // demand. - virtual void emitObject(SkWStream* stream, - const SkPDFObjNumMap& objNumMap, - const SkPDFSubstituteMap& substitutes); + void emitObject(SkWStream* stream, + const SkPDFObjNumMap& objNumMap, + const SkPDFSubstituteMap& substitutes) const override; /** Get the graphic state for the passed SkPaint. The reference count of * the object is incremented and it is the caller's responsibility to |