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 #if SK_SUPPORT_GPU | |
9 #include "GrPictureUtils.h" | |
10 #endif | |
11 | |
12 #include "SkPictureRecorder.h" | 8 #include "SkPictureRecorder.h" |
13 #include "SkRecord.h" | 9 #include "SkRecord.h" |
14 #include "SkRecordDraw.h" | 10 #include "SkRecordDraw.h" |
15 #include "SkRecorder.h" | 11 #include "SkRecorder.h" |
16 #include "SkRecordOpts.h" | 12 #include "SkRecordOpts.h" |
17 #include "SkTypes.h" | 13 #include "SkTypes.h" |
18 | 14 |
| 15 // Must place SK_SUPPORT_GPU after other includes so it is defined in the |
| 16 // Android framework build. |
| 17 #if SK_SUPPORT_GPU |
| 18 #include "GrPictureUtils.h" |
| 19 #endif |
| 20 |
19 SkPictureRecorder::SkPictureRecorder() {} | 21 SkPictureRecorder::SkPictureRecorder() {} |
20 | 22 |
21 SkPictureRecorder::~SkPictureRecorder() {} | 23 SkPictureRecorder::~SkPictureRecorder() {} |
22 | 24 |
23 SkCanvas* SkPictureRecorder::beginRecording(SkScalar width, SkScalar height, | 25 SkCanvas* SkPictureRecorder::beginRecording(SkScalar width, SkScalar height, |
24 SkBBHFactory* bbhFactory /* = NULL *
/, | 26 SkBBHFactory* bbhFactory /* = NULL *
/, |
25 uint32_t recordFlags /* = 0 */) { | 27 uint32_t recordFlags /* = 0 */) { |
26 fFlags = recordFlags; | 28 fFlags = recordFlags; |
27 fCullWidth = width; | 29 fCullWidth = width; |
28 fCullHeight = height; | 30 fCullHeight = height; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 81 |
80 return pict; | 82 return pict; |
81 } | 83 } |
82 | 84 |
83 void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { | 85 void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { |
84 if (NULL == canvas) { | 86 if (NULL == canvas) { |
85 return; | 87 return; |
86 } | 88 } |
87 SkRecordDraw(*fRecord, canvas, NULL/*bbh*/, NULL/*callback*/); | 89 SkRecordDraw(*fRecord, canvas, NULL/*bbh*/, NULL/*callback*/); |
88 } | 90 } |
OLD | NEW |