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

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

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses 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 GrGLFragmentProcessor* createGLInstance() const override;
57
58 private: 56 private:
59 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, 57 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager,
60 GrTexture* texture, 58 GrTexture* texture,
61 const SkMatrix& matrix, 59 const SkMatrix& matrix,
62 GrTextureParams::FilterMode filterMode, 60 GrTextureParams::FilterMode filterMode,
63 GrCoordSet coordSet) 61 GrCoordSet coordSet)
64 : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, co ordSet) { 62 : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, co ordSet) {
65 this->initClassID<GrSimpleTextureEffect>(); 63 this->initClassID<GrSimpleTextureEffect>();
66 } 64 }
67 65
68 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, 66 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager,
69 GrTexture* texture, 67 GrTexture* texture,
70 const SkMatrix& matrix, 68 const SkMatrix& matrix,
71 const GrTextureParams& params, 69 const GrTextureParams& params,
72 GrCoordSet coordSet) 70 GrCoordSet coordSet)
73 : GrSingleTextureEffect(procDataManager, texture, matrix, params, coordS et) { 71 : GrSingleTextureEffect(procDataManager, texture, matrix, params, coordS et) {
74 this->initClassID<GrSimpleTextureEffect>(); 72 this->initClassID<GrSimpleTextureEffect>();
75 } 73 }
76 74
75 GrGLFragmentProcessor* onCreateGLInstance() const override;
76
77 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride; 77 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride;
78 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