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

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

Issue 203333005: Revert of r13836 due to Chromium cc_unittests failures (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicturePlayback.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"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (NULL == fPlayback) { 257 if (NULL == fPlayback) {
258 if (NULL != fRecord) { 258 if (NULL != fRecord) {
259 fRecord->endRecording(); 259 fRecord->endRecording();
260 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); 260 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord));
261 SkSafeSetNull(fRecord); 261 SkSafeSetNull(fRecord);
262 } 262 }
263 } 263 }
264 SkASSERT(NULL == fRecord); 264 SkASSERT(NULL == fRecord);
265 } 265 }
266 266
267 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() {
268 static OperationList gInvalid;
269 return gInvalid;
270 }
271
272 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe ct& queryRect) {
273 this->endRecording();
274 if (NULL != fPlayback) {
275 return fPlayback->getActiveOps(queryRect);
276 }
277 return OperationList::InvalidList();
278 }
279
280 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { 267 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) {
281 this->endRecording(); 268 this->endRecording();
282 if (NULL != fPlayback) { 269 if (NULL != fPlayback) {
283 fPlayback->draw(*surface, callback); 270 fPlayback->draw(*surface, callback);
284 } 271 }
285 } 272 }
286 273
287 /////////////////////////////////////////////////////////////////////////////// 274 ///////////////////////////////////////////////////////////////////////////////
288 275
289 #include "SkStream.h" 276 #include "SkStream.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 442 }
456 443
457 #ifdef SK_BUILD_FOR_ANDROID 444 #ifdef SK_BUILD_FOR_ANDROID
458 void SkPicture::abortPlayback() { 445 void SkPicture::abortPlayback() {
459 if (NULL == fPlayback) { 446 if (NULL == fPlayback) {
460 return; 447 return;
461 } 448 }
462 fPlayback->abort(); 449 fPlayback->abort();
463 } 450 }
464 #endif 451 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicturePlayback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698