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

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

Issue 510053003: Make textures register with GrResourceCache2 as scratch. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add new h file to git repo 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/GrResourceKey.h ('k') | src/gpu/GrBinHashKey.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrTexture_DEFINED 9 #ifndef GrTexture_DEFINED
10 #define GrTexture_DEFINED 10 #define GrTexture_DEFINED
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 static GrResourceKey ComputeKey(const GrGpu* gpu, 157 static GrResourceKey ComputeKey(const GrGpu* gpu,
158 const GrTextureParams* params, 158 const GrTextureParams* params,
159 const GrTextureDesc& desc, 159 const GrTextureDesc& desc,
160 const GrCacheID& cacheID); 160 const GrCacheID& cacheID);
161 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc); 161 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc);
162 static bool NeedsResizing(const GrResourceKey& key); 162 static bool NeedsResizing(const GrResourceKey& key);
163 static bool NeedsBilerp(const GrResourceKey& key); 163 static bool NeedsBilerp(const GrResourceKey& key);
164 164
165 protected: 165 protected:
166 GrTextureImpl(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) 166 GrTextureImpl(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc);
167 : INHERITED(gpu, isWrapped, desc)
168 , fMipMapsStatus(kNotAllocated_MipMapsStatus) {
169 }
170 167
171 private: 168 private:
172 enum MipMapsStatus { 169 enum MipMapsStatus {
173 kNotAllocated_MipMapsStatus, 170 kNotAllocated_MipMapsStatus,
174 kAllocated_MipMapsStatus, 171 kAllocated_MipMapsStatus,
175 kValid_MipMapsStatus 172 kValid_MipMapsStatus
176 }; 173 };
177 174
178 MipMapsStatus fMipMapsStatus; 175 MipMapsStatus fMipMapsStatus;
179 176
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 fTexture.reset(SkSafeRef(texture)); 210 fTexture.reset(SkSafeRef(texture));
214 return texture; 211 return texture;
215 } 212 }
216 213
217 private: 214 private:
218 SkAutoTUnref<GrTexture> fTexture; 215 SkAutoTUnref<GrTexture> fTexture;
219 SkIPoint fOffset; 216 SkIPoint fOffset;
220 }; 217 };
221 218
222 #endif 219 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrResourceKey.h ('k') | src/gpu/GrBinHashKey.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698