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

Side by Side Diff: src/utils/SkPaintFilterCanvas.cpp

Issue 2257023003: Plumb drawArc to SkDevice (Closed) Base URL: https://chromium.googlesource.com/skia.git@distance
Patch Set: Address comments Created 4 years, 4 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
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/SkShadowPaintFilterCanvas.h » ('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 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
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
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 }
OLDNEW
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/SkShadowPaintFilterCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698