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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 return fWriter; | 82 return fWriter; |
83 } | 83 } |
84 | 84 |
85 void beginRecording(); | 85 void beginRecording(); |
86 void endRecording(); | 86 void endRecording(); |
87 | 87 |
88 void internalOnly_EnableOpts(bool optsEnabled) { | 88 void internalOnly_EnableOpts(bool optsEnabled) { |
89 fOptsEnabled = optsEnabled; | 89 fOptsEnabled = optsEnabled; |
90 } | 90 } |
91 | 91 |
| 92 protected: |
| 93 void addNoOp(); |
| 94 |
92 private: | 95 private: |
93 void handleOptimization(int opt); | 96 void handleOptimization(int opt); |
94 size_t recordRestoreOffsetPlaceholder(SkRegion::Op); | 97 size_t recordRestoreOffsetPlaceholder(SkRegion::Op); |
95 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffse
t); | 98 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffse
t); |
96 | 99 |
97 #ifndef SK_COLLAPSE_MATRIX_CLIP_STATE | 100 #ifndef SK_COLLAPSE_MATRIX_CLIP_STATE |
98 SkTDArray<int32_t> fRestoreOffsetStack; | 101 SkTDArray<int32_t> fRestoreOffsetStack; |
99 int fFirstSavedLayerIndex; | 102 int fFirstSavedLayerIndex; |
100 enum { | 103 enum { |
101 kNoSavedLayerIndex = -1 | 104 kNoSavedLayerIndex = -1 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 friend class SkPictureTester; // for unit testing | 305 friend class SkPictureTester; // for unit testing |
303 | 306 |
304 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 307 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
305 SkMatrixClipStateMgr fMCMgr; | 308 SkMatrixClipStateMgr fMCMgr; |
306 #endif | 309 #endif |
307 | 310 |
308 typedef SkCanvas INHERITED; | 311 typedef SkCanvas INHERITED; |
309 }; | 312 }; |
310 | 313 |
311 #endif | 314 #endif |
OLD | NEW |