| 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); | 892 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); |
| 893 | 893 |
| 894 GrPathRenderer* getPathRenderer( | 894 GrPathRenderer* getPathRenderer( |
| 895 const SkPath& path, | 895 const SkPath& path, |
| 896 const SkStrokeRec& stroke, | 896 const SkStrokeRec& stroke, |
| 897 const GrDrawTarget* target, | 897 const GrDrawTarget* target, |
| 898 bool allowSW, | 898 bool allowSW, |
| 899 GrPathRendererChain::DrawType drawType = GrPathRendererChain
::kColor_DrawType, | 899 GrPathRendererChain::DrawType drawType = GrPathRendererChain
::kColor_DrawType, |
| 900 GrPathRendererChain::StencilSupport* stencilSupport = NULL); | 900 GrPathRendererChain::StencilSupport* stencilSupport = NULL); |
| 901 | 901 |
| 902 /** |
| 903 * Stores a custom resource in the cache, based on the specified key. |
| 904 */ |
| 905 void addResourceToCache(const GrResourceKey&, GrCacheable*); |
| 906 |
| 907 /** |
| 908 * Finds a resource in the cache, based on the specified key. This is intend
ed for use in |
| 909 * conjunction with addResourceToCache(). The return value will be NULL if n
ot found. The |
| 910 * caller must balance with a call to unref(). |
| 911 */ |
| 912 GrCacheable* findAndRefCachedResource(const GrResourceKey&); |
| 902 | 913 |
| 903 #if GR_CACHE_STATS | 914 #if GR_CACHE_STATS |
| 904 void printCacheStats() const; | 915 void printCacheStats() const; |
| 905 #endif | 916 #endif |
| 906 | 917 |
| 907 private: | 918 private: |
| 908 // Used to indicate whether a draw should be performed immediately or queued
in fDrawBuffer. | 919 // Used to indicate whether a draw should be performed immediately or queued
in fDrawBuffer. |
| 909 enum BufferedDraw { | 920 enum BufferedDraw { |
| 910 kYes_BufferedDraw, | 921 kYes_BufferedDraw, |
| 911 kNo_BufferedDraw, | 922 kNo_BufferedDraw, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 } | 1100 } |
| 1090 | 1101 |
| 1091 GrTexture* texture() { return fTexture; } | 1102 GrTexture* texture() { return fTexture; } |
| 1092 | 1103 |
| 1093 private: | 1104 private: |
| 1094 GrContext* fContext; | 1105 GrContext* fContext; |
| 1095 GrTexture* fTexture; | 1106 GrTexture* fTexture; |
| 1096 }; | 1107 }; |
| 1097 | 1108 |
| 1098 #endif | 1109 #endif |
| OLD | NEW |