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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 SkASSERT(fWriter.bytesWritten() == initialOffset + size); | 226 SkASSERT(fWriter.bytesWritten() == initialOffset + size); |
227 } | 227 } |
228 #endif | 228 #endif |
229 | 229 |
230 protected: | 230 protected: |
231 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; | 231 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; |
232 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { | 232 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { |
233 return NULL; | 233 return NULL; |
234 } | 234 } |
235 | 235 |
236 virtual void willSave(SaveFlags) SK_OVERRIDE; | 236 virtual void willSave() SK_OVERRIDE; |
237 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 237 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
238 virtual void willRestore() SK_OVERRIDE; | 238 virtual void willRestore() SK_OVERRIDE; |
239 | 239 |
240 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; | 240 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; |
241 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 241 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
242 | 242 |
243 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 243 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
244 virtual void onPushCull(const SkRect&) SK_OVERRIDE; | 244 virtual void onPushCull(const SkRect&) SK_OVERRIDE; |
245 virtual void onPopCull() SK_OVERRIDE; | 245 virtual void onPopCull() SK_OVERRIDE; |
246 | 246 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // These entry points allow the writing of matrices, clips, saves & | 286 // These entry points allow the writing of matrices, clips, saves & |
287 // restores to be deferred (e.g., if the MC state is being collapsed and | 287 // restores to be deferred (e.g., if the MC state is being collapsed and |
288 // only written out as needed). | 288 // only written out as needed). |
289 void recordConcat(const SkMatrix& matrix); | 289 void recordConcat(const SkMatrix& matrix); |
290 void recordTranslate(const SkMatrix& matrix); | 290 void recordTranslate(const SkMatrix& matrix); |
291 void recordScale(const SkMatrix& matrix); | 291 void recordScale(const SkMatrix& matrix); |
292 size_t recordClipRect(const SkRect& rect, SkRegion::Op op, bool doAA); | 292 size_t recordClipRect(const SkRect& rect, SkRegion::Op op, bool doAA); |
293 size_t recordClipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA); | 293 size_t recordClipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA); |
294 size_t recordClipPath(int pathID, SkRegion::Op op, bool doAA); | 294 size_t recordClipPath(int pathID, SkRegion::Op op, bool doAA); |
295 size_t recordClipRegion(const SkRegion& region, SkRegion::Op op); | 295 size_t recordClipRegion(const SkRegion& region, SkRegion::Op op); |
296 void recordSave(SaveFlags flags); | 296 void recordSave(); |
297 void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags f
lags); | 297 void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags f
lags); |
298 void recordRestore(bool fillInSkips = true); | 298 void recordRestore(bool fillInSkips = true); |
299 | 299 |
300 // These are set to NULL in our constructor, but may be changed by | 300 // These are set to NULL in our constructor, but may be changed by |
301 // subclasses, in which case they will be SkSafeUnref'd in our destructor. | 301 // subclasses, in which case they will be SkSafeUnref'd in our destructor. |
302 SkBBoxHierarchy* fBoundingHierarchy; | 302 SkBBoxHierarchy* fBoundingHierarchy; |
303 SkPictureStateTree* fStateTree; | 303 SkPictureStateTree* fStateTree; |
304 | 304 |
305 // Allocated in the constructor and managed by this class. | 305 // Allocated in the constructor and managed by this class. |
306 SkBitmapHeap* fBitmapHeap; | 306 SkBitmapHeap* fBitmapHeap; |
(...skipping 22 matching lines...) Expand all Loading... |
329 friend class SkPictureTester; // for unit testing | 329 friend class SkPictureTester; // for unit testing |
330 | 330 |
331 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 331 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
332 SkMatrixClipStateMgr fMCMgr; | 332 SkMatrixClipStateMgr fMCMgr; |
333 #endif | 333 #endif |
334 | 334 |
335 typedef SkCanvas INHERITED; | 335 typedef SkCanvas INHERITED; |
336 }; | 336 }; |
337 | 337 |
338 #endif | 338 #endif |
OLD | NEW |