Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/core/SkPicture.cpp

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updating to ToT (10994) Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkDeviceImageFilterProxy.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "SkPicturePlayback.h" 11 #include "SkPicturePlayback.h"
12 #include "SkPictureRecord.h" 12 #include "SkPictureRecord.h"
13 13
14 #include "SkBitmapDevice.h"
14 #include "SkCanvas.h" 15 #include "SkCanvas.h"
15 #include "SkChunkAlloc.h" 16 #include "SkChunkAlloc.h"
16 #include "SkDevice.h"
17 #include "SkPicture.h" 17 #include "SkPicture.h"
18 #include "SkRegion.h" 18 #include "SkRegion.h"
19 #include "SkStream.h" 19 #include "SkStream.h"
20 #include "SkTDArray.h" 20 #include "SkTDArray.h"
21 #include "SkTSearch.h" 21 #include "SkTSearch.h"
22 #include "SkTime.h" 22 #include "SkTime.h"
23 23
24 #include "SkReader32.h" 24 #include "SkReader32.h"
25 #include "SkWriter32.h" 25 #include "SkWriter32.h"
26 #include "SkRTree.h" 26 #include "SkRTree.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 } 346 }
347 347
348 #ifdef SK_BUILD_FOR_ANDROID 348 #ifdef SK_BUILD_FOR_ANDROID
349 void SkPicture::abortPlayback() { 349 void SkPicture::abortPlayback() {
350 if (NULL == fPlayback) { 350 if (NULL == fPlayback) {
351 return; 351 return;
352 } 352 }
353 fPlayback->abort(); 353 fPlayback->abort();
354 } 354 }
355 #endif 355 #endif
OLDNEW
« no previous file with comments | « src/core/SkDeviceImageFilterProxy.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698