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 10 matching lines...) Expand all Loading... |
21 class GrAARectRenderer; | 21 class GrAARectRenderer; |
22 class GrAutoScratchTexture; | 22 class GrAutoScratchTexture; |
23 class GrDrawState; | 23 class GrDrawState; |
24 class GrDrawTarget; | 24 class GrDrawTarget; |
25 class GrEffect; | 25 class GrEffect; |
26 class GrFontCache; | 26 class GrFontCache; |
27 class GrGpu; | 27 class GrGpu; |
28 class GrIndexBuffer; | 28 class GrIndexBuffer; |
29 class GrIndexBufferAllocPool; | 29 class GrIndexBufferAllocPool; |
30 class GrInOrderDrawBuffer; | 30 class GrInOrderDrawBuffer; |
| 31 class GrLayerCache; |
31 class GrOvalRenderer; | 32 class GrOvalRenderer; |
32 class GrPath; | 33 class GrPath; |
33 class GrPathRenderer; | 34 class GrPathRenderer; |
34 class GrResourceEntry; | 35 class GrResourceEntry; |
35 class GrResourceCache; | 36 class GrResourceCache; |
36 class GrStencilBuffer; | 37 class GrStencilBuffer; |
37 class GrTestTarget; | 38 class GrTestTarget; |
38 class GrTextureParams; | 39 class GrTextureParams; |
39 class GrVertexBuffer; | 40 class GrVertexBuffer; |
40 class GrVertexBufferAllocPool; | 41 class GrVertexBufferAllocPool; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 AutoClip fAutoClip; | 854 AutoClip fAutoClip; |
854 AutoRenderTarget fAutoRT; | 855 AutoRenderTarget fAutoRT; |
855 AutoMatrix fAutoMatrix; | 856 AutoMatrix fAutoMatrix; |
856 }; | 857 }; |
857 | 858 |
858 /////////////////////////////////////////////////////////////////////////// | 859 /////////////////////////////////////////////////////////////////////////// |
859 // Functions intended for internal use only. | 860 // Functions intended for internal use only. |
860 GrGpu* getGpu() { return fGpu; } | 861 GrGpu* getGpu() { return fGpu; } |
861 const GrGpu* getGpu() const { return fGpu; } | 862 const GrGpu* getGpu() const { return fGpu; } |
862 GrFontCache* getFontCache() { return fFontCache; } | 863 GrFontCache* getFontCache() { return fFontCache; } |
| 864 GrLayerCache* getLayerCache() { return fLayerCache.get(); } |
863 GrDrawTarget* getTextTarget(); | 865 GrDrawTarget* getTextTarget(); |
864 const GrIndexBuffer* getQuadIndexBuffer() const; | 866 const GrIndexBuffer* getQuadIndexBuffer() const; |
865 | 867 |
866 // Called by tests that draw directly to the context via GrDrawTarget | 868 // Called by tests that draw directly to the context via GrDrawTarget |
867 void getTestTarget(GrTestTarget*); | 869 void getTestTarget(GrTestTarget*); |
868 | 870 |
869 // Functions for managing gpu trace markers | 871 // Functions for managing gpu trace markers |
870 bool isGpuTracingEnabled() const { return fGpuTracingEnabled; } | 872 bool isGpuTracingEnabled() const { return fGpuTracingEnabled; } |
871 void enableGpuTracing() { fGpuTracingEnabled = true; } | 873 void enableGpuTracing() { fGpuTracingEnabled = true; } |
872 void disableGpuTracing() { fGpuTracingEnabled = false; } | 874 void disableGpuTracing() { fGpuTracingEnabled = false; } |
(...skipping 27 matching lines...) Expand all Loading... |
900 BufferedDraw fLastDrawWasBuffered; | 902 BufferedDraw fLastDrawWasBuffered; |
901 | 903 |
902 GrGpu* fGpu; | 904 GrGpu* fGpu; |
903 SkMatrix fViewMatrix; | 905 SkMatrix fViewMatrix; |
904 SkAutoTUnref<GrRenderTarget> fRenderTarget; | 906 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
905 const GrClipData* fClip; // TODO: make this ref counted | 907 const GrClipData* fClip; // TODO: make this ref counted |
906 GrDrawState* fDrawState; | 908 GrDrawState* fDrawState; |
907 | 909 |
908 GrResourceCache* fTextureCache; | 910 GrResourceCache* fTextureCache; |
909 GrFontCache* fFontCache; | 911 GrFontCache* fFontCache; |
| 912 SkAutoTDelete<GrLayerCache> fLayerCache; |
910 | 913 |
911 GrPathRendererChain* fPathRendererChain; | 914 GrPathRendererChain* fPathRendererChain; |
912 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 915 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
913 | 916 |
914 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; | 917 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; |
915 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; | 918 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; |
916 GrInOrderDrawBuffer* fDrawBuffer; | 919 GrInOrderDrawBuffer* fDrawBuffer; |
917 | 920 |
918 // Set by OverbudgetCB() to request that GrContext flush before exiting a dr
aw. | 921 // Set by OverbudgetCB() to request that GrContext flush before exiting a dr
aw. |
919 bool fFlushToReduceCacheSize; | 922 bool fFlushToReduceCacheSize; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 } | 1078 } |
1076 | 1079 |
1077 GrTexture* texture() { return fTexture; } | 1080 GrTexture* texture() { return fTexture; } |
1078 | 1081 |
1079 private: | 1082 private: |
1080 GrContext* fContext; | 1083 GrContext* fContext; |
1081 GrTexture* fTexture; | 1084 GrTexture* fTexture; |
1082 }; | 1085 }; |
1083 | 1086 |
1084 #endif | 1087 #endif |
OLD | NEW |