| 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 |
| 11 #include "GrClipData.h" | 11 #include "GrClipData.h" |
| 12 #include "GrColor.h" | 12 #include "GrColor.h" |
| 13 #include "GrPaint.h" | 13 #include "GrPaint.h" |
| 14 #include "GrPathRendererChain.h" | 14 #include "GrPathRendererChain.h" |
| 15 #include "GrRenderTarget.h" | 15 #include "GrRenderTarget.h" |
| 16 #include "GrTexture.h" | 16 #include "GrTexture.h" |
| 17 #include "SkMatrix.h" | 17 #include "SkMatrix.h" |
| 18 #include "SkPathEffect.h" | 18 #include "SkPathEffect.h" |
| 19 #include "SkTypes.h" | 19 #include "SkTypes.h" |
| 20 | 20 |
| 21 class GrAARectRenderer; | 21 class GrAARectRenderer; |
| 22 class GrAutoScratchTexture; | 22 class GrAutoScratchTexture; |
| 23 class GrCacheable; | |
| 24 class GrDrawState; | 23 class GrDrawState; |
| 25 class GrDrawTarget; | 24 class GrDrawTarget; |
| 26 class GrEffect; | 25 class GrEffect; |
| 27 class GrFontCache; | 26 class GrFontCache; |
| 28 class GrGpu; | 27 class GrGpu; |
| 29 class GrGpuTraceMarker; | 28 class GrGpuTraceMarker; |
| 30 class GrIndexBuffer; | 29 class GrIndexBuffer; |
| 31 class GrIndexBufferAllocPool; | 30 class GrIndexBufferAllocPool; |
| 32 class GrInOrderDrawBuffer; | 31 class GrInOrderDrawBuffer; |
| 33 class GrLayerCache; | 32 class GrLayerCache; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 /** | 178 /** |
| 180 * Purge all the unlocked resources from the cache. | 179 * Purge all the unlocked resources from the cache. |
| 181 * This entry point is mainly meant for timing texture uploads | 180 * This entry point is mainly meant for timing texture uploads |
| 182 * and is not defined in normal builds of Skia. | 181 * and is not defined in normal builds of Skia. |
| 183 */ | 182 */ |
| 184 void purgeAllUnlockedResources(); | 183 void purgeAllUnlockedResources(); |
| 185 | 184 |
| 186 /** | 185 /** |
| 187 * Stores a custom resource in the cache, based on the specified key. | 186 * Stores a custom resource in the cache, based on the specified key. |
| 188 */ | 187 */ |
| 189 void addResourceToCache(const GrResourceKey&, GrCacheable*); | 188 void addResourceToCache(const GrResourceKey&, GrGpuObject*); |
| 190 | 189 |
| 191 /** | 190 /** |
| 192 * Finds a resource in the cache, based on the specified key. This is intend
ed for use in | 191 * Finds a resource in the cache, based on the specified key. This is intend
ed for use in |
| 193 * conjunction with addResourceToCache(). The return value will be NULL if n
ot found. The | 192 * conjunction with addResourceToCache(). The return value will be NULL if n
ot found. The |
| 194 * caller must balance with a call to unref(). | 193 * caller must balance with a call to unref(). |
| 195 */ | 194 */ |
| 196 GrCacheable* findAndRefCachedResource(const GrResourceKey&); | 195 GrGpuObject* findAndRefCachedResource(const GrResourceKey&); |
| 197 | 196 |
| 198 /** | 197 /** |
| 199 * Creates a new text rendering context that is optimal for the | 198 * Creates a new text rendering context that is optimal for the |
| 200 * render target and the context. Caller assumes the ownership | 199 * render target and the context. Caller assumes the ownership |
| 201 * of the returned object. The returned object must be deleted | 200 * of the returned object. The returned object must be deleted |
| 202 * before the context is destroyed. | 201 * before the context is destroyed. |
| 203 */ | 202 */ |
| 204 GrTextContext* createTextContext(GrRenderTarget*, | 203 GrTextContext* createTextContext(GrRenderTarget*, |
| 205 const SkDeviceProperties&, | 204 const SkDeviceProperties&, |
| 206 bool enableDistanceFieldFonts); | 205 bool enableDistanceFieldFonts); |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 } | 1144 } |
| 1146 | 1145 |
| 1147 GrTexture* texture() { return fTexture; } | 1146 GrTexture* texture() { return fTexture; } |
| 1148 | 1147 |
| 1149 private: | 1148 private: |
| 1150 GrContext* fContext; | 1149 GrContext* fContext; |
| 1151 GrTexture* fTexture; | 1150 GrTexture* fTexture; |
| 1152 }; | 1151 }; |
| 1153 | 1152 |
| 1154 #endif | 1153 #endif |
| OLD | NEW |