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

Unified Diff: gm/convexpolyeffect.cpp

Issue 1264283004: Revert of Use new API everywhere for GrDefaultGeoProcFactory (Closed) Base URL: https://skia.googlesource.com/skia.git@lccleanup2
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/convexpolyeffect.cpp
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 1599e7a65d36153f8aaacafd204cd6fd82e035ac..9891f87215dc3752e00b0d8adfc37fd15b1e2e47 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -147,7 +147,6 @@
}
void onDraw(SkCanvas* canvas) override {
- using namespace GrDefaultGeoProcFactory;
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
if (NULL == rt) {
this->drawGpuOnlyMessage(canvas);
@@ -158,11 +157,10 @@
return;
}
- Color color(0xff000000);
- Coverage coverage(Coverage::kSolid_Type);
- LocalCoords localCoords(LocalCoords::kUnused_Type);
+ static const GrColor color = 0xff000000;
SkAutoTUnref<const GrGeometryProcessor> gp(
- GrDefaultGeoProcFactory::Create(color, coverage, localCoords, SkMatrix::I()));
+ GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPosition_GPType, color,
+ false, false));
SkScalar y = 0;
for (SkTLList<SkPath>::Iter iter(fPaths, SkTLList<SkPath>::Iter::kHead_IterStart);
@@ -193,7 +191,7 @@
pipelineBuilder.setRenderTarget(rt);
ConvexPolyTestBatch::Geometry geometry;
- geometry.fColor = color.fColor;
+ geometry.fColor = color;
geometry.fBounds = p.getBounds();
SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry));
@@ -242,7 +240,7 @@
pipelineBuilder.setRenderTarget(rt);
ConvexPolyTestBatch::Geometry geometry;
- geometry.fColor = color.fColor;
+ geometry.fColor = color;
geometry.fBounds = rect;
SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry));
« no previous file with comments | « no previous file | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698