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

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

Issue 1269093002: remove SkDeferredCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « samplecode/SampleApp.cpp ('k') | src/utils/SkDeferredCanvas.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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 #include "SkPictureRecord.h" 8 #include "SkPictureRecord.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkImage_Base.h" 10 #include "SkImage_Base.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 UNPACK_8_24(peek, op, *size); 202 UNPACK_8_24(peek, op, *size);
203 if (MASK_24 == *size) { 203 if (MASK_24 == *size) {
204 // size required its own slot right after the op code 204 // size required its own slot right after the op code
205 *size = writer->readTAt<uint32_t>(offset + kUInt32Size); 205 *size = writer->readTAt<uint32_t>(offset + kUInt32Size);
206 } 206 }
207 return (DrawType) op; 207 return (DrawType) op;
208 } 208 }
209 #endif//SK_DEBUG 209 #endif//SK_DEBUG
210 210
211 void SkPictureRecord::willRestore() { 211 void SkPictureRecord::willRestore() {
212 // FIXME: SkDeferredCanvas needs to be refactored to respect
213 // save/restore balancing so that the following test can be
214 // turned on permanently.
215 #if 0 212 #if 0
216 SkASSERT(fRestoreOffsetStack.count() > 1); 213 SkASSERT(fRestoreOffsetStack.count() > 1);
217 #endif 214 #endif
218 215
219 // check for underflow 216 // check for underflow
220 if (fRestoreOffsetStack.count() == 0) { 217 if (fRestoreOffsetStack.count() == 0) {
221 return; 218 return;
222 } 219 }
223 220
224 this->recordRestore(); 221 this->recordRestore();
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 void SkPictureRecord::addTextBlob(const SkTextBlob *blob) { 1061 void SkPictureRecord::addTextBlob(const SkTextBlob *blob) {
1065 int index = fTextBlobRefs.count(); 1062 int index = fTextBlobRefs.count();
1066 *fTextBlobRefs.append() = blob; 1063 *fTextBlobRefs.append() = blob;
1067 blob->ref(); 1064 blob->ref();
1068 // follow the convention of recording a 1-based index 1065 // follow the convention of recording a 1-based index
1069 this->addInt(index + 1); 1066 this->addInt(index + 1);
1070 } 1067 }
1071 1068
1072 /////////////////////////////////////////////////////////////////////////////// 1069 ///////////////////////////////////////////////////////////////////////////////
1073 1070
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698