OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #ifndef SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 96 } |
97 | 97 |
98 const SkWriter32& writeStream() const { | 98 const SkWriter32& writeStream() const { |
99 return fWriter; | 99 return fWriter; |
100 } | 100 } |
101 | 101 |
102 void beginRecording(); | 102 void beginRecording(); |
103 void endRecording(); | 103 void endRecording(); |
104 | 104 |
105 private: | 105 private: |
| 106 void handleOptimization(int opt); |
106 void recordRestoreOffsetPlaceholder(SkRegion::Op); | 107 void recordRestoreOffsetPlaceholder(SkRegion::Op); |
107 void fillRestoreOffsetPlaceholdersForCurrentStackLevel( | 108 void fillRestoreOffsetPlaceholdersForCurrentStackLevel( |
108 uint32_t restoreOffset); | 109 uint32_t restoreOffset); |
109 | 110 |
110 SkTDArray<int32_t> fRestoreOffsetStack; | 111 SkTDArray<int32_t> fRestoreOffsetStack; |
111 int fFirstSavedLayerIndex; | 112 int fFirstSavedLayerIndex; |
112 enum { | 113 enum { |
113 kNoSavedLayerIndex = -1 | 114 kNoSavedLayerIndex = -1 |
114 }; | 115 }; |
115 | 116 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 uint32_t fRecordFlags; | 237 uint32_t fRecordFlags; |
237 int fInitialSaveCount; | 238 int fInitialSaveCount; |
238 | 239 |
239 friend class SkPicturePlayback; | 240 friend class SkPicturePlayback; |
240 friend class SkPictureTester; // for unit testing | 241 friend class SkPictureTester; // for unit testing |
241 | 242 |
242 typedef SkCanvas INHERITED; | 243 typedef SkCanvas INHERITED; |
243 }; | 244 }; |
244 | 245 |
245 #endif | 246 #endif |
OLD | NEW |