| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 | 9 |
| 10 #ifndef GrContext_DEFINED | 10 #ifndef GrContext_DEFINED |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 * pressure. | 106 * pressure. |
| 107 */ | 107 */ |
| 108 void freeGpuResources(); | 108 void freeGpuResources(); |
| 109 | 109 |
| 110 /** | 110 /** |
| 111 * Returns the number of bytes of GPU memory hosted by the texture cache. | 111 * Returns the number of bytes of GPU memory hosted by the texture cache. |
| 112 */ | 112 */ |
| 113 size_t getGpuTextureCacheBytes() const; | 113 size_t getGpuTextureCacheBytes() const; |
| 114 | 114 |
| 115 /////////////////////////////////////////////////////////////////////////// | 115 /////////////////////////////////////////////////////////////////////////// |
| 116 // Textures | 116 // Textures and Render Targets |
| 117 | 117 |
| 118 /** | 118 /** |
| 119 * Creates a new entry, based on the specified key and texture and returns i
t. The caller owns a | 119 * Creates a new entry, based on the specified key and texture and returns i
t. The caller owns a |
| 120 * ref on the returned texture which must be balanced by a call to unref. | 120 * ref on the returned texture which must be balanced by a call to unref. |
| 121 * | 121 * |
| 122 * @param params The texture params used to draw a texture may help deter
mine | 122 * @param params The texture params used to draw a texture may help deter
mine |
| 123 * the cache entry used. (e.g. different versions may exist | 123 * the cache entry used. (e.g. different versions may exist |
| 124 * for different wrap modes on GPUs with limited NPOT | 124 * for different wrap modes on GPUs with limited NPOT |
| 125 * texture support). NULL implies clamp wrap modes. | 125 * texture support). NULL implies clamp wrap modes. |
| 126 * @param desc Description of the texture properties. | 126 * @param desc Description of the texture properties. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 * @param maxTextureBytes The maximum number of bytes of texture memory | 244 * @param maxTextureBytes The maximum number of bytes of texture memory |
| 245 * that can be held in the cache. | 245 * that can be held in the cache. |
| 246 */ | 246 */ |
| 247 void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes); | 247 void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes); |
| 248 | 248 |
| 249 /** | 249 /** |
| 250 * Return the max width or height of a texture supported by the current GPU
. | 250 * Return the max width or height of a texture supported by the current GPU
. |
| 251 */ | 251 */ |
| 252 int getMaxTextureSize() const; | 252 int getMaxTextureSize() const; |
| 253 | 253 |
| 254 /** |
| 255 * Returns the max sample count for a render target. It will be 0 if MSAA |
| 256 * is not supported. |
| 257 */ |
| 258 int getMaxSampleCount() const; |
| 259 |
| 254 /////////////////////////////////////////////////////////////////////////// | 260 /////////////////////////////////////////////////////////////////////////// |
| 255 // Render targets | 261 // Render targets |
| 256 | 262 |
| 257 /** | 263 /** |
| 258 * Sets the render target. | 264 * Sets the render target. |
| 259 * @param target the render target to set. (should not be NULL.) | 265 * @param target the render target to set. (should not be NULL.) |
| 260 */ | 266 */ |
| 261 void setRenderTarget(GrRenderTarget* target); | 267 void setRenderTarget(GrRenderTarget* target); |
| 262 | 268 |
| 263 /** | 269 /** |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 } | 1008 } |
| 1003 | 1009 |
| 1004 GrTexture* texture() { return fTexture; } | 1010 GrTexture* texture() { return fTexture; } |
| 1005 | 1011 |
| 1006 private: | 1012 private: |
| 1007 GrContext* fContext; | 1013 GrContext* fContext; |
| 1008 GrTexture* fTexture; | 1014 GrTexture* fTexture; |
| 1009 }; | 1015 }; |
| 1010 | 1016 |
| 1011 #endif | 1017 #endif |
| OLD | NEW |