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

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

Issue 385713005: Allow GrGLEffects to produce variable length keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@key
Patch Set: rebase Created 6 years, 5 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 GrSurfaceOrigin textureOrigin); 101 GrSurfaceOrigin textureOrigin);
102 102
103 enum { 103 enum {
104 kDomainKeyBits = 2, // See DomainKey(). 104 kDomainKeyBits = 2, // See DomainKey().
105 }; 105 };
106 106
107 /** 107 /**
108 * GrGLEffect::GenKey() must call this and include the returned value in it's computed key. 108 * GrGLEffect::GenKey() must call this and include the returned value in it's computed key.
109 * The returned will be limited to the lower kDomainKeyBits bits. 109 * The returned will be limited to the lower kDomainKeyBits bits.
110 */ 110 */
111 static GrGLEffect::EffectKey DomainKey(const GrTextureDomain& domain) { 111 static uint32_t DomainKey(const GrTextureDomain& domain) {
112 GR_STATIC_ASSERT(kModeCount <= 4); 112 GR_STATIC_ASSERT(kModeCount <= 4);
113 return domain.mode(); 113 return domain.mode();
114 } 114 }
115 115
116 private: 116 private:
117 SkDEBUGCODE(Mode fMode;) 117 SkDEBUGCODE(Mode fMode;)
118 GrGLUniformManager::UniformHandle fDomainUni; 118 GrGLUniformManager::UniformHandle fDomainUni;
119 SkString fDomainName; 119 SkString fDomainName;
120 GrGLfloat fPrevDomain[4]; 120 GrGLfloat fPrevDomain[4];
121 }; 121 };
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 GrCoordSet); 166 GrCoordSet);
167 167
168 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; 168 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE;
169 169
170 GR_DECLARE_EFFECT_TEST; 170 GR_DECLARE_EFFECT_TEST;
171 171
172 typedef GrSingleTextureEffect INHERITED; 172 typedef GrSingleTextureEffect INHERITED;
173 }; 173 };
174 174
175 #endif 175 #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