| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 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 const void* srcData, |
| 217 size_t rowBytes, | 217 size_t rowBytes, |
| 218 GrResourceKey* cacheKey = NULL); | 218 GrResourceKey* cacheKey = NULL); |
| 219 | 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 |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 class AutoCheckFlush; | 993 class AutoCheckFlush; |
| 994 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the | 994 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the |
| 995 /// draw state is left unmodified. | 995 /// draw state is left unmodified. |
| 996 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects
*, AutoCheckFlush*); | 996 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects
*, AutoCheckFlush*); |
| 997 | 997 |
| 998 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path, | 998 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path, |
| 999 const SkStrokeRec& stroke); | 999 const SkStrokeRec& stroke); |
| 1000 | 1000 |
| 1001 GrTexture* createResizedTexture(const GrTextureDesc& desc, | 1001 GrTexture* createResizedTexture(const GrTextureDesc& desc, |
| 1002 const GrCacheID& cacheID, | 1002 const GrCacheID& cacheID, |
| 1003 void* srcData, | 1003 const void* srcData, |
| 1004 size_t rowBytes, | 1004 size_t rowBytes, |
| 1005 bool filter); | 1005 bool filter); |
| 1006 | 1006 |
| 1007 // Needed so GrTexture's returnToCache helper function can call | 1007 // Needed so GrTexture's returnToCache helper function can call |
| 1008 // addExistingTextureToCache | 1008 // addExistingTextureToCache |
| 1009 friend class GrTexture; | 1009 friend class GrTexture; |
| 1010 friend class GrStencilAndCoverPathRenderer; | 1010 friend class GrStencilAndCoverPathRenderer; |
| 1011 | 1011 |
| 1012 // Add an existing texture to the texture cache. This is intended solely | 1012 // Add an existing texture to the texture cache. This is intended solely |
| 1013 // for use with textures released from an GrAutoScratchTexture. | 1013 // for use with textures released from an GrAutoScratchTexture. |
| (...skipping 109 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 |