Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: src/utils/SkMultiPictureDocumentReader.h

Issue 2255333003: SkMultiSKP: version 2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-08-23 (Tuesday) 11:53:05 EDT Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkMultiPictureDocumentPriv.h ('k') | src/utils/SkMultiPictureDocumentReader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkMultiPictureDocumentReader.h
diff --git a/src/utils/SkMultiPictureDocumentReader.h b/src/utils/SkMultiPictureDocumentReader.h
index 8e0a630e52e3c66f3942d12d4b53259269d1ae58..e0473a6539778fc941cf7db4dda0da850e3bf49e 100644
--- a/src/utils/SkMultiPictureDocumentReader.h
+++ b/src/utils/SkMultiPictureDocumentReader.h
@@ -22,10 +22,10 @@ public:
/** Return to factory settings. */
void reset() {
fSizes.reset();
- fOffsets.reset();
+ fPages.reset();
}
- /** Call this after calling init() */
+ /** Call this after calling init() (otherwise you'll always get zero). */
int pageCount() const { return fSizes.count(); }
/** Deserialize a page from the stream. Call init() first. The
@@ -39,7 +39,8 @@ public:
private:
SkTArray<SkSize> fSizes;
- SkTArray<size_t> fOffsets;
+ size_t fOffset;
+ mutable SkTArray<sk_sp<SkPicture>> fPages;
};
#endif // SkMultiPictureDocumentReader_DEFINED
« no previous file with comments | « src/utils/SkMultiPictureDocumentPriv.h ('k') | src/utils/SkMultiPictureDocumentReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698