| 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 SkPictureRecorder_DEFINED | 8 #ifndef SkPictureRecorder_DEFINED |
| 9 #define SkPictureRecorder_DEFINED | 9 #define SkPictureRecorder_DEFINED |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class SkCanvasDrawable; | 22 class SkCanvasDrawable; |
| 23 class SkPictureRecord; | 23 class SkPictureRecord; |
| 24 class SkRecord; | 24 class SkRecord; |
| 25 class SkRecorder; | 25 class SkRecorder; |
| 26 | 26 |
| 27 class SK_API SkPictureRecorder : SkNoncopyable { | 27 class SK_API SkPictureRecorder : SkNoncopyable { |
| 28 public: | 28 public: |
| 29 SkPictureRecorder(); | 29 SkPictureRecorder(); |
| 30 ~SkPictureRecorder(); | 30 ~SkPictureRecorder(); |
| 31 | 31 |
| 32 #ifdef SK_LEGACY_PICTURE_SIZE_API | |
| 33 SkCanvas* beginRecording(int width, int height, | |
| 34 SkBBHFactory* bbhFactory = NULL, | |
| 35 uint32_t recordFlags = 0) { | |
| 36 return this->beginRecording(SkIntToScalar(width), SkIntToScalar(height), | |
| 37 bbhFactory, recordFlags); | |
| 38 } | |
| 39 #endif | |
| 40 | |
| 41 enum RecordFlags { | 32 enum RecordFlags { |
| 42 // This flag indicates that, if some BHH is being computed, saveLayer | 33 // This flag indicates that, if some BHH is being computed, saveLayer |
| 43 // information should also be extracted at the same time. | 34 // information should also be extracted at the same time. |
| 44 kComputeSaveLayerInfo_RecordFlag = 0x01 | 35 kComputeSaveLayerInfo_RecordFlag = 0x01 |
| 45 }; | 36 }; |
| 46 | 37 |
| 47 /** Returns the canvas that records the drawing commands. | 38 /** Returns the canvas that records the drawing commands. |
| 48 @param bounds the cull rect used when recording this picture. Any drawin
g the falls outside | 39 @param bounds the cull rect used when recording this picture. Any drawin
g the falls outside |
| 49 of this rect is undefined, and may be drawn or it may not. | 40 of this rect is undefined, and may be drawn or it may not. |
| 50 @param bbhFactory factory to create desired acceleration structure | 41 @param bbhFactory factory to create desired acceleration structure |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 uint32_t fFlags; | 99 uint32_t fFlags; |
| 109 SkRect fCullRect; | 100 SkRect fCullRect; |
| 110 SkAutoTUnref<SkBBoxHierarchy> fBBH; | 101 SkAutoTUnref<SkBBoxHierarchy> fBBH; |
| 111 SkAutoTUnref<SkRecorder> fRecorder; | 102 SkAutoTUnref<SkRecorder> fRecorder; |
| 112 SkAutoTUnref<SkRecord> fRecord; | 103 SkAutoTUnref<SkRecord> fRecord; |
| 113 | 104 |
| 114 typedef SkNoncopyable INHERITED; | 105 typedef SkNoncopyable INHERITED; |
| 115 }; | 106 }; |
| 116 | 107 |
| 117 #endif | 108 #endif |
| OLD | NEW |