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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1967513002: Revert of Replace GrStrokeInfo with GrStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@resscale
Patch Set: Created 4 years, 7 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/GrTestUtils.cpp ('k') | src/gpu/SkGpuDevice_drawTexture.cpp » ('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 a0f81e7ed9265a529b201d861aae0d9daf1d3cd8..ba5848b4b11996b40e3fe974f27802b76b85bc81 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -15,7 +15,7 @@
#include "GrImageIDTextureAdjuster.h"
#include "GrLayerHoister.h"
#include "GrRecordReplaceDraw.h"
-#include "GrStyle.h"
+#include "GrStrokeInfo.h"
#include "GrTracing.h"
#include "SkCanvasPriv.h"
#include "SkErrorInternals.h"
@@ -454,7 +454,7 @@
}
if (paint.getPathEffect() && 2 == count && SkCanvas::kLines_PointMode == mode) {
- GrStyle style(paint, SkPaint::kStroke_Style);
+ GrStrokeInfo strokeInfo(paint, SkPaint::kStroke_Style);
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), paint, *draw.fMatrix,
this->surfaceProps().isGammaCorrect(), &grPaint)) {
@@ -464,7 +464,7 @@
path.setIsVolatile(true);
path.moveTo(pts[0]);
path.lineTo(pts[1]);
- fDrawContext->drawPath(fClip, grPaint, *draw.fMatrix, path, style);
+ fDrawContext->drawPath(fClip, grPaint, *draw.fMatrix, path, strokeInfo);
return;
}
@@ -535,8 +535,9 @@
return;
}
- GrStyle style(paint);
- fDrawContext->drawRect(fClip, grPaint, *draw.fMatrix, rect, &style);
+ GrStrokeInfo strokeInfo(paint);
+
+ fDrawContext->drawRect(fClip, grPaint, *draw.fMatrix, rect, &strokeInfo);
}
///////////////////////////////////////////////////////////////////////////////
@@ -553,7 +554,7 @@
return;
}
- GrStyle style(paint);
+ GrStrokeInfo strokeInfo(paint);
if (paint.getMaskFilter()) {
// try to hit the fast path for drawing filtered round rects
@@ -576,7 +577,7 @@
&grPaint,
fClip,
*draw.fMatrix,
- style.strokeRec(),
+ strokeInfo,
devRRect)) {
return;
}
@@ -586,7 +587,7 @@
}
}
- if (paint.getMaskFilter() || style.pathEffect()) {
+ if (paint.getMaskFilter() || paint.getPathEffect()) {
// The only mask filter the native rrect drawing code could've handle was taken
// care of above.
// A path effect will presumably transform this rrect into something else.
@@ -600,9 +601,9 @@
return;
}
- SkASSERT(!style.pathEffect());
-
- fDrawContext->drawRRect(fClip, grPaint, *draw.fMatrix, rect, style);
+ SkASSERT(!strokeInfo.isDashed());
+
+ fDrawContext->drawRRect(fClip, grPaint, *draw.fMatrix, rect, strokeInfo);
}
@@ -674,7 +675,10 @@
return;
}
- fDrawContext->drawOval(fClip, grPaint, *draw.fMatrix, oval, GrStyle(paint));
+ GrStrokeInfo strokeInfo(paint);
+ SkASSERT(!strokeInfo.isDashed());
+
+ fDrawContext->drawOval(fClip, grPaint, *draw.fMatrix, oval, strokeInfo);
}
#include "SkMaskFilter.h"
« no previous file with comments | « src/gpu/GrTestUtils.cpp ('k') | src/gpu/SkGpuDevice_drawTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698