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

Unified Diff: gm/rrects.cpp

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. 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 5f28c9e4a233c2e270f33c2d1a9bbdb6bf007031..e104aea4335259769f08d5f90c871f91ba9f9443 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -103,15 +103,14 @@ protected:
#if SK_SUPPORT_GPU
GrPipelineBuilder pipelineBuilder;
pipelineBuilder.setXPFactory(
- GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref();
+ GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
SkRRect rrect = fRRects[curRRect];
rrect.offset(SkIntToScalar(x), SkIntToScalar(y));
GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
- SkAutoTUnref<GrFragmentProcessor> fp(GrRRectEffect::Create(edgeType,
- rrect));
+ sk_sp<GrFragmentProcessor> fp(GrRRectEffect::Make(edgeType, rrect));
if (fp) {
- pipelineBuilder.addCoverageFragmentProcessor(fp);
+ pipelineBuilder.addCoverageFragmentProcessor(std::move(fp));
SkRect bounds = rrect.getBounds();
bounds.outset(2.f, 2.f);
« 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