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

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

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 | « src/core/SkPicture.cpp ('k') | src/core/SkPictureRecord.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 #ifndef SkPictureRecord_DEFINED 8 #ifndef SkPictureRecord_DEFINED
9 #define SkPictureRecord_DEFINED 9 #define SkPictureRecord_DEFINED
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 fRecordFlags = recordFlags; 96 fRecordFlags = recordFlags;
97 } 97 }
98 98
99 const SkWriter32& writeStream() const { 99 const SkWriter32& writeStream() const {
100 return fWriter; 100 return fWriter;
101 } 101 }
102 102
103 void beginRecording(); 103 void beginRecording();
104 void endRecording(); 104 void endRecording();
105 105
106 void internalOnly_EnableOpts(bool optsEnabled) {
107 fOptsEnabled = optsEnabled;
108 }
109
106 private: 110 private:
107 void handleOptimization(int opt); 111 void handleOptimization(int opt);
108 int recordRestoreOffsetPlaceholder(SkRegion::Op); 112 int recordRestoreOffsetPlaceholder(SkRegion::Op);
109 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffse t); 113 void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffse t);
110 114
111 #ifndef SK_COLLAPSE_MATRIX_CLIP_STATE 115 #ifndef SK_COLLAPSE_MATRIX_CLIP_STATE
112 SkTDArray<int32_t> fRestoreOffsetStack; 116 SkTDArray<int32_t> fRestoreOffsetStack;
113 int fFirstSavedLayerIndex; 117 int fFirstSavedLayerIndex;
114 enum { 118 enum {
115 kNoSavedLayerIndex = -1 119 kNoSavedLayerIndex = -1
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 284
281 SkPaintDictionary fPaints; 285 SkPaintDictionary fPaints;
282 286
283 SkPathHeap* fPathHeap; // reference counted 287 SkPathHeap* fPathHeap; // reference counted
284 SkWriter32 fWriter; 288 SkWriter32 fWriter;
285 289
286 // we ref each item in these arrays 290 // we ref each item in these arrays
287 SkTDArray<SkPicture*> fPictureRefs; 291 SkTDArray<SkPicture*> fPictureRefs;
288 292
289 uint32_t fRecordFlags; 293 uint32_t fRecordFlags;
290 int fInitialSaveCount; 294 bool fOptsEnabled;
295 int fInitialSaveCount;
291 296
292 friend class SkPicturePlayback; 297 friend class SkPicturePlayback;
293 friend class SkPictureTester; // for unit testing 298 friend class SkPictureTester; // for unit testing
294 299
295 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE 300 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
296 SkMatrixClipStateMgr fMCMgr; 301 SkMatrixClipStateMgr fMCMgr;
297 #endif 302 #endif
298 303
299 typedef SkCanvas INHERITED; 304 typedef SkCanvas INHERITED;
300 }; 305 };
301 306
302 #endif 307 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698