OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const SkPaint*) SK_OVERRIDE; | 47 const SkPaint*) SK_OVERRIDE; |
48 virtual void drawVertices(VertexMode, int vertexCount, | 48 virtual void drawVertices(VertexMode, int vertexCount, |
49 const SkPoint vertices[], const SkPoint texs[], | 49 const SkPoint vertices[], const SkPoint texs[], |
50 const SkColor colors[], SkXfermode*, | 50 const SkColor colors[], SkXfermode*, |
51 const uint16_t indices[], int indexCount, | 51 const uint16_t indices[], int indexCount, |
52 const SkPaint&) SK_OVERRIDE; | 52 const SkPaint&) SK_OVERRIDE; |
53 virtual void drawData(const void*, size_t) SK_OVERRIDE; | 53 virtual void drawData(const void*, size_t) SK_OVERRIDE; |
54 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; | 54 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; |
55 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 55 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; |
56 virtual void endCommentGroup() SK_OVERRIDE; | 56 virtual void endCommentGroup() SK_OVERRIDE; |
57 virtual bool isDrawingToLayer() const SK_OVERRIDE; | |
58 | 57 |
59 const SkTDArray<const SkPicture* >& getPictureRefs() const { | 58 const SkTDArray<const SkPicture* >& getPictureRefs() const { |
60 return fPictureRefs; | 59 return fPictureRefs; |
61 } | 60 } |
62 | 61 |
63 const SkTDArray<const SkTextBlob* >& getTextBlobRefs() const { | 62 const SkTDArray<const SkTextBlob* >& getTextBlobRefs() const { |
64 return fTextBlobRefs; | 63 return fTextBlobRefs; |
65 } | 64 } |
66 | 65 |
67 SkData* opData(bool deepCopy) const { | 66 SkData* opData(bool deepCopy) const { |
(...skipping 27 matching lines...) Expand all Loading... |
95 | 94 |
96 protected: | 95 protected: |
97 void addNoOp(); | 96 void addNoOp(); |
98 | 97 |
99 private: | 98 private: |
100 void handleOptimization(int opt); | 99 void handleOptimization(int opt); |
101 size_t recordRestoreOffsetPlaceholder(SkRegion::Op); | 100 size_t recordRestoreOffsetPlaceholder(SkRegion::Op); |
102 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffse
t); | 101 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffse
t); |
103 | 102 |
104 SkTDArray<int32_t> fRestoreOffsetStack; | 103 SkTDArray<int32_t> fRestoreOffsetStack; |
105 int fFirstSavedLayerIndex; | |
106 enum { | |
107 kNoSavedLayerIndex = -1 | |
108 }; | |
109 | 104 |
110 SkTDArray<uint32_t> fCullOffsetStack; | 105 SkTDArray<uint32_t> fCullOffsetStack; |
111 | 106 |
112 /* | 107 /* |
113 * Write the 'drawType' operation and chunk size to the skp. 'size' | 108 * Write the 'drawType' operation and chunk size to the skp. 'size' |
114 * can potentially be increased if the chunk size needs its own storage | 109 * can potentially be increased if the chunk size needs its own storage |
115 * location (i.e., it overflows 24 bits). | 110 * location (i.e., it overflows 24 bits). |
116 * Returns the start offset of the chunk. This is the location at which | 111 * Returns the start offset of the chunk. This is the location at which |
117 * the opcode & size are stored. | 112 * the opcode & size are stored. |
118 * TODO: since we are handing the size into here we could call reserve | 113 * TODO: since we are handing the size into here we could call reserve |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 235 |
241 uint32_t fRecordFlags; | 236 uint32_t fRecordFlags; |
242 int fInitialSaveCount; | 237 int fInitialSaveCount; |
243 | 238 |
244 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor | 239 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor |
245 | 240 |
246 typedef SkCanvas INHERITED; | 241 typedef SkCanvas INHERITED; |
247 }; | 242 }; |
248 | 243 |
249 #endif | 244 #endif |
OLD | NEW |