aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/texturedomaineffect.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-06-23 14:07:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-23 14:07:00 -0700
commit28a838e532250fcca9673aca6c4616193a5a139d (patch)
tree3554ad76c7ce5f69d7ab200b3f2c52ba955827e0 /gm/texturedomaineffect.cpp
parentb593a76749c6c7e12bf86aeaa06e1e52708e9bdf (diff)
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
Diffstat (limited to 'gm/texturedomaineffect.cpp')
-rw-r--r--gm/texturedomaineffect.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index cac2b9c8d5..3680006cc5 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -112,9 +112,8 @@ protected:
SkScalar x = kDrawPad + kTestPad;
for (int m = 0; m < GrTextureDomain::kModeCount; ++m) {
GrTextureDomain::Mode mode = (GrTextureDomain::Mode) m;
- GrPipelineBuilder pipelineBuilder;
- pipelineBuilder.setXPFactory(
- GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
+ GrPaint grPaint;
+ grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
sk_sp<GrFragmentProcessor> fp(
GrTextureDomainEffect::Make(texture, textureMatrices[tm],
GrTextureDomain::MakeTexelDomain(texture,
@@ -125,12 +124,12 @@ protected:
continue;
}
const SkMatrix viewMatrix = SkMatrix::MakeTrans(x, y);
- pipelineBuilder.addColorFragmentProcessor(std::move(fp));
+ grPaint.addColorFragmentProcessor(std::move(fp));
SkAutoTUnref<GrDrawBatch> 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;
}
y += renderRect.height() + kTestPad;