OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkPaintFilterCanvas.h" | 8 #include "SkPaintFilterCanvas.h" |
9 | 9 |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 void SkPaintFilterCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { | 83 void SkPaintFilterCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { |
84 AutoPaintFilter apf(this, kOval_Type, paint); | 84 AutoPaintFilter apf(this, kOval_Type, paint); |
85 if (apf.shouldDraw()) { | 85 if (apf.shouldDraw()) { |
86 this->INHERITED::onDrawOval(rect, *apf.paint()); | 86 this->INHERITED::onDrawOval(rect, *apf.paint()); |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
| 90 void SkPaintFilterCanvas::onDrawArc(const SkRect& rect, SkScalar startAngle, SkS
calar sweepAngle, |
| 91 bool useCenter, const SkPaint& paint) { |
| 92 AutoPaintFilter apf(this, kArc_Type, paint); |
| 93 if (apf.shouldDraw()) { |
| 94 this->INHERITED::onDrawArc(rect, startAngle, sweepAngle, useCenter, *apf
.paint()); |
| 95 } |
| 96 } |
| 97 |
90 void SkPaintFilterCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { | 98 void SkPaintFilterCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { |
91 AutoPaintFilter apf(this, kPath_Type, paint); | 99 AutoPaintFilter apf(this, kPath_Type, paint); |
92 if (apf.shouldDraw()) { | 100 if (apf.shouldDraw()) { |
93 this->INHERITED::onDrawPath(path, *apf.paint()); | 101 this->INHERITED::onDrawPath(path, *apf.paint()); |
94 } | 102 } |
95 } | 103 } |
96 | 104 |
97 void SkPaintFilterCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScal
ar top, | 105 void SkPaintFilterCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScal
ar top, |
98 const SkPaint* paint) { | 106 const SkPaint* paint) { |
99 AutoPaintFilter apf(this, kBitmap_Type, paint); | 107 AutoPaintFilter apf(this, kBitmap_Type, paint); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 } | 221 } |
214 } | 222 } |
215 | 223 |
216 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS
calar y, | 224 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS
calar y, |
217 const SkPaint& paint) { | 225 const SkPaint& paint) { |
218 AutoPaintFilter apf(this, kTextBlob_Type, paint); | 226 AutoPaintFilter apf(this, kTextBlob_Type, paint); |
219 if (apf.shouldDraw()) { | 227 if (apf.shouldDraw()) { |
220 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); | 228 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); |
221 } | 229 } |
222 } | 230 } |
OLD | NEW |