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

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

Issue 302783002: Initial work to get ETC1 data up to the GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix some code clarity issues Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 * @param rowBytes The number of bytes between rows of the texture. Zero 209 * @param rowBytes The number of bytes between rows of the texture. Zero
210 * implies tightly packed rows. 210 * implies tightly packed rows.
211 * @param cacheKey (optional) If non-NULL, we'll write the cache key we use d to cacheKey. 211 * @param cacheKey (optional) If non-NULL, we'll write the cache key we use d to cacheKey.
212 */ 212 */
213 GrTexture* createTexture(const GrTextureParams* params, 213 GrTexture* createTexture(const GrTextureParams* params,
214 const GrTextureDesc& desc, 214 const GrTextureDesc& desc,
215 const GrCacheID& cacheID, 215 const GrCacheID& cacheID,
216 void* srcData, 216 void* srcData,
217 size_t rowBytes, 217 size_t rowBytes,
218 GrResourceKey* cacheKey = NULL); 218 GrResourceKey* cacheKey = NULL);
219 219 /**
220 * Creates a new entry, based on the specified key and texture and returns i t. The caller owns a
221 * ref on the returned texture which must be balanced by a call to unref.
222 *
223 * @param params The texture params used to draw a texture may help deter mine
224 * the cache entry used. (e.g. different versions may exist
225 * for different wrap modes on GPUs with limited NPOT
226 * texture support). NULL implies clamp wrap modes.
227 * @param desc Description of the texture properties.
228 * @param cacheID Cache-specific properties (e.g., texture gen ID)
229 * @param srcData Pointer to the compressed pixel values.
230 * @param format The compressed texture format to use
231 * @param cacheKey (optional) If non-NULL, we'll write the cache key we use d to cacheKey.
232 */
233 GrTexture* createCompressedTexture(const GrTextureParams* params,
234 const GrTextureDesc& desc,
235 const GrCacheID& cacheID,
236 const void* srcData,
237 GrCompressedFormat format,
238 GrResourceKey* cacheKey = NULL);
220 /** 239 /**
221 * Search for an entry based on key and dimensions. If found, ref it and ret urn it. The return 240 * Search for an entry based on key and dimensions. If found, ref it and ret urn it. The return
222 * value will be NULL if not found. The caller must balance with a call to u nref. 241 * value will be NULL if not found. The caller must balance with a call to u nref.
223 * 242 *
224 * @param desc Description of the texture properties. 243 * @param desc Description of the texture properties.
225 * @param cacheID Cache-specific properties (e.g., texture gen ID) 244 * @param cacheID Cache-specific properties (e.g., texture gen ID)
226 * @param params The texture params used to draw a texture may help deter mine 245 * @param params The texture params used to draw a texture may help deter mine
227 * the cache entry used. (e.g. different versions may exist 246 * the cache entry used. (e.g. different versions may exist
228 * for different wrap modes on GPUs with limited NPOT 247 * for different wrap modes on GPUs with limited NPOT
229 * texture support). NULL implies clamp wrap modes. 248 * texture support). NULL implies clamp wrap modes.
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 } 1142 }
1124 1143
1125 GrTexture* texture() { return fTexture; } 1144 GrTexture* texture() { return fTexture; }
1126 1145
1127 private: 1146 private:
1128 GrContext* fContext; 1147 GrContext* fContext;
1129 GrTexture* fTexture; 1148 GrTexture* fTexture;
1130 }; 1149 };
1131 1150
1132 #endif 1151 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698