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

Side by Side Diff: include/gpu/GrTextureAccess.h

Issue 13121002: Make GrGLShaderBuilder::TextureSampler extract only required info from GrTextureAccess. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 GrTextureAccess_DEFINED 8 #ifndef GrTextureAccess_DEFINED
9 #define GrTextureAccess_DEFINED 9 #define GrTextureAccess_DEFINED
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 bool operator!= (const GrTextureAccess& other) const { return !(*this == oth er); } 156 bool operator!= (const GrTextureAccess& other) const { return !(*this == oth er); }
157 157
158 GrTexture* getTexture() const { return fTexture.get(); } 158 GrTexture* getTexture() const { return fTexture.get(); }
159 159
160 /** 160 /**
161 * Returns a string representing the swizzle. The string is is null-terminat ed. 161 * Returns a string representing the swizzle. The string is is null-terminat ed.
162 */ 162 */
163 const char* getSwizzle() const { return fSwizzle; } 163 const char* getSwizzle() const { return fSwizzle; }
164 164
165 enum { 165 /** Returns a mask indicating which components are referenced in the swizzle . The return
166 kR_SwizzleFlag = 0x1, 166 is a bitfield of GrColorComponentFlags. */
167 kG_SwizzleFlag = 0x2,
168 kB_SwizzleFlag = 0x4,
169 kA_SwizzleFlag = 0x8,
170
171 kRGB_SwizzleMask = (kR_SwizzleFlag | kG_SwizzleFlag | kB_SwizzleFlag),
172 };
173
174 /** Returns a mask indicating which components are referenced in the swizzle . */
175 uint32_t swizzleMask() const { return fSwizzleMask; } 167 uint32_t swizzleMask() const { return fSwizzleMask; }
176 168
177 const GrTextureParams& getParams() const { return fParams; } 169 const GrTextureParams& getParams() const { return fParams; }
178 170
179 private: 171 private:
180 void setSwizzle(const char*); 172 void setSwizzle(const char*);
181 173
182 GrTextureParams fParams; 174 GrTextureParams fParams;
183 SkAutoTUnref<GrTexture> fTexture; 175 SkAutoTUnref<GrTexture> fTexture;
184 uint32_t fSwizzleMask; 176 uint32_t fSwizzleMask;
185 char fSwizzle[5]; 177 char fSwizzle[5];
186 178
187 typedef GrNoncopyable INHERITED; 179 typedef GrNoncopyable INHERITED;
188 }; 180 };
189 181
190 #endif 182 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrEffect.h ('k') | include/gpu/GrTypes.h » ('j') | src/gpu/gl/GrGLShaderBuilder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698