OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
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 #include "SkNWayCanvas.h" | 8 #include "SkNWayCanvas.h" |
9 | 9 |
10 SkNWayCanvas::SkNWayCanvas(int width, int height) | 10 SkNWayCanvas::SkNWayCanvas(int width, int height) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 private: | 54 private: |
55 const SkTDArray<SkCanvas*>& fList; | 55 const SkTDArray<SkCanvas*>& fList; |
56 int fIndex; | 56 int fIndex; |
57 SkCanvas* fCanvas; | 57 SkCanvas* fCanvas; |
58 }; | 58 }; |
59 | 59 |
60 void SkNWayCanvas::willSave(SaveFlags flags) { | 60 void SkNWayCanvas::willSave(SaveFlags flags) { |
61 Iter iter(fList); | 61 Iter iter(fList); |
62 while (iter.next()) { | 62 while (iter.next()) { |
63 iter->save(flags); | 63 iter->save( |
| 64 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 65 flags |
| 66 #endif |
| 67 ); |
64 } | 68 } |
65 | 69 |
66 this->INHERITED::willSave(flags); | 70 this->INHERITED::willSave(flags); |
67 } | 71 } |
68 | 72 |
69 SkCanvas::SaveLayerStrategy SkNWayCanvas::willSaveLayer(const SkRect* bounds, co
nst SkPaint* paint, | 73 SkCanvas::SaveLayerStrategy SkNWayCanvas::willSaveLayer(const SkRect* bounds, co
nst SkPaint* paint, |
70 SaveFlags flags) { | 74 SaveFlags flags) { |
71 Iter iter(fList); | 75 Iter iter(fList); |
72 while (iter.next()) { | 76 while (iter.next()) { |
73 iter->saveLayer(bounds, paint, flags); | 77 iter->saveLayer(bounds, paint |
| 78 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 79 , flags |
| 80 #endif |
| 81 ); |
74 } | 82 } |
75 | 83 |
76 this->INHERITED::willSaveLayer(bounds, paint, flags); | 84 this->INHERITED::willSaveLayer(bounds, paint, flags); |
77 // No need for a layer. | 85 // No need for a layer. |
78 return kNoLayer_SaveLayerStrategy; | 86 return kNoLayer_SaveLayerStrategy; |
79 } | 87 } |
80 | 88 |
81 void SkNWayCanvas::willRestore() { | 89 void SkNWayCanvas::willRestore() { |
82 Iter iter(fList); | 90 Iter iter(fList); |
83 while (iter.next()) { | 91 while (iter.next()) { |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 iter->addComment(kywd, value); | 328 iter->addComment(kywd, value); |
321 } | 329 } |
322 } | 330 } |
323 | 331 |
324 void SkNWayCanvas::endCommentGroup() { | 332 void SkNWayCanvas::endCommentGroup() { |
325 Iter iter(fList); | 333 Iter iter(fList); |
326 while (iter.next()) { | 334 while (iter.next()) { |
327 iter->endCommentGroup(); | 335 iter->endCommentGroup(); |
328 } | 336 } |
329 } | 337 } |
OLD | NEW |