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

Unified Diff: src/core/SkPictureData.h

Issue 499413002: SkTextBlob plumbing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review comments Created 6 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/core/SkBBoxRecord.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.h
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h
index a6c840aa0a8c45ccfeb5cc3bd91a60b8aec2155f..14c51860dd5d758d743c3fabfb117e58fc63972f 100644
--- a/src/core/SkPictureData.h
+++ b/src/core/SkPictureData.h
@@ -26,6 +26,7 @@ class SkPaint;
class SkPath;
class SkPictureStateTree;
class SkReadBuffer;
+class SkTextBlob;
struct SkPictInfo {
enum Flags {
@@ -49,9 +50,10 @@ struct SkPictInfo {
// This tag specifies the size of the ReadBuffer, needed for the following tags
#define SK_PICT_BUFFER_SIZE_TAG SkSetFourByteTag('a', 'r', 'a', 'y')
// these are all inside the ARRAYS tag
-#define SK_PICT_BITMAP_BUFFER_TAG SkSetFourByteTag('b', 't', 'm', 'p')
-#define SK_PICT_PAINT_BUFFER_TAG SkSetFourByteTag('p', 'n', 't', ' ')
-#define SK_PICT_PATH_BUFFER_TAG SkSetFourByteTag('p', 't', 'h', ' ')
+#define SK_PICT_BITMAP_BUFFER_TAG SkSetFourByteTag('b', 't', 'm', 'p')
+#define SK_PICT_PAINT_BUFFER_TAG SkSetFourByteTag('p', 'n', 't', ' ')
+#define SK_PICT_PATH_BUFFER_TAG SkSetFourByteTag('p', 't', 'h', ' ')
+#define SK_PICT_TEXTBLOB_BUFFER_TAG SkSetFourByteTag('b', 'l', 'o', 'b')
// Always write this guy last (with no length field afterwards)
#define SK_PICT_EOF_TAG SkSetFourByteTag('e', 'o', 'f', ' ')
@@ -132,6 +134,12 @@ public:
return &(*fPaints)[index - 1];
}
+ const SkTextBlob* getTextBlob(SkReader32* reader) const {
+ int index = reader->readInt();
+ SkASSERT(index > 0 && index <= fTextBlobCount);
+ return fTextBlobRefs[index - 1];
+ }
+
void initIterator(SkPictureStateTree::Iterator* iter,
const SkTDArray<void*>& draws,
SkCanvas* canvas) const {
@@ -183,6 +191,8 @@ private:
const SkPicture** fPictureRefs;
int fPictureCount;
+ const SkTextBlob** fTextBlobRefs;
+ int fTextBlobCount;
SkBBoxHierarchy* fBoundingHierarchy;
SkPictureStateTree* fStateTree;
« no previous file with comments | « src/core/SkBBoxRecord.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698