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

Side by Side Diff: src/gpu/effects/GrSimpleTextureEffect.h

Issue 1266633003: Added registerChild; transforms, textures, glKey automatically handled. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: refactored to onGetGLProcessorKey; removed emitSamplers specialized template; fixed nits Created 5 years, 4 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/GrRRectEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.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 2013 Google Inc. 2 * Copyright 2013 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 GrSimpleTextureEffect_DEFINED 8 #ifndef GrSimpleTextureEffect_DEFINED
9 #define GrSimpleTextureEffect_DEFINED 9 #define GrSimpleTextureEffect_DEFINED
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const SkMatrix& matrix, 46 const SkMatrix& matrix,
47 const GrTextureParams& p, 47 const GrTextureParams& p,
48 GrCoordSet coordSet = kLocal_GrCoordSet) { 48 GrCoordSet coordSet = kLocal_GrCoordSet) {
49 return SkNEW_ARGS(GrSimpleTextureEffect, (procDataManager, tex, matrix, p, coordSet)); 49 return SkNEW_ARGS(GrSimpleTextureEffect, (procDataManager, tex, matrix, p, coordSet));
50 } 50 }
51 51
52 virtual ~GrSimpleTextureEffect() {} 52 virtual ~GrSimpleTextureEffect() {}
53 53
54 const char* name() const override { return "SimpleTexture"; } 54 const char* name() const override { return "SimpleTexture"; }
55 55
56 void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const over ride;
57
58 GrGLFragmentProcessor* createGLInstance() const override; 56 GrGLFragmentProcessor* createGLInstance() const override;
59 57
60 private: 58 private:
61 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, 59 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager,
62 GrTexture* texture, 60 GrTexture* texture,
63 const SkMatrix& matrix, 61 const SkMatrix& matrix,
64 GrTextureParams::FilterMode filterMode, 62 GrTextureParams::FilterMode filterMode,
65 GrCoordSet coordSet) 63 GrCoordSet coordSet)
66 : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, co ordSet) { 64 : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, co ordSet) {
67 this->initClassID<GrSimpleTextureEffect>(); 65 this->initClassID<GrSimpleTextureEffect>();
68 } 66 }
69 67
70 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, 68 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager,
71 GrTexture* texture, 69 GrTexture* texture,
72 const SkMatrix& matrix, 70 const SkMatrix& matrix,
73 const GrTextureParams& params, 71 const GrTextureParams& params,
74 GrCoordSet coordSet) 72 GrCoordSet coordSet)
75 : GrSingleTextureEffect(procDataManager, texture, matrix, params, coordS et) { 73 : GrSingleTextureEffect(procDataManager, texture, matrix, params, coordS et) {
76 this->initClassID<GrSimpleTextureEffect>(); 74 this->initClassID<GrSimpleTextureEffect>();
77 } 75 }
78 76
77 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride;
78
79 bool onIsEqual(const GrFragmentProcessor& other) const override { return tru e; } 79 bool onIsEqual(const GrFragmentProcessor& other) const override { return tru e; }
80 80
81 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 81 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
82 82
83 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 83 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
84 84
85 typedef GrSingleTextureEffect INHERITED; 85 typedef GrSingleTextureEffect INHERITED;
86 }; 86 };
87 87
88 #endif 88 #endif
OLDNEW
« 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