Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030
Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/tests/DFPathRendererTest.cpp b/tests/DFPathRendererTest.cpp
index 30ca17d..25c8f82 100644
--- a/tests/DFPathRendererTest.cpp
+++ b/tests/DFPathRendererTest.cpp
@@ -17,7 +17,7 @@
// Because of inaccuracies in large floating point values this causes the
// the path renderer to attempt to add a path DF to its atlas that is larger
// than the plot size which used to crash rather than fail gracefully.
-static void test_far_from_origin(GrDrawContext* drawContext, GrPathRenderer* pr,
+static void test_far_from_origin(GrRenderTargetContext* renderTargetContext, GrPathRenderer* pr,
GrResourceProvider* rp) {
SkPath path;
path.lineTo(49.0255089839f, 0.473541f);
@@ -48,7 +48,7 @@
GrPathRenderer::DrawPathArgs args;
args.fPaint = &paint;
args.fUserStencilSettings = &GrUserStencilSettings::kUnused;
- args.fDrawContext = drawContext;
+ args.fRenderTargetContext = renderTargetContext;
args.fClip = &noClip;
args.fResourceProvider = rp;
args.fViewMatrix = &matrix;
@@ -63,22 +63,23 @@
if (!ctxInfo.grContext()->caps()->shaderCaps()->shaderDerivativeSupport()) {
return;
}
- sk_sp<GrDrawContext> dc(ctxInfo.grContext()->makeDrawContext(SkBackingFit::kApprox,
- 800, 800,
- kRGBA_8888_GrPixelConfig,
- nullptr,
- 0,
- kTopLeft_GrSurfaceOrigin));
- if (!dc) {
+ sk_sp<GrRenderTargetContext> rtc(ctxInfo.grContext()->makeRenderTargetContext(
+ SkBackingFit::kApprox,
+ 800, 800,
+ kRGBA_8888_GrPixelConfig,
+ nullptr,
+ 0,
+ kTopLeft_GrSurfaceOrigin));
+ if (!rtc) {
return;
}
GrAADistanceFieldPathRenderer dfpr;
GrTestTarget tt;
- ctxInfo.grContext()->getTestTarget(&tt, dc);
+ ctxInfo.grContext()->getTestTarget(&tt, rtc);
GrResourceProvider* rp = tt.resourceProvider();
- test_far_from_origin(dc.get(), &dfpr, rp);
+ test_far_from_origin(rtc.get(), &dfpr, rp);
ctxInfo.grContext()->flush();
}
#endif