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

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

Issue 195793010: Add a means of extracting active operations from SkPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Add EXPERIMENTAL prefix to the new entry point Created 6 years, 9 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 if (NULL == fPlayback) { 241 if (NULL == fPlayback) {
242 if (NULL != fRecord) { 242 if (NULL != fRecord) {
243 fRecord->endRecording(); 243 fRecord->endRecording();
244 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); 244 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord));
245 SkSafeSetNull(fRecord); 245 SkSafeSetNull(fRecord);
246 } 246 }
247 } 247 }
248 SkASSERT(NULL == fRecord); 248 SkASSERT(NULL == fRecord);
249 } 249 }
250 250
251 const SkTDArray<void*>* SkPicture::EXPERIMENTAL_getActiveOps(const SkIRect& que ryRect) {
252 this->endRecording();
253 if (NULL != fPlayback) {
254 return fPlayback->getActiveOps(queryRect);
255 }
256 return NULL;
257 }
258
251 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { 259 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) {
252 this->endRecording(); 260 this->endRecording();
253 if (fPlayback) { 261 if (fPlayback) {
254 fPlayback->draw(*surface, callback); 262 fPlayback->draw(*surface, callback);
255 } 263 }
256 } 264 }
257 265
258 /////////////////////////////////////////////////////////////////////////////// 266 ///////////////////////////////////////////////////////////////////////////////
259 267
260 #include "SkStream.h" 268 #include "SkStream.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 431 }
424 432
425 #ifdef SK_BUILD_FOR_ANDROID 433 #ifdef SK_BUILD_FOR_ANDROID
426 void SkPicture::abortPlayback() { 434 void SkPicture::abortPlayback() {
427 if (NULL == fPlayback) { 435 if (NULL == fPlayback) {
428 return; 436 return;
429 } 437 }
430 fPlayback->abort(); 438 fPlayback->abort();
431 } 439 }
432 #endif 440 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698