Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: gm/rrects.cpp

Issue 2086293006: Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rrects.cpp
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index e104aea4335259769f08d5f90c871f91ba9f9443..0f3ac56fec59c2f38e36467f787190459935cb09 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -101,16 +101,15 @@ protected:
canvas->translate(SkIntToScalar(x), SkIntToScalar(y));
if (kEffect_Type == fType) {
#if SK_SUPPORT_GPU
- GrPipelineBuilder pipelineBuilder;
- pipelineBuilder.setXPFactory(
- GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
+ GrPaint grPaint;
+ grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
SkRRect rrect = fRRects[curRRect];
rrect.offset(SkIntToScalar(x), SkIntToScalar(y));
GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
sk_sp<GrFragmentProcessor> fp(GrRRectEffect::Make(edgeType, rrect));
if (fp) {
- pipelineBuilder.addCoverageFragmentProcessor(std::move(fp));
+ grPaint.addCoverageFragmentProcessor(std::move(fp));
SkRect bounds = rrect.getBounds();
bounds.outset(2.f, 2.f);
@@ -118,8 +117,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(0xff000000, SkMatrix::I(),
bounds, nullptr, nullptr));
- drawContext->drawContextPriv().testingOnly_drawBatch(pipelineBuilder,
- batch);
+ drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch);
} else {
drew = false;
}
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698