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

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 794843002: Revert of Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: Created 6 years 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/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 0007e33b7fb3100cdc9dce1644d46e792a85596f..44782dd2797aad2c3b1233b42b929900956e2d89 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -596,8 +596,8 @@
return true;
}
- virtual void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE {
- out->setUnknownSingleComponent();
+ virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE {
+ inout->mulByUnknownAlpha();
}
const GrAttribute* fInPosition;
@@ -679,7 +679,8 @@
// Our computed verts should all be within one pixel of the segment control points.
devBounds.outset(SK_Scalar1, SK_Scalar1);
- SkAutoTUnref<GrGeometryProcessor> quadProcessor(QuadEdgeEffect::Create(color));
+ GrGeometryProcessor* quadProcessor = QuadEdgeEffect::Create(color);
+ drawState->setGeometryProcessor(quadProcessor)->unref();
GrDrawTarget::AutoReleaseGeometry arg(target, vCount, quadProcessor->getVertexStride(), iCount);
SkASSERT(quadProcessor->getVertexStride() == sizeof(QuadVertex));
@@ -708,7 +709,6 @@
for (int i = 0; i < draws.count(); ++i) {
const Draw& draw = draws[i];
target->drawIndexed(drawState,
- quadProcessor,
kTriangles_GrPrimitiveType,
vOffset, // start vertex
0, // start index
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698