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

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: Add #define to not always compile in ETC1 support 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
« no previous file with comments | « gyp/gpu.gyp ('k') | include/gpu/GrTypes.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 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 /** 198 /**
199 * Creates a new entry, based on the specified key and texture and returns i t. The caller owns a 199 * Creates a new entry, based on the specified key and texture and returns i t. The caller owns a
200 * ref on the returned texture which must be balanced by a call to unref. 200 * ref on the returned texture which must be balanced by a call to unref.
201 * 201 *
202 * @param params The texture params used to draw a texture may help deter mine 202 * @param params The texture params used to draw a texture may help deter mine
203 * the cache entry used. (e.g. different versions may exist 203 * the cache entry used. (e.g. different versions may exist
204 * for different wrap modes on GPUs with limited NPOT 204 * for different wrap modes on GPUs with limited NPOT
205 * texture support). NULL implies clamp wrap modes. 205 * texture support). NULL implies clamp wrap modes.
206 * @param desc Description of the texture properties. 206 * @param desc Description of the texture properties.
207 * @param cacheID Cache-specific properties (e.g., texture gen ID) 207 * @param cacheID Cache-specific properties (e.g., texture gen ID)
208 * @param srcData Pointer to the pixel values. 208 * @param srcData Pointer to the pixel values.
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. For compressed pixel config s, this
211 * field is ignored.
211 * @param cacheKey (optional) If non-NULL, we'll write the cache key we use d to cacheKey. 212 * @param cacheKey (optional) If non-NULL, we'll write the cache key we use d to cacheKey.
212 */ 213 */
213 GrTexture* createTexture(const GrTextureParams* params, 214 GrTexture* createTexture(const GrTextureParams* params,
214 const GrTextureDesc& desc, 215 const GrTextureDesc& desc,
215 const GrCacheID& cacheID, 216 const GrCacheID& cacheID,
216 const void* srcData, 217 const void* srcData,
217 size_t rowBytes, 218 size_t rowBytes,
218 GrResourceKey* cacheKey = NULL); 219 GrResourceKey* cacheKey = NULL);
219
220 /** 220 /**
221 * Search for an entry based on key and dimensions. If found, ref it and ret urn it. The return 221 * 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. 222 * value will be NULL if not found. The caller must balance with a call to u nref.
223 * 223 *
224 * @param desc Description of the texture properties. 224 * @param desc Description of the texture properties.
225 * @param cacheID Cache-specific properties (e.g., texture gen ID) 225 * @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 226 * @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 227 * the cache entry used. (e.g. different versions may exist
228 * for different wrap modes on GPUs with limited NPOT 228 * for different wrap modes on GPUs with limited NPOT
229 * texture support). NULL implies clamp wrap modes. 229 * texture support). NULL implies clamp wrap modes.
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 } 1123 }
1124 1124
1125 GrTexture* texture() { return fTexture; } 1125 GrTexture* texture() { return fTexture; }
1126 1126
1127 private: 1127 private:
1128 GrContext* fContext; 1128 GrContext* fContext;
1129 GrTexture* fTexture; 1129 GrTexture* fTexture;
1130 }; 1130 };
1131 1131
1132 #endif 1132 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gyp ('k') | include/gpu/GrTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698