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/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index 02520c1..5659099 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -135,7 +135,8 @@
public:
DEFINE_OP_CLASS_ID
- static std::unique_ptr<GrDrawOp> Make(GrPaint&& paint,
+ static std::unique_ptr<GrDrawOp> Make(GrContext* context,
+ GrPaint&& paint,
const SkMatrix& viewMatrix,
const SkPath& path,
SkScalar strokeWidth,
@@ -143,7 +144,8 @@
SkPaint::Join join,
SkScalar miterLimit,
const GrUserStencilSettings* stencilSettings) {
- return Helper::FactoryHelper<AAFlatteningConvexPathOp>(std::move(paint), viewMatrix, path,
+ return Helper::FactoryHelper<AAFlatteningConvexPathOp>(context, std::move(paint),
+ viewMatrix, path,
strokeWidth, style, join, miterLimit,
stencilSettings);
}
@@ -361,8 +363,8 @@
SkScalar miterLimit = stroke.getMiter();
std::unique_ptr<GrDrawOp> op = AAFlatteningConvexPathOp::Make(
- std::move(args.fPaint), *args.fViewMatrix, path, strokeWidth, stroke.getStyle(), join,
- miterLimit, args.fUserStencilSettings);
+ args.fContext, std::move(args.fPaint), *args.fViewMatrix, path, strokeWidth,
+ stroke.getStyle(), join, miterLimit, args.fUserStencilSettings);
args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op));
return true;
}
@@ -395,8 +397,8 @@
miterLimit = random->nextRangeF(0.5f, 2.0f);
}
const GrUserStencilSettings* stencilSettings = GrGetRandomStencil(random, context);
- return AAFlatteningConvexPathOp::Make(std::move(paint), viewMatrix, path, strokeWidth, style,
- join, miterLimit, stencilSettings);
+ return AAFlatteningConvexPathOp::Make(context, std::move(paint), viewMatrix, path, strokeWidth,
+ style, join, miterLimit, stencilSettings);
}
#endif