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

Side by Side Diff: src/gpu/effects/GrTextureDomain.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 unified diff | Download patch
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrTextureDomainEffect_DEFINED 8 #ifndef GrTextureDomainEffect_DEFINED
9 #define GrTextureDomainEffect_DEFINED 9 #define GrTextureDomainEffect_DEFINED
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 typedef GrSingleTextureEffect INHERITED; 160 typedef GrSingleTextureEffect INHERITED;
161 }; 161 };
162 162
163 /** 163 /**
164 * A basic texture effect that uses GrTextureDomain. 164 * A basic texture effect that uses GrTextureDomain.
165 */ 165 */
166 class GrTextureDomainEffect : public GrSingleTextureEffect { 166 class GrTextureDomainEffect : public GrSingleTextureEffect {
167 167
168 public: 168 public:
169 static const GrFragmentProcessor* Create(GrTexture*, 169 static sk_sp<GrFragmentProcessor> Make(GrTexture*,
170 const SkMatrix&, 170 const SkMatrix&,
171 const SkRect& domain, 171 const SkRect& domain,
172 GrTextureDomain::Mode, 172 GrTextureDomain::Mode,
173 GrTextureParams::FilterMode filterM ode, 173 GrTextureParams::FilterMode filterMod e,
174 GrCoordSet = kLocal_GrCoordSet); 174 GrCoordSet = kLocal_GrCoordSet);
175 175
176 virtual ~GrTextureDomainEffect(); 176 virtual ~GrTextureDomainEffect();
177 177
178 const char* name() const override { return "TextureDomain"; } 178 const char* name() const override { return "TextureDomain"; }
179 179
180 SkString dumpInfo() const override { 180 SkString dumpInfo() const override {
181 SkString str; 181 SkString str;
182 str.appendf("Domain: [L: %.2f, T: %.2f, R: %.2f, B: %.2f] ", 182 str.appendf("Domain: [L: %.2f, T: %.2f, R: %.2f, B: %.2f] ",
183 fTextureDomain.domain().fLeft, fTextureDomain.domain().fTop, 183 fTextureDomain.domain().fLeft, fTextureDomain.domain().fTop,
184 fTextureDomain.domain().fRight, fTextureDomain.domain().fBot tom); 184 fTextureDomain.domain().fRight, fTextureDomain.domain().fBot tom);
(...skipping 21 matching lines...) Expand all
206 bool onIsEqual(const GrFragmentProcessor&) const override; 206 bool onIsEqual(const GrFragmentProcessor&) const override;
207 207
208 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 208 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
209 209
210 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 210 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
211 211
212 typedef GrSingleTextureEffect INHERITED; 212 typedef GrSingleTextureEffect INHERITED;
213 }; 213 };
214 214
215 #endif 215 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698