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

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

Issue 574333003: Rename GrProgramResource to GrGpuResourceRef (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add newline before private: Created 6 years, 3 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 | « include/gpu/GrProgramResource.h ('k') | src/gpu/GrDrawState.h » ('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 GrTextureAccess_DEFINED 8 #ifndef GrTextureAccess_DEFINED
9 #define GrTextureAccess_DEFINED 9 #define GrTextureAccess_DEFINED
10 10
11 #include "GrProgramResource.h" 11 #include "GrGpuResourceRef.h"
12 #include "GrTexture.h" 12 #include "GrTexture.h"
13 #include "SkRefCnt.h" 13 #include "SkRefCnt.h"
14 #include "SkShader.h" 14 #include "SkShader.h"
15 15
16 /** 16 /**
17 * Represents the filtering and tile modes used to access a texture. It is mostl y used with 17 * Represents the filtering and tile modes used to access a texture. It is mostl y used with
18 * GrTextureAccess (defined below). Also, some of the texture cache methods requ ire knowledge about 18 * GrTextureAccess (defined below). Also, some of the texture cache methods requ ire knowledge about
19 * filtering and tiling to perform a cache lookup. If it wasn't for this latter usage this would 19 * filtering and tiling to perform a cache lookup. If it wasn't for this latter usage this would
20 * be folded into GrTextureAccess. The default is clamp tile modes and no filter ing. 20 * be folded into GrTextureAccess. The default is clamp tile modes and no filter ing.
21 */ 21 */
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 (0 == memcmp(fSwizzle, other.fSwizzle, sizeof(fSwizzle)-1)); 160 (0 == memcmp(fSwizzle, other.fSwizzle, sizeof(fSwizzle)-1));
161 } 161 }
162 162
163 bool operator!= (const GrTextureAccess& other) const { return !(*this == oth er); } 163 bool operator!= (const GrTextureAccess& other) const { return !(*this == oth er); }
164 164
165 GrTexture* getTexture() const { return fTexture.get(); } 165 GrTexture* getTexture() const { return fTexture.get(); }
166 166
167 /** 167 /**
168 * For internal use by GrEffect. 168 * For internal use by GrEffect.
169 */ 169 */
170 const GrProgramResource* getProgramTexture() const { return &fTexture; } 170 const GrGpuResourceRef* getProgramTexture() const { return &fTexture; }
171 171
172 /** 172 /**
173 * Returns a string representing the swizzle. The string is is null-terminat ed. 173 * Returns a string representing the swizzle. The string is is null-terminat ed.
174 */ 174 */
175 const char* getSwizzle() const { return fSwizzle; } 175 const char* getSwizzle() const { return fSwizzle; }
176 176
177 /** Returns a mask indicating which components are referenced in the swizzle . The return 177 /** Returns a mask indicating which components are referenced in the swizzle . The return
178 is a bitfield of GrColorComponentFlags. */ 178 is a bitfield of GrColorComponentFlags. */
179 uint32_t swizzleMask() const { return fSwizzleMask; } 179 uint32_t swizzleMask() const { return fSwizzleMask; }
180 180
181 const GrTextureParams& getParams() const { return fParams; } 181 const GrTextureParams& getParams() const { return fParams; }
182 182
183 private: 183 private:
184 void setSwizzle(const char*); 184 void setSwizzle(const char*);
185 185
186 typedef GrProgramTResource<GrTexture> ProgramTexture; 186 typedef GrTGpuResourceRef<GrTexture> ProgramTexture;
187 187
188 ProgramTexture fTexture; 188 ProgramTexture fTexture;
189 GrTextureParams fParams; 189 GrTextureParams fParams;
190 uint32_t fSwizzleMask; 190 uint32_t fSwizzleMask;
191 char fSwizzle[5]; 191 char fSwizzle[5];
192 192
193 typedef SkNoncopyable INHERITED; 193 typedef SkNoncopyable INHERITED;
194 }; 194 };
195 195
196 #endif 196 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrProgramResource.h ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698