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<SkBaseDevice> dev(SkNEW_ARGS(SkBitmapDevice, (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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 } | 345 } |
346 | 346 |
347 #ifdef SK_BUILD_FOR_ANDROID | 347 #ifdef SK_BUILD_FOR_ANDROID |
348 void SkPicture::abortPlayback() { | 348 void SkPicture::abortPlayback() { |
349 if (NULL == fPlayback) { | 349 if (NULL == fPlayback) { |
350 return; | 350 return; |
351 } | 351 } |
352 fPlayback->abort(); | 352 fPlayback->abort(); |
353 } | 353 } |
354 #endif | 354 #endif |
OLD | NEW |