From 1105224f9701e57ec5ce0354d6a380b664f5c638 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 27 Oct 2016 14:47:55 -0400 Subject: 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 Reviewed-by: Brian Salomon Reviewed-by: Robert Phillips --- gm/constcolorprocessor.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gm/constcolorprocessor.cpp') diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp index b4983dc44c..4059c43269 100644 --- a/gm/constcolorprocessor.cpp +++ b/gm/constcolorprocessor.cpp @@ -12,7 +12,7 @@ #if SK_SUPPORT_GPU #include "GrContext.h" -#include "GrDrawContextPriv.h" +#include "GrRenderTargetContextPriv.h" #include "SkGrPriv.h" #include "SkGradientShader.h" #include "batches/GrDrawBatch.h" @@ -46,8 +46,9 @@ protected: } void onDraw(SkCanvas* canvas) override { - GrDrawContext* drawContext = canvas->internal_private_accessTopLayerDrawContext(); - if (!drawContext) { + GrRenderTargetContext* renderTargetContext = + canvas->internal_private_accessTopLayerRenderTargetContext(); + if (!renderTargetContext) { skiagm::GM::DrawGpuOnlyMessage(canvas); return; } @@ -99,8 +100,8 @@ protected: } else { skPaint.setColor(kPaintColors[paintType]); } - SkAssertResult(SkPaintToGrPaint(context, drawContext, skPaint, viewMatrix, - &grPaint)); + SkAssertResult(SkPaintToGrPaint(context, renderTargetContext, skPaint, + viewMatrix, &grPaint)); GrConstColorProcessor::InputMode mode = (GrConstColorProcessor::InputMode) m; GrColor4f color = GrColor4f::FromGrColor(kColors[procColor]); @@ -111,7 +112,8 @@ protected: SkAutoTUnref batch( GrRectBatchFactory::CreateNonAAFill(grPaint.getColor(), viewMatrix, renderRect, nullptr, nullptr)); - drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch); + renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint, + batch); // Draw labels for the input to the processor and the processor to the right of // the test rect. The input label appears above the processor label. -- cgit v1.2.3