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)); |