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

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

Issue 214953003: split SkPictureRecorder out of SkPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: update to ToT (again) Created 6 years, 8 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
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"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 283 }
284 SkASSERT(NULL == fRecord); 284 SkASSERT(NULL == fRecord);
285 } 285 }
286 286
287 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { 287 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() {
288 static OperationList gInvalid; 288 static OperationList gInvalid;
289 return gInvalid; 289 return gInvalid;
290 } 290 }
291 291
292 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe ct& queryRect) { 292 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe ct& queryRect) {
293 this->endRecording(); 293 this->endRecording(); // TODO: remove eventually
294 if (NULL != fPlayback) { 294 if (NULL != fPlayback) {
295 return fPlayback->getActiveOps(queryRect); 295 return fPlayback->getActiveOps(queryRect);
296 } 296 }
297 return OperationList::InvalidList(); 297 return OperationList::InvalidList();
298 } 298 }
299 299
300 size_t SkPicture::EXPERIMENTAL_curOpID() const { 300 size_t SkPicture::EXPERIMENTAL_curOpID() const {
301 if (NULL != fPlayback) { 301 if (NULL != fPlayback) {
302 return fPlayback->curOpID(); 302 return fPlayback->curOpID();
303 } 303 }
304 return 0; 304 return 0;
305 } 305 }
306 306
307 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { 307 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) {
308 this->endRecording(); 308 this->endRecording(); // TODO: remove eventually
309 if (NULL != fPlayback) { 309 if (NULL != fPlayback) {
310 fPlayback->draw(*surface, callback); 310 fPlayback->draw(*surface, callback);
311 } 311 }
312 } 312 }
313 313
314 /////////////////////////////////////////////////////////////////////////////// 314 ///////////////////////////////////////////////////////////////////////////////
315 315
316 #include "SkStream.h" 316 #include "SkStream.h"
317 317
318 static const char kMagic[] = { 's', 'k', 'i', 'a', 'p', 'i', 'c', 't' }; 318 static const char kMagic[] = { 's', 'k', 'i', 'a', 'p', 'i', 'c', 't' };
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 if (NULL != fRecord) { 514 if (NULL != fRecord) {
515 SkASSERT(NULL == fPlayback); 515 SkASSERT(NULL == fPlayback);
516 return SK_InvalidGenID; 516 return SK_InvalidGenID;
517 } 517 }
518 518
519 if (SK_InvalidGenID == fUniqueID) { 519 if (SK_InvalidGenID == fUniqueID) {
520 fUniqueID = next_picture_generation_id(); 520 fUniqueID = next_picture_generation_id();
521 } 521 }
522 return fUniqueID; 522 return fUniqueID;
523 } 523 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698