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

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

Issue 824013004: Revert of Rename SkDrawPictureCallback to SkPicture::AbortCallback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureData.cpp » ('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 * Copyright 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 8
9 #include "SkPictureFlat.h" 9 #include "SkPictureFlat.h"
10 #include "SkPictureData.h" 10 #include "SkPictureData.h"
11 #include "SkPicturePlayback.h" 11 #include "SkPicturePlayback.h"
12 #include "SkPictureRecord.h" 12 #include "SkPictureRecord.h"
13 #include "SkPictureRecorder.h" 13 #include "SkPictureRecorder.h"
14 14
15 #include "SkBitmapDevice.h" 15 #include "SkBitmapDevice.h"
16 #include "SkCanvas.h" 16 #include "SkCanvas.h"
17 #include "SkChunkAlloc.h" 17 #include "SkChunkAlloc.h"
18 #include "SkDrawPictureCallback.h"
18 #include "SkMessageBus.h" 19 #include "SkMessageBus.h"
19 #include "SkPaintPriv.h" 20 #include "SkPaintPriv.h"
20 #include "SkPathEffect.h" 21 #include "SkPathEffect.h"
21 #include "SkPicture.h" 22 #include "SkPicture.h"
22 #include "SkRegion.h" 23 #include "SkRegion.h"
23 #include "SkShader.h" 24 #include "SkShader.h"
24 #include "SkStream.h" 25 #include "SkStream.h"
25 #include "SkTDArray.h" 26 #include "SkTDArray.h"
26 #include "SkTLogic.h" 27 #include "SkTLogic.h"
27 #include "SkTSearch.h" 28 #include "SkTSearch.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 int32_t id = sk_atomic_inc(&gNextID); 303 int32_t id = sk_atomic_inc(&gNextID);
303 if (id >= 1 << (8 * sizeof(Domain))) { 304 if (id >= 1 << (8 * sizeof(Domain))) {
304 SK_CRASH(); 305 SK_CRASH();
305 } 306 }
306 307
307 return static_cast<Domain>(id); 308 return static_cast<Domain>(id);
308 } 309 }
309 310
310 /////////////////////////////////////////////////////////////////////////////// 311 ///////////////////////////////////////////////////////////////////////////////
311 312
312 void SkPicture::playback(SkCanvas* canvas, AbortCallback* callback) const { 313 void SkPicture::playback(SkCanvas* canvas, SkDrawPictureCallback* callback) cons t {
313 SkASSERT(canvas); 314 SkASSERT(canvas);
314 315
315 // If the query contains the whole picture, don't bother with the BBH. 316 // If the query contains the whole picture, don't bother with the BBH.
316 SkRect clipBounds = { 0, 0, 0, 0 }; 317 SkRect clipBounds = { 0, 0, 0, 0 };
317 (void)canvas->getClipBounds(&clipBounds); 318 (void)canvas->getClipBounds(&clipBounds);
318 const bool useBBH = !clipBounds.contains(this->cullRect()); 319 const bool useBBH = !clipBounds.contains(this->cullRect());
319 320
320 SkRecordDraw(*fRecord, canvas, this->drawablePicts(), NULL, this->drawableCo unt(), 321 SkRecordDraw(*fRecord, canvas, this->drawablePicts(), NULL, this->drawableCo unt(),
321 useBBH ? fBBH.get() : NULL, callback); 322 useBBH ? fBBH.get() : NULL, callback);
322 } 323 }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 498
498 SkPicture::SkPicture(const SkRect& cullRect, SkRecord* record, SnapshotArray* dr awablePicts, 499 SkPicture::SkPicture(const SkRect& cullRect, SkRecord* record, SnapshotArray* dr awablePicts,
499 SkBBoxHierarchy* bbh) 500 SkBBoxHierarchy* bbh)
500 : fUniqueID(next_picture_generation_id()) 501 : fUniqueID(next_picture_generation_id())
501 , fCullRect(cullRect) 502 , fCullRect(cullRect)
502 , fRecord(SkRef(record)) 503 , fRecord(SkRef(record))
503 , fBBH(SkSafeRef(bbh)) 504 , fBBH(SkSafeRef(bbh))
504 , fDrawablePicts(drawablePicts) // take ownership 505 , fDrawablePicts(drawablePicts) // take ownership
505 , fAnalysis(*fRecord) 506 , fAnalysis(*fRecord)
506 {} 507 {}
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698