Use new API everywhere for GrDefaultGeoProcFactory
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/801823b3d825d96baadeb9077c5ed1a8ada05cf2
Review URL: https://codereview.chromium.org/1261083003
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 9891f87..1599e7a 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -147,6 +147,7 @@
}
void onDraw(SkCanvas* canvas) override {
+ using namespace GrDefaultGeoProcFactory;
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
if (NULL == rt) {
this->drawGpuOnlyMessage(canvas);
@@ -157,10 +158,11 @@
return;
}
- static const GrColor color = 0xff000000;
+ Color color(0xff000000);
+ Coverage coverage(Coverage::kSolid_Type);
+ LocalCoords localCoords(LocalCoords::kUnused_Type);
SkAutoTUnref<const GrGeometryProcessor> gp(
- GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPosition_GPType, color,
- false, false));
+ GrDefaultGeoProcFactory::Create(color, coverage, localCoords, SkMatrix::I()));
SkScalar y = 0;
for (SkTLList<SkPath>::Iter iter(fPaths, SkTLList<SkPath>::Iter::kHead_IterStart);
@@ -191,7 +193,7 @@
pipelineBuilder.setRenderTarget(rt);
ConvexPolyTestBatch::Geometry geometry;
- geometry.fColor = color;
+ geometry.fColor = color.fColor;
geometry.fBounds = p.getBounds();
SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry));
@@ -240,7 +242,7 @@
pipelineBuilder.setRenderTarget(rt);
ConvexPolyTestBatch::Geometry geometry;
- geometry.fColor = color;
+ geometry.fColor = color.fColor;
geometry.fBounds = rect;
SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry));