| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkPicturePlayback_DEFINED | 8 #ifndef SkPicturePlayback_DEFINED |
| 9 #define SkPicturePlayback_DEFINED | 9 #define SkPicturePlayback_DEFINED |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 bool fUseBBH; | 90 bool fUseBBH; |
| 91 PlaybackReplacements* fReplacements; | 91 PlaybackReplacements* fReplacements; |
| 92 | 92 |
| 93 void handleOp(SkReader32* reader, | 93 void handleOp(SkReader32* reader, |
| 94 DrawType op, | 94 DrawType op, |
| 95 uint32_t size, | 95 uint32_t size, |
| 96 SkCanvas* canvas, | 96 SkCanvas* canvas, |
| 97 const SkMatrix& initialMatrix); | 97 const SkMatrix& initialMatrix); |
| 98 | 98 |
| 99 #ifdef SK_DEVELOPER | |
| 100 virtual bool preDraw(int opIndex, int type) { return false; } | |
| 101 virtual void postDraw(int opIndex) { } | |
| 102 #endif | |
| 103 | |
| 104 static DrawType ReadOpAndSize(SkReader32* reader, uint32_t* size); | 99 static DrawType ReadOpAndSize(SkReader32* reader, uint32_t* size); |
| 105 | 100 |
| 106 class AutoResetOpID { | 101 class AutoResetOpID { |
| 107 public: | 102 public: |
| 108 AutoResetOpID(SkPicturePlayback* playback) : fPlayback(playback) { } | 103 AutoResetOpID(SkPicturePlayback* playback) : fPlayback(playback) { } |
| 109 ~AutoResetOpID() { | 104 ~AutoResetOpID() { |
| 110 if (NULL != fPlayback) { | 105 if (NULL != fPlayback) { |
| 111 fPlayback->resetOpID(); | 106 fPlayback->resetOpID(); |
| 112 } | 107 } |
| 113 } | 108 } |
| 114 | 109 |
| 115 private: | 110 private: |
| 116 SkPicturePlayback* fPlayback; | 111 SkPicturePlayback* fPlayback; |
| 117 }; | 112 }; |
| 118 | 113 |
| 119 private: | 114 private: |
| 120 typedef SkNoncopyable INHERITED; | 115 typedef SkNoncopyable INHERITED; |
| 121 }; | 116 }; |
| 122 | 117 |
| 123 #endif | 118 #endif |
| OLD | NEW |