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

Unified Diff: src/gpu/GrOvalRenderer.cpp

Issue 509153002: Initial change to create GeometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: last warning Created 6 years, 3 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/GrDrawTarget.cpp ('k') | src/gpu/GrRODrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index f368dc8d899c06e02b63128e3db3f9a0b4a1e784..330d4e9289f57ab0ee41153bb12ac9e6796cd71a 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -553,7 +553,7 @@ void GrOvalRenderer::drawCircle(GrDrawTarget* target,
GrEffect* effect = CircleEdgeEffect::Create(isStrokeOnly && innerRadius > 0);
static const int kCircleEdgeAttrIndex = 1;
- drawState->addCoverageEffect(effect, kCircleEdgeAttrIndex)->unref();
+ drawState->setGeometryProcessor(effect, kCircleEdgeAttrIndex)->unref();
// The radii are outset for two reasons. First, it allows the shader to simply perform
// clamp(distance-to-center - radius, 0, 1). Second, the outer radius is used to compute the
@@ -696,7 +696,7 @@ bool GrOvalRenderer::drawEllipse(GrDrawTarget* target,
static const int kEllipseCenterAttrIndex = 1;
static const int kEllipseEdgeAttrIndex = 2;
- drawState->addCoverageEffect(effect, kEllipseCenterAttrIndex, kEllipseEdgeAttrIndex)->unref();
+ drawState->setGeometryProcessor(effect, kEllipseCenterAttrIndex, kEllipseEdgeAttrIndex)->unref();
// Compute the reciprocals of the radii here to save time in the shader
SkScalar xRadRecip = SkScalarInvert(xRadius);
@@ -814,8 +814,8 @@ bool GrOvalRenderer::drawDIEllipse(GrDrawTarget* target,
static const int kEllipseOuterOffsetAttrIndex = 1;
static const int kEllipseInnerOffsetAttrIndex = 2;
- drawState->addCoverageEffect(effect, kEllipseOuterOffsetAttrIndex,
- kEllipseInnerOffsetAttrIndex)->unref();
+ drawState->setGeometryProcessor(effect, kEllipseOuterOffsetAttrIndex,
+ kEllipseInnerOffsetAttrIndex)->unref();
// This expands the outer rect so that after CTM we end up with a half-pixel border
SkScalar a = vm[SkMatrix::kMScaleX];
@@ -1063,7 +1063,7 @@ bool GrOvalRenderer::drawRRect(GrDrawTarget* target, GrContext* context, bool us
GrEffect* effect = CircleEdgeEffect::Create(isStrokeOnly);
static const int kCircleEdgeAttrIndex = 1;
- drawState->addCoverageEffect(effect, kCircleEdgeAttrIndex)->unref();
+ drawState->setGeometryProcessor(effect, kCircleEdgeAttrIndex)->unref();
// The radii are outset for two reasons. First, it allows the shader to simply perform
// clamp(distance-to-center - radius, 0, 1). Second, the outer radius is used to compute the
@@ -1168,8 +1168,9 @@ bool GrOvalRenderer::drawRRect(GrDrawTarget* target, GrContext* context, bool us
GrEffect* effect = EllipseEdgeEffect::Create(isStrokeOnly);
static const int kEllipseOffsetAttrIndex = 1;
static const int kEllipseRadiiAttrIndex = 2;
- drawState->addCoverageEffect(effect,
- kEllipseOffsetAttrIndex, kEllipseRadiiAttrIndex)->unref();
+ drawState->setGeometryProcessor(effect,
+ kEllipseOffsetAttrIndex,
+ kEllipseRadiiAttrIndex)->unref();
// Compute the reciprocals of the radii here to save time in the shader
SkScalar xRadRecip = SkScalarInvert(xRadius);
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrRODrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698