diff options
author | fmalita <fmalita@chromium.org> | 2014-09-16 17:58:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 17:58:34 -0700 |
commit | acb882c239c0cfea738fe63ed9de48ddc2ddc76a (patch) | |
tree | 080a9d37f4da22fe2fb235e47b7aa0cf260fa6eb /src/core/SkPtrRecorder.h | |
parent | d99bbb61e58e8bd34db3954147ce1c9166fe4637 (diff) |
Ensure blob typeface information survives SkGPipe serialization.
When flattening text blobs to the temp buffer, we need to collect
typeface info and ship it across the pipe explicitly.
R=mtklein@google.com, reed@google.com, robertphillips@google.com, bungeman@google.com
BUG=412445
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/563783003
Diffstat (limited to 'src/core/SkPtrRecorder.h')
-rw-r--r-- | src/core/SkPtrRecorder.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/SkPtrRecorder.h b/src/core/SkPtrRecorder.h index 06e14ab6ec..83200f5275 100644 --- a/src/core/SkPtrRecorder.h +++ b/src/core/SkPtrRecorder.h @@ -58,6 +58,27 @@ public: */ void reset(); + /** + * Set iterator. + */ + class Iter { + public: + Iter(const SkPtrSet& set) + : fSet(set) + , fIndex(0) {} + + /** + * Return the next ptr in the set or null if the end was reached. + */ + void* next() { + return fIndex < fSet.fList.count() ? fSet.fList[fIndex++].fPtr : NULL; + } + + private: + const SkPtrSet& fSet; + int fIndex; + }; + protected: virtual void incPtr(void*) {} virtual void decPtr(void*) {} |