OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkPictureFlat.h" | 10 #include "SkPictureFlat.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 fPlayback = NULL; | 198 fPlayback = NULL; |
199 } | 199 } |
200 | 200 |
201 if (NULL != fRecord) { | 201 if (NULL != fRecord) { |
202 fRecord->unref(); | 202 fRecord->unref(); |
203 fRecord = NULL; | 203 fRecord = NULL; |
204 } | 204 } |
205 | 205 |
206 SkBitmap bm; | 206 SkBitmap bm; |
207 bm.setConfig(SkBitmap::kNo_Config, width, height); | 207 bm.setConfig(SkBitmap::kNo_Config, width, height); |
208 SkAutoTUnref<SkDevice> dev(SkNEW_ARGS(SkDevice, (bm))); | 208 SkAutoTUnref<SkDevice> dev(SkNEW_ARGS(SkRasterDevice, (bm))); |
209 | 209 |
210 // Must be set before calling createBBoxHierarchy | 210 // Must be set before calling createBBoxHierarchy |
211 fWidth = width; | 211 fWidth = width; |
212 fHeight = height; | 212 fHeight = height; |
213 | 213 |
214 if (recordingFlags & kOptimizeForClippedPlayback_RecordingFlag) { | 214 if (recordingFlags & kOptimizeForClippedPlayback_RecordingFlag) { |
215 SkBBoxHierarchy* tree = this->createBBoxHierarchy(); | 215 SkBBoxHierarchy* tree = this->createBBoxHierarchy(); |
216 SkASSERT(NULL != tree); | 216 SkASSERT(NULL != tree); |
217 fRecord = SkNEW_ARGS(SkBBoxHierarchyRecord, (recordingFlags, tree, dev))
; | 217 fRecord = SkNEW_ARGS(SkBBoxHierarchyRecord, (recordingFlags, tree, dev))
; |
218 tree->unref(); | 218 tree->unref(); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 341 } |
342 | 342 |
343 #ifdef SK_BUILD_FOR_ANDROID | 343 #ifdef SK_BUILD_FOR_ANDROID |
344 void SkPicture::abortPlayback() { | 344 void SkPicture::abortPlayback() { |
345 if (NULL == fPlayback) { | 345 if (NULL == fPlayback) { |
346 return; | 346 return; |
347 } | 347 } |
348 fPlayback->abort(); | 348 fPlayback->abort(); |
349 } | 349 } |
350 #endif | 350 #endif |
OLD | NEW |