epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
reed@google.com | 76f10a3 | 2014-02-05 15:32:21 +0000 | [diff] [blame] | 7 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 8 | #ifndef SkPictureRecord_DEFINED |
| 9 | #define SkPictureRecord_DEFINED |
| 10 | |
| 11 | #include "SkCanvas.h" |
| 12 | #include "SkFlattenable.h" |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 13 | #include "SkPicture.h" |
robertphillips | db53990 | 2014-07-01 08:47:04 -0700 | [diff] [blame] | 14 | #include "SkPictureData.h" |
bungeman | f3c15b7 | 2015-08-19 11:56:48 -0700 | [diff] [blame^] | 15 | #include "SkTArray.h" |
| 16 | #include "SkTDArray.h" |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 17 | #include "SkWriter32.h" |
| 18 | |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 19 | // These macros help with packing and unpacking a single byte value and |
| 20 | // a 3 byte value into/out of a uint32_t |
| 21 | #define MASK_24 0x00FFFFFF |
| 22 | #define UNPACK_8_24(combined, small, large) \ |
| 23 | small = (combined >> 24) & 0xFF; \ |
| 24 | large = combined & MASK_24; |
| 25 | #define PACK_8_24(small, large) ((small << 24) | large) |
| 26 | |
| 27 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 28 | class SkPictureRecord : public SkCanvas { |
| 29 | public: |
robertphillips | 0bdbea7 | 2014-06-11 11:37:55 -0700 | [diff] [blame] | 30 | SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 31 | virtual ~SkPictureRecord(); |
| 32 | |
robertphillips | 9b14f26 | 2014-06-04 05:40:44 -0700 | [diff] [blame] | 33 | const SkTDArray<const SkPicture* >& getPictureRefs() const { |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 34 | return fPictureRefs; |
| 35 | } |
vandebo@chromium.org | 74b4619 | 2012-01-28 01:45:11 +0000 | [diff] [blame] | 36 | |
fmalita | b742517 | 2014-08-26 07:56:44 -0700 | [diff] [blame] | 37 | const SkTDArray<const SkTextBlob* >& getTextBlobRefs() const { |
| 38 | return fTextBlobRefs; |
| 39 | } |
| 40 | |
reed | 871872f | 2015-06-22 12:48:26 -0700 | [diff] [blame] | 41 | const SkTDArray<const SkImage* >& getImageRefs() const { |
| 42 | return fImageRefs; |
| 43 | } |
bungeman | f3c15b7 | 2015-08-19 11:56:48 -0700 | [diff] [blame^] | 44 | |
robertphillips | 0bdbea7 | 2014-06-11 11:37:55 -0700 | [diff] [blame] | 45 | SkData* opData(bool deepCopy) const { |
| 46 | this->validate(fWriter.bytesWritten(), 0); |
| 47 | |
| 48 | if (fWriter.bytesWritten() == 0) { |
| 49 | return SkData::NewEmpty(); |
| 50 | } |
| 51 | |
| 52 | if (deepCopy) { |
| 53 | return SkData::NewWithCopy(fWriter.contiguousArray(), fWriter.bytesWritten()); |
| 54 | } |
| 55 | |
| 56 | return fWriter.snapshotAsData(); |
| 57 | } |
| 58 | |
robertphillips | 0bdbea7 | 2014-06-11 11:37:55 -0700 | [diff] [blame] | 59 | const SkPictureContentInfo& contentInfo() const { |
| 60 | return fContentInfo; |
| 61 | } |
| 62 | |
junov@chromium.org | 4866cc0 | 2012-06-01 21:23:07 +0000 | [diff] [blame] | 63 | void setFlags(uint32_t recordFlags) { |
| 64 | fRecordFlags = recordFlags; |
| 65 | } |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 66 | |
| 67 | const SkWriter32& writeStream() const { |
| 68 | return fWriter; |
| 69 | } |
| 70 | |
reed@google.com | d86e7ab | 2012-09-27 20:31:31 +0000 | [diff] [blame] | 71 | void beginRecording(); |
junov@chromium.org | a6c9e0e | 2012-07-12 17:47:34 +0000 | [diff] [blame] | 72 | void endRecording(); |
reed@google.com | d86e7ab | 2012-09-27 20:31:31 +0000 | [diff] [blame] | 73 | |
senorblanco@chromium.org | 68250c8 | 2014-05-06 22:52:55 +0000 | [diff] [blame] | 74 | protected: |
| 75 | void addNoOp(); |
| 76 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 77 | private: |
commit-bot@chromium.org | 4b32bd5 | 2013-03-15 15:06:03 +0000 | [diff] [blame] | 78 | void handleOptimization(int opt); |
commit-bot@chromium.org | dcecb16 | 2014-04-22 17:54:29 +0000 | [diff] [blame] | 79 | size_t recordRestoreOffsetPlaceholder(SkRegion::Op); |
robertphillips@google.com | 5a63f24 | 2014-02-04 20:07:50 +0000 | [diff] [blame] | 80 | void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffset); |
junov@chromium.org | e3dbedb | 2012-07-09 16:03:55 +0000 | [diff] [blame] | 81 | |
reed@google.com | ffacd3c | 2012-08-30 15:31:23 +0000 | [diff] [blame] | 82 | SkTDArray<int32_t> fRestoreOffsetStack; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 83 | |
commit-bot@chromium.org | 210ae2a | 2014-02-27 17:40:13 +0000 | [diff] [blame] | 84 | SkTDArray<uint32_t> fCullOffsetStack; |
| 85 | |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 86 | /* |
| 87 | * Write the 'drawType' operation and chunk size to the skp. 'size' |
skia.committer@gmail.com | ce8343d | 2013-02-16 07:01:31 +0000 | [diff] [blame] | 88 | * can potentially be increased if the chunk size needs its own storage |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 89 | * location (i.e., it overflows 24 bits). |
| 90 | * Returns the start offset of the chunk. This is the location at which |
| 91 | * the opcode & size are stored. |
skia.committer@gmail.com | ce8343d | 2013-02-16 07:01:31 +0000 | [diff] [blame] | 92 | * TODO: since we are handing the size into here we could call reserve |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 93 | * and then return a pointer to the memory storage. This could decrease |
| 94 | * allocation overhead but could lead to more wasted space (the tail |
| 95 | * end of blocks could go unused). Possibly add a second addDraw that |
| 96 | * operates in this manner. |
| 97 | */ |
commit-bot@chromium.org | dcecb16 | 2014-04-22 17:54:29 +0000 | [diff] [blame] | 98 | size_t addDraw(DrawType drawType, size_t* size) { |
reed@google.com | 4469938 | 2013-10-31 17:28:30 +0000 | [diff] [blame] | 99 | size_t offset = fWriter.bytesWritten(); |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 100 | |
reed@google.com | 97af1a6 | 2012-08-28 12:19:02 +0000 | [diff] [blame] | 101 | this->predrawNotify(); |
hendrikw | afdada2 | 2014-08-08 10:44:33 -0700 | [diff] [blame] | 102 | fContentInfo.addOperation(); |
reed@google.com | 97af1a6 | 2012-08-28 12:19:02 +0000 | [diff] [blame] | 103 | |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 104 | SkASSERT(0 != *size); |
| 105 | SkASSERT(((uint8_t) drawType) == drawType); |
| 106 | |
| 107 | if (0 != (*size & ~MASK_24) || *size == MASK_24) { |
| 108 | fWriter.writeInt(PACK_8_24(drawType, MASK_24)); |
| 109 | *size += 1; |
commit-bot@chromium.org | dcecb16 | 2014-04-22 17:54:29 +0000 | [diff] [blame] | 110 | fWriter.writeInt(SkToU32(*size)); |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 111 | } else { |
commit-bot@chromium.org | dcecb16 | 2014-04-22 17:54:29 +0000 | [diff] [blame] | 112 | fWriter.writeInt(PACK_8_24(drawType, SkToU32(*size))); |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | return offset; |
vandebo@chromium.org | 74b4619 | 2012-01-28 01:45:11 +0000 | [diff] [blame] | 116 | } |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 117 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 118 | void addInt(int value) { |
| 119 | fWriter.writeInt(value); |
| 120 | } |
| 121 | void addScalar(SkScalar scalar) { |
| 122 | fWriter.writeScalar(scalar); |
| 123 | } |
vandebo@chromium.org | 74b4619 | 2012-01-28 01:45:11 +0000 | [diff] [blame] | 124 | |
mtklein | e069400 | 2014-11-12 12:49:47 -0800 | [diff] [blame] | 125 | void addBitmap(const SkBitmap& bitmap); |
reed | 871872f | 2015-06-22 12:48:26 -0700 | [diff] [blame] | 126 | void addImage(const SkImage*); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 127 | void addMatrix(const SkMatrix& matrix); |
mtklein | 46616af | 2014-09-30 14:47:10 -0700 | [diff] [blame] | 128 | void addPaint(const SkPaint& paint) { this->addPaintPtr(&paint); } |
| 129 | void addPaintPtr(const SkPaint* paint); |
dandov | b3c9d1c | 2014-08-12 08:34:29 -0700 | [diff] [blame] | 130 | void addPatch(const SkPoint cubics[12]); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 131 | void addPath(const SkPath& path); |
robertphillips | 9b14f26 | 2014-06-04 05:40:44 -0700 | [diff] [blame] | 132 | void addPicture(const SkPicture* picture); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 133 | void addPoint(const SkPoint& point); |
| 134 | void addPoints(const SkPoint pts[], int count); |
| 135 | void addRect(const SkRect& rect); |
| 136 | void addRectPtr(const SkRect* rect); |
reed@google.com | f0b5e11 | 2011-09-07 11:57:34 +0000 | [diff] [blame] | 137 | void addIRect(const SkIRect& rect); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 138 | void addIRectPtr(const SkIRect* rect); |
reed@google.com | 4ed0fb7 | 2012-12-12 20:48:18 +0000 | [diff] [blame] | 139 | void addRRect(const SkRRect&); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 140 | void addRegion(const SkRegion& region); |
| 141 | void addText(const void* text, size_t byteLength); |
fmalita | b742517 | 2014-08-26 07:56:44 -0700 | [diff] [blame] | 142 | void addTextBlob(const SkTextBlob* blob); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 143 | |
junov@chromium.org | 4866cc0 | 2012-06-01 21:23:07 +0000 | [diff] [blame] | 144 | int find(const SkBitmap& bitmap); |
| 145 | |
robertphillips | 6162af8 | 2014-08-11 09:50:11 -0700 | [diff] [blame] | 146 | protected: |
commit-bot@chromium.org | dcecb16 | 2014-04-22 17:54:29 +0000 | [diff] [blame] | 147 | void validate(size_t initialOffset, size_t size) const { |
reed@google.com | 4469938 | 2013-10-31 17:28:30 +0000 | [diff] [blame] | 148 | SkASSERT(fWriter.bytesWritten() == initialOffset + size); |
robertphillips@google.com | 2ca1aaa | 2013-02-15 13:47:37 +0000 | [diff] [blame] | 149 | } |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 150 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 151 | SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override; |
reed | 884e97c | 2015-05-26 11:31:54 -0700 | [diff] [blame] | 152 | bool onPeekPixels(SkPixmap*) override { return false; } |
commit-bot@chromium.org | e54a23f | 2014-03-12 20:21:48 +0000 | [diff] [blame] | 153 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 154 | void willSave() override; |
| 155 | SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; |
| 156 | void willRestore() override; |
commit-bot@chromium.org | e54a23f | 2014-03-12 20:21:48 +0000 | [diff] [blame] | 157 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 158 | void didConcat(const SkMatrix&) override; |
| 159 | void didSetMatrix(const SkMatrix&) override; |
commit-bot@chromium.org | 44c48d0 | 2014-03-13 20:03:58 +0000 | [diff] [blame] | 160 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 161 | void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; |
reed@google.com | 76f10a3 | 2014-02-05 15:32:21 +0000 | [diff] [blame] | 162 | |
reed | 3dfd133 | 2015-06-25 14:26:11 -0700 | [diff] [blame] | 163 | void onDrawText(const void* text, size_t, SkScalar x, SkScalar y, const SkPaint&) override; |
| 164 | void onDrawPosText(const void* text, size_t, const SkPoint pos[], const SkPaint&) override; |
| 165 | void onDrawPosTextH(const void* text, size_t, const SkScalar xpos[], SkScalar constY, |
| 166 | const SkPaint&) override; |
| 167 | void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 168 | const SkMatrix* matrix, const SkPaint&) override; |
reed | 3dfd133 | 2015-06-25 14:26:11 -0700 | [diff] [blame] | 169 | void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 170 | const SkPaint& paint) override; |
mtklein | 46616af | 2014-09-30 14:47:10 -0700 | [diff] [blame] | 171 | |
reed | 3dfd133 | 2015-06-25 14:26:11 -0700 | [diff] [blame] | 172 | void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
dandov | b3c9d1c | 2014-08-12 08:34:29 -0700 | [diff] [blame] | 173 | const SkPoint texCoords[4], SkXfermode* xmode, |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 174 | const SkPaint& paint) override; |
reed | 71c3c76 | 2015-06-24 10:29:17 -0700 | [diff] [blame] | 175 | void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], int, |
| 176 | SkXfermode::Mode, const SkRect*, const SkPaint*) override; |
reed@google.com | e0d9ce8 | 2014-04-23 04:00:17 +0000 | [diff] [blame] | 177 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 178 | void onDrawPaint(const SkPaint&) override; |
| 179 | void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; |
| 180 | void onDrawRect(const SkRect&, const SkPaint&) override; |
| 181 | void onDrawOval(const SkRect&, const SkPaint&) override; |
| 182 | void onDrawRRect(const SkRRect&, const SkPaint&) override; |
| 183 | void onDrawPath(const SkPath&, const SkPaint&) override; |
| 184 | void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; |
reed | 41af966 | 2015-01-05 07:49:08 -0800 | [diff] [blame] | 185 | void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, |
reed | 562fe47 | 2015-07-28 07:35:14 -0700 | [diff] [blame] | 186 | SrcRectConstraint) override; |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 187 | void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; |
reed | 41af966 | 2015-01-05 07:49:08 -0800 | [diff] [blame] | 188 | void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, |
reed | 562fe47 | 2015-07-28 07:35:14 -0700 | [diff] [blame] | 189 | const SkPaint*, SrcRectConstraint) override; |
reed | 4c21dc5 | 2015-06-25 12:32:03 -0700 | [diff] [blame] | 190 | void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst, |
| 191 | const SkPaint*) override; |
reed | 41af966 | 2015-01-05 07:49:08 -0800 | [diff] [blame] | 192 | void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 193 | const SkPaint*) override; |
| 194 | void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; |
reed | 41af966 | 2015-01-05 07:49:08 -0800 | [diff] [blame] | 195 | void onDrawVertices(VertexMode vmode, int vertexCount, |
| 196 | const SkPoint vertices[], const SkPoint texs[], |
| 197 | const SkColor colors[], SkXfermode* xmode, |
| 198 | const uint16_t indices[], int indexCount, |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 199 | const SkPaint&) override; |
reed | 41af966 | 2015-01-05 07:49:08 -0800 | [diff] [blame] | 200 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 201 | void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 202 | void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 203 | void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; |
| 204 | void onClipRegion(const SkRegion&, SkRegion::Op) override; |
robertphillips@google.com | 8f90a89 | 2014-02-28 18:19:39 +0000 | [diff] [blame] | 205 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 206 | void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; |
robertphillips | 9b14f26 | 2014-06-04 05:40:44 -0700 | [diff] [blame] | 207 | |
robertphillips@google.com | 5a63f24 | 2014-02-04 20:07:50 +0000 | [diff] [blame] | 208 | int addPathToHeap(const SkPath& path); // does not write to ops stream |
| 209 | |
skia.committer@gmail.com | 1dab403 | 2014-02-05 03:01:48 +0000 | [diff] [blame] | 210 | // These entry points allow the writing of matrices, clips, saves & |
robertphillips@google.com | 5a63f24 | 2014-02-04 20:07:50 +0000 | [diff] [blame] | 211 | // restores to be deferred (e.g., if the MC state is being collapsed and |
| 212 | // only written out as needed). |
| 213 | void recordConcat(const SkMatrix& matrix); |
commit-bot@chromium.org | d9ea09e | 2014-03-25 17:32:26 +0000 | [diff] [blame] | 214 | void recordTranslate(const SkMatrix& matrix); |
| 215 | void recordScale(const SkMatrix& matrix); |
commit-bot@chromium.org | dcecb16 | 2014-04-22 17:54:29 +0000 | [diff] [blame] | 216 | size_t recordClipRect(const SkRect& rect, SkRegion::Op op, bool doAA); |
| 217 | size_t recordClipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA); |
| 218 | size_t recordClipPath(int pathID, SkRegion::Op op, bool doAA); |
| 219 | size_t recordClipRegion(const SkRegion& region, SkRegion::Op op); |
Florin Malita | 5f6102d | 2014-06-30 10:13:28 -0400 | [diff] [blame] | 220 | void recordSave(); |
robertphillips@google.com | 5a63f24 | 2014-02-04 20:07:50 +0000 | [diff] [blame] | 221 | void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags); |
robertphillips@google.com | 105a4a5 | 2014-02-11 15:10:40 +0000 | [diff] [blame] | 222 | void recordRestore(bool fillInSkips = true); |
robertphillips@google.com | 5a63f24 | 2014-02-04 20:07:50 +0000 | [diff] [blame] | 223 | |
robertphillips@google.com | 801cee1 | 2012-10-19 19:06:11 +0000 | [diff] [blame] | 224 | private: |
robertphillips | 0bdbea7 | 2014-06-11 11:37:55 -0700 | [diff] [blame] | 225 | SkPictureContentInfo fContentInfo; |
robertphillips | 0bdbea7 | 2014-06-11 11:37:55 -0700 | [diff] [blame] | 226 | |
mtklein | 71a2363 | 2014-11-12 10:24:55 -0800 | [diff] [blame] | 227 | SkTArray<SkBitmap> fBitmaps; |
| 228 | SkTArray<SkPaint> fPaints; |
| 229 | SkTArray<SkPath> fPaths; |
djsollen@google.com | d2700ee | 2012-05-30 16:54:13 +0000 | [diff] [blame] | 230 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 231 | SkWriter32 fWriter; |
| 232 | |
reed@android.com | 09b84a0 | 2009-06-26 20:22:26 +0000 | [diff] [blame] | 233 | // we ref each item in these arrays |
reed | 871872f | 2015-06-22 12:48:26 -0700 | [diff] [blame] | 234 | SkTDArray<const SkImage*> fImageRefs; |
fmalita | b742517 | 2014-08-26 07:56:44 -0700 | [diff] [blame] | 235 | SkTDArray<const SkPicture*> fPictureRefs; |
| 236 | SkTDArray<const SkTextBlob*> fTextBlobRefs; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 237 | |
reed@android.com | ae814c8 | 2009-02-13 14:56:09 +0000 | [diff] [blame] | 238 | uint32_t fRecordFlags; |
commit-bot@chromium.org | e494dbd | 2014-03-04 19:08:57 +0000 | [diff] [blame] | 239 | int fInitialSaveCount; |
reed@android.com | ae814c8 | 2009-02-13 14:56:09 +0000 | [diff] [blame] | 240 | |
robertphillips | 6142609 | 2014-07-10 09:35:12 -0700 | [diff] [blame] | 241 | friend class SkPictureData; // for SkPictureData's SkPictureRecord-based constructor |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 242 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 243 | typedef SkCanvas INHERITED; |
| 244 | }; |
| 245 | |
| 246 | #endif |