| 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 23 matching lines...) Expand all Loading... |
| 34 class GrPipelineBuilder; | 34 class GrPipelineBuilder; |
| 35 class GrResourceEntry; | 35 class GrResourceEntry; |
| 36 class GrResourceCache; | 36 class GrResourceCache; |
| 37 class GrTestTarget; | 37 class GrTestTarget; |
| 38 class GrTextContext; | 38 class GrTextContext; |
| 39 class GrTextureParams; | 39 class GrTextureParams; |
| 40 class GrVertexBuffer; | 40 class GrVertexBuffer; |
| 41 class GrVertexBufferAllocPool; | 41 class GrVertexBufferAllocPool; |
| 42 class GrStrokeInfo; | 42 class GrStrokeInfo; |
| 43 class GrSoftwarePathRenderer; | 43 class GrSoftwarePathRenderer; |
| 44 class SkGpuDevice; |
| 44 class SkStrokeRec; | 45 class SkStrokeRec; |
| 45 | 46 |
| 46 class SK_API GrContext : public SkRefCnt { | 47 class SK_API GrContext : public SkRefCnt { |
| 47 public: | 48 public: |
| 48 SK_DECLARE_INST_COUNT(GrContext) | 49 SK_DECLARE_INST_COUNT(GrContext) |
| 49 | 50 |
| 50 struct Options { | 51 struct Options { |
| 51 Options() : fDrawPathToCompressedTexture(false) { } | 52 Options() : fDrawPathToCompressedTexture(false) { } |
| 52 | 53 |
| 53 // EXPERIMENTAL | 54 // EXPERIMENTAL |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 */ | 202 */ |
| 202 bool isResourceInCache(const GrUniqueKey& key) const; | 203 bool isResourceInCache(const GrUniqueKey& key) const; |
| 203 | 204 |
| 204 /** | 205 /** |
| 205 * Creates a new text rendering context that is optimal for the | 206 * Creates a new text rendering context that is optimal for the |
| 206 * render target and the context. Caller assumes the ownership | 207 * render target and the context. Caller assumes the ownership |
| 207 * of the returned object. The returned object must be deleted | 208 * of the returned object. The returned object must be deleted |
| 208 * before the context is destroyed. | 209 * before the context is destroyed. |
| 209 */ | 210 */ |
| 210 GrTextContext* createTextContext(GrRenderTarget*, | 211 GrTextContext* createTextContext(GrRenderTarget*, |
| 212 SkGpuDevice*, |
| 211 const SkDeviceProperties&, | 213 const SkDeviceProperties&, |
| 212 bool enableDistanceFieldFonts); | 214 bool enableDistanceFieldFonts); |
| 213 | 215 |
| 214 /////////////////////////////////////////////////////////////////////////// | 216 /////////////////////////////////////////////////////////////////////////// |
| 215 // Textures | 217 // Textures |
| 216 | 218 |
| 217 /** | 219 /** |
| 218 * Creates a new texture in the resource cache and returns it. The caller ow
ns a | 220 * Creates a new texture in the resource cache and returns it. The caller ow
ns a |
| 219 * ref on the returned texture which must be balanced by a call to unref. | 221 * ref on the returned texture which must be balanced by a call to unref. |
| 220 * | 222 * |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 /** | 775 /** |
| 774 * This callback allows the resource cache to callback into the GrContext | 776 * This callback allows the resource cache to callback into the GrContext |
| 775 * when the cache is still over budget after a purge. | 777 * when the cache is still over budget after a purge. |
| 776 */ | 778 */ |
| 777 static void OverBudgetCB(void* data); | 779 static void OverBudgetCB(void* data); |
| 778 | 780 |
| 779 typedef SkRefCnt INHERITED; | 781 typedef SkRefCnt INHERITED; |
| 780 }; | 782 }; |
| 781 | 783 |
| 782 #endif | 784 #endif |
| OLD | NEW |