| 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 SkRecorder_DEFINED | 8 #ifndef SkRecorder_DEFINED |
| 9 #define SkRecorder_DEFINED | 9 #define SkRecorder_DEFINED |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // Does not take ownership of the SkRecord. | 41 // Does not take ownership of the SkRecord. |
| 42 SkRecorder(SkRecord*, int width, int height, SkMiniRecorder* = nullptr); /
/ legacy version | 42 SkRecorder(SkRecord*, int width, int height, SkMiniRecorder* = nullptr); /
/ legacy version |
| 43 SkRecorder(SkRecord*, const SkRect& bounds, SkMiniRecorder* = nullptr); | 43 SkRecorder(SkRecord*, const SkRect& bounds, SkMiniRecorder* = nullptr); |
| 44 | 44 |
| 45 enum DrawPictureMode { Record_DrawPictureMode, Playback_DrawPictureMode }; | 45 enum DrawPictureMode { Record_DrawPictureMode, Playback_DrawPictureMode }; |
| 46 void reset(SkRecord*, const SkRect& bounds, DrawPictureMode, SkMiniRecorder*
= nullptr); | 46 void reset(SkRecord*, const SkRect& bounds, DrawPictureMode, SkMiniRecorder*
= nullptr); |
| 47 | 47 |
| 48 size_t approxBytesUsedBySubPictures() const { return fApproxBytesUsedBySubPi
ctures; } | 48 size_t approxBytesUsedBySubPictures() const { return fApproxBytesUsedBySubPi
ctures; } |
| 49 | 49 |
| 50 SkDrawableList* getDrawableList() const { return fDrawableList.get(); } | 50 SkDrawableList* getDrawableList() const { return fDrawableList.get(); } |
| 51 SkDrawableList* detachDrawableList() { return fDrawableList.detach(); } | 51 SkDrawableList* detachDrawableList() { return fDrawableList.release(); } |
| 52 | 52 |
| 53 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor
der will fail. | 53 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor
der will fail. |
| 54 void forgetRecord(); | 54 void forgetRecord(); |
| 55 | 55 |
| 56 void willSave() override; | 56 void willSave() override; |
| 57 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; | 57 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; |
| 58 void willRestore() override {} | 58 void willRestore() override {} |
| 59 void didRestore() override; | 59 void didRestore() override; |
| 60 | 60 |
| 61 void didConcat(const SkMatrix&) override; | 61 void didConcat(const SkMatrix&) override; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 DrawPictureMode fDrawPictureMode; | 142 DrawPictureMode fDrawPictureMode; |
| 143 size_t fApproxBytesUsedBySubPictures; | 143 size_t fApproxBytesUsedBySubPictures; |
| 144 SkRecord* fRecord; | 144 SkRecord* fRecord; |
| 145 SkAutoTDelete<SkDrawableList> fDrawableList; | 145 SkAutoTDelete<SkDrawableList> fDrawableList; |
| 146 | 146 |
| 147 SkMiniRecorder* fMiniRecorder; | 147 SkMiniRecorder* fMiniRecorder; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 #endif//SkRecorder_DEFINED | 150 #endif//SkRecorder_DEFINED |
| OLD | NEW |