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

Unified Diff: src/gpu/effects/GrSimpleTextureEffect.h

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 | « src/gpu/effects/GrRRectEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrSimpleTextureEffect.h
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index 18a8a78fc453594125e8de068729a669139be784..08eb8c17e146082cbb0cd9e6bea327260f8ab849 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -21,25 +21,27 @@ class GrInvariantOutput;
class GrSimpleTextureEffect : public GrSingleTextureEffect {
public:
/* unfiltered, clamp mode */
- static const GrFragmentProcessor* Create(GrTexture* tex,
- const SkMatrix& matrix,
- GrCoordSet coordSet = kLocal_GrCoordSet) {
- return new GrSimpleTextureEffect(tex, matrix, GrTextureParams::kNone_FilterMode, coordSet);
+ static sk_sp<GrFragmentProcessor> Make(GrTexture* tex,
+ const SkMatrix& matrix,
+ GrCoordSet coordSet = kLocal_GrCoordSet) {
+ return sk_sp<GrFragmentProcessor>(
+ new GrSimpleTextureEffect(tex, matrix, GrTextureParams::kNone_FilterMode, coordSet));
}
/* clamp mode */
- static GrFragmentProcessor* Create(GrTexture* tex,
- const SkMatrix& matrix,
- GrTextureParams::FilterMode filterMode,
- GrCoordSet coordSet = kLocal_GrCoordSet) {
- return new GrSimpleTextureEffect(tex, matrix, filterMode, coordSet);
+ static sk_sp<GrFragmentProcessor> Make(GrTexture* tex,
+ const SkMatrix& matrix,
+ GrTextureParams::FilterMode filterMode,
+ GrCoordSet coordSet = kLocal_GrCoordSet) {
+ return sk_sp<GrFragmentProcessor>(
+ new GrSimpleTextureEffect(tex, matrix, filterMode, coordSet));
}
- static GrFragmentProcessor* Create(GrTexture* tex,
- const SkMatrix& matrix,
- const GrTextureParams& p,
- GrCoordSet coordSet = kLocal_GrCoordSet) {
- return new GrSimpleTextureEffect(tex, matrix, p, coordSet);
+ static sk_sp<GrFragmentProcessor> Make(GrTexture* tex,
+ const SkMatrix& matrix,
+ const GrTextureParams& p,
+ GrCoordSet coordSet = kLocal_GrCoordSet) {
+ return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(tex, matrix, p, coordSet));
}
virtual ~GrSimpleTextureEffect() {}
« no previous file with comments | « src/gpu/effects/GrRRectEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698