| OLD | NEW |
| 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 Loading... |
| 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. For compressed pixel config
s, this | 210 * implies tightly packed rows. |
| 211 * field is ignored. | |
| 212 * @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. |
| 213 */ | 212 */ |
| 214 GrTexture* createTexture(const GrTextureParams* params, | 213 GrTexture* createTexture(const GrTextureParams* params, |
| 215 const GrTextureDesc& desc, | 214 const GrTextureDesc& desc, |
| 216 const GrCacheID& cacheID, | 215 const GrCacheID& cacheID, |
| 217 const void* srcData, | 216 const void* srcData, |
| 218 size_t rowBytes, | 217 size_t rowBytes, |
| 219 GrResourceKey* cacheKey = NULL); | 218 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 Loading... |
| 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 |
| OLD | NEW |