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

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

Issue 186813003: Refactor method used to disable peephole optimizations (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/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"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } else { 136 } else {
137 fPlayback = NULL; 137 fPlayback = NULL;
138 } 138 }
139 } 139 }
140 140
141 SkPicture::~SkPicture() { 141 SkPicture::~SkPicture() {
142 SkSafeUnref(fRecord); 142 SkSafeUnref(fRecord);
143 SkDELETE(fPlayback); 143 SkDELETE(fPlayback);
144 } 144 }
145 145
146 void SkPicture::internalOnly_EnableOpts(bool enableOpts) {
147 if (NULL != fRecord) {
148 fRecord->internalOnly_EnableOpts(enableOpts);
149 }
150 }
151
146 void SkPicture::swap(SkPicture& other) { 152 void SkPicture::swap(SkPicture& other) {
147 SkTSwap(fRecord, other.fRecord); 153 SkTSwap(fRecord, other.fRecord);
148 SkTSwap(fPlayback, other.fPlayback); 154 SkTSwap(fPlayback, other.fPlayback);
149 SkTSwap(fWidth, other.fWidth); 155 SkTSwap(fWidth, other.fWidth);
150 SkTSwap(fHeight, other.fHeight); 156 SkTSwap(fHeight, other.fHeight);
151 } 157 }
152 158
153 SkPicture* SkPicture::clone() const { 159 SkPicture* SkPicture::clone() const {
154 SkPicture* clonedPicture = SkNEW(SkPicture); 160 SkPicture* clonedPicture = SkNEW(SkPicture);
155 clone(clonedPicture, 1); 161 clone(clonedPicture, 1);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 430 }
425 431
426 #ifdef SK_BUILD_FOR_ANDROID 432 #ifdef SK_BUILD_FOR_ANDROID
427 void SkPicture::abortPlayback() { 433 void SkPicture::abortPlayback() {
428 if (NULL == fPlayback) { 434 if (NULL == fPlayback) {
429 return; 435 return;
430 } 436 }
431 fPlayback->abort(); 437 fPlayback->abort();
432 } 438 }
433 #endif 439 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698