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

Side by Side Diff: src/record/SkRecordOpts.cpp

Issue 249253003: Hide SaveFlags from the public SkCanvas API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Suppress the canvas-state GM. Created 6 years, 8 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/record/SkRecordDraw.cpp ('k') | src/record/SkRecorder.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 2014 Google Inc. 2 * Copyright 2014 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 "SkRecordOpts.h" 8 #include "SkRecordOpts.h"
9 9
10 #include "SkRecords.h" 10 #include "SkRecords.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 DOESNT_DRAW(ClipRRect) 66 DOESNT_DRAW(ClipRRect)
67 DOESNT_DRAW(ClipPath) 67 DOESNT_DRAW(ClipPath)
68 DOESNT_DRAW(ClipRegion) 68 DOESNT_DRAW(ClipRegion)
69 DOESNT_DRAW(PairedPushCull) 69 DOESNT_DRAW(PairedPushCull)
70 DOESNT_DRAW(PushCull) 70 DOESNT_DRAW(PushCull)
71 DOESNT_DRAW(PopCull) 71 DOESNT_DRAW(PopCull)
72 #undef DOESNT_DRAW 72 #undef DOESNT_DRAW
73 73
74 template <> 74 template <>
75 void SaveRestoreNooper::operator()(SkRecords::Save* r) { 75 void SaveRestoreNooper::operator()(SkRecords::Save* r) {
76 fSave = SkCanvas::kMatrixClip_SaveFlag == r->flags ? this->index() : kInacti ve; 76 fSave =
77 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS
78 SkCanvas::kMatrixClip_SaveFlag != r->flags ? kInactive :
79 #endif
80 this->index();
77 } 81 }
78 82
79 template <> 83 template <>
80 void SaveRestoreNooper::operator()(SkRecords::Restore* r) { 84 void SaveRestoreNooper::operator()(SkRecords::Restore* r) {
81 if (fSave != kInactive) { 85 if (fSave != kInactive) {
82 // Remove everything between the save and restore, inclusive on both sid es. 86 // Remove everything between the save and restore, inclusive on both sid es.
83 fChanged = true; 87 fChanged = true;
84 SkRecord::Destroyer destroyer; 88 SkRecord::Destroyer destroyer;
85 for (unsigned i = fSave; i <= this->index(); i++) { 89 for (unsigned i = fSave; i <= this->index(); i++) {
86 fRecord->mutate(i, destroyer); 90 fRecord->mutate(i, destroyer);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 StrengthReducer reducer(record); 241 StrengthReducer reducer(record);
238 run_pass(reducer, record); 242 run_pass(reducer, record);
239 } 243 }
240 244
241 void SkRecordBoundDrawPosTextH(SkRecord* record) { 245 void SkRecordBoundDrawPosTextH(SkRecord* record) {
242 TextBounder bounder(record); 246 TextBounder bounder(record);
243 run_pass(bounder, record); 247 run_pass(bounder, record);
244 } 248 }
245 249
246 #undef REPLACE 250 #undef REPLACE
OLDNEW
« no previous file with comments | « src/record/SkRecordDraw.cpp ('k') | src/record/SkRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698