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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 2125663003: Add gm that tests shaded stroked rectangles. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixgmwidth
Patch Set: fix windows double->scalar warning Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 2759a3e1854eef55d2227954acad41ba88f23f55..f6851f18126bd120b436ed5ec6f1bda2b7aa87a7 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -516,24 +516,9 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, const SkPaint
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawRect", fContext);
CHECK_SHOULD_DRAW(draw);
- bool doStroke = paint.getStyle() != SkPaint::kFill_Style;
- SkScalar width = paint.getStrokeWidth();
-
- /*
- We have special code for hairline strokes, miter-strokes, bevel-stroke
- and fills. Anything else we just call our path code.
- */
- bool usePath = doStroke && width > 0 &&
- (paint.getStrokeJoin() == SkPaint::kRound_Join ||
- (paint.getStrokeJoin() == SkPaint::kBevel_Join && rect.isEmpty()));
-
- // a few other reasons we might need to call drawPath...
- if (paint.getMaskFilter() || paint.getPathEffect() ||
- paint.getStyle() == SkPaint::kStrokeAndFill_Style) { // we can't both stroke and fill rects
- usePath = true;
- }
- if (usePath) {
+ // A couple reasons we might need to call drawPath.
+ if (paint.getMaskFilter() || paint.getPathEffect()) {
SkPath path;
path.setIsVolatile(true);
path.addRect(rect);
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698