OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |