From 28a838e532250fcca9673aca6c4616193a5a139d Mon Sep 17 00:00:00 2001 From: robertphillips Date: Thu, 23 Jun 2016 14:07:00 -0700 Subject: Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h Just another step in reining in the GrPLB GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086293006 Review-Url: https://codereview.chromium.org/2086293006 --- gm/yuvtorgbeffect.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'gm/yuvtorgbeffect.cpp') diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp index a153c991fc..0be30088c8 100644 --- a/gm/yuvtorgbeffect.cpp +++ b/gm/yuvtorgbeffect.cpp @@ -13,7 +13,6 @@ #include "GrContext.h" #include "GrDrawContextPriv.h" -#include "GrPipelineBuilder.h" #include "SkBitmap.h" #include "SkGr.h" #include "SkGradientShader.h" @@ -113,19 +112,19 @@ protected: {1, 2, 0}, {2, 0, 1}, {2, 1, 0}}; for (int i = 0; i < 6; ++i) { - GrPipelineBuilder pipelineBuilder; - pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); + GrPaint grPaint; + grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); sk_sp fp(GrYUVEffect::MakeYUVToRGB( texture[indices[i][0]], texture[indices[i][1]], texture[indices[i][2]], sizes, static_cast(space), false)); if (fp) { SkMatrix viewMatrix; viewMatrix.setTranslate(x, y); - pipelineBuilder.addColorFragmentProcessor(std::move(fp)); + grPaint.addColorFragmentProcessor(std::move(fp)); SkAutoTUnref batch( GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix, renderRect, nullptr, nullptr)); - drawContext->drawContextPriv().testingOnly_drawBatch(pipelineBuilder, batch); + drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch); } x += renderRect.width() + kTestPad; } @@ -225,18 +224,18 @@ protected: SkScalar y = kDrawPad + kTestPad + space * kColorSpaceOffset; SkScalar x = kDrawPad + kTestPad; - GrPipelineBuilder pipelineBuilder; - pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); + GrPaint grPaint; + grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); sk_sp fp( GrYUVEffect::MakeYUVToRGB(texture[0], texture[1], texture[2], sizes, static_cast(space), true)); if (fp) { SkMatrix viewMatrix; viewMatrix.setTranslate(x, y); - pipelineBuilder.addColorFragmentProcessor(fp); + grPaint.addColorFragmentProcessor(fp); SkAutoTUnref batch(GrRectBatchFactory::CreateNonAAFill( GrColor_WHITE, viewMatrix, renderRect, nullptr, nullptr)); - drawContext->drawContextPriv().testingOnly_drawBatch(pipelineBuilder, batch); + drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch); } } } -- cgit v1.2.3