Plumb GrContext everywhere
There is no good way to split the monster CL up. This breaks out
the GrContext plumbing but doesn't use it.
Change-Id: I90856d428d372bcec3f8821e6364667b367927d4
Reviewed-on: https://skia-review.googlesource.com/133382
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index f94f527..3237afe 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -744,10 +744,12 @@
public:
DEFINE_OP_CLASS_ID
- static std::unique_ptr<GrDrawOp> Make(GrPaint&& paint, const SkMatrix& viewMatrix,
+ static std::unique_ptr<GrDrawOp> Make(GrContext* context,
+ GrPaint&& paint,
+ const SkMatrix& viewMatrix,
const SkPath& path,
const GrUserStencilSettings* stencilSettings) {
- return Helper::FactoryHelper<AAConvexPathOp>(std::move(paint), viewMatrix, path,
+ return Helper::FactoryHelper<AAConvexPathOp>(context, std::move(paint), viewMatrix, path,
stencilSettings);
}
@@ -977,7 +979,8 @@
SkPath path;
args.fShape->asPath(&path);
- std::unique_ptr<GrDrawOp> op = AAConvexPathOp::Make(std::move(args.fPaint), *args.fViewMatrix,
+ std::unique_ptr<GrDrawOp> op = AAConvexPathOp::Make(args.fContext, std::move(args.fPaint),
+ *args.fViewMatrix,
path, args.fUserStencilSettings);
args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op));
return true;
@@ -991,7 +994,7 @@
SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
SkPath path = GrTest::TestPathConvex(random);
const GrUserStencilSettings* stencilSettings = GrGetRandomStencil(random, context);
- return AAConvexPathOp::Make(std::move(paint), viewMatrix, path, stencilSettings);
+ return AAConvexPathOp::Make(context, std::move(paint), viewMatrix, path, stencilSettings);
}
#endif