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 15 matching lines...) Expand all Loading... |
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 GrOvalRenderer; | 31 class GrOvalRenderer; |
32 class GrPathRenderer; | 32 class GrPathRenderer; |
33 class GrResourceEntry; | 33 class GrResourceEntry; |
34 class GrResourceCache; | 34 class GrResourceCache; |
35 class GrStencilBuffer; | 35 class GrStencilBuffer; |
| 36 class GrTestTarget; |
36 class GrTextureParams; | 37 class GrTextureParams; |
37 class GrVertexBuffer; | 38 class GrVertexBuffer; |
38 class GrVertexBufferAllocPool; | 39 class GrVertexBufferAllocPool; |
39 class GrSoftwarePathRenderer; | 40 class GrSoftwarePathRenderer; |
40 class SkStrokeRec; | 41 class SkStrokeRec; |
41 | 42 |
42 class SK_API GrContext : public GrRefCnt { | 43 class SK_API GrContext : public GrRefCnt { |
43 public: | 44 public: |
44 SK_DECLARE_INST_COUNT(GrContext) | 45 SK_DECLARE_INST_COUNT(GrContext) |
45 | 46 |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 }; | 819 }; |
819 | 820 |
820 /////////////////////////////////////////////////////////////////////////// | 821 /////////////////////////////////////////////////////////////////////////// |
821 // Functions intended for internal use only. | 822 // Functions intended for internal use only. |
822 GrGpu* getGpu() { return fGpu; } | 823 GrGpu* getGpu() { return fGpu; } |
823 const GrGpu* getGpu() const { return fGpu; } | 824 const GrGpu* getGpu() const { return fGpu; } |
824 GrFontCache* getFontCache() { return fFontCache; } | 825 GrFontCache* getFontCache() { return fFontCache; } |
825 GrDrawTarget* getTextTarget(); | 826 GrDrawTarget* getTextTarget(); |
826 const GrIndexBuffer* getQuadIndexBuffer() const; | 827 const GrIndexBuffer* getQuadIndexBuffer() const; |
827 | 828 |
| 829 // Called by tests that draw directly to the context via GrDrawTarget |
| 830 void getTestTarget(GrTestTarget*); |
| 831 |
828 /** | 832 /** |
829 * Stencil buffers add themselves to the cache using addStencilBuffer. findS
tencilBuffer is | 833 * Stencil buffers add themselves to the cache using addStencilBuffer. findS
tencilBuffer is |
830 * called to check the cache for a SB that matches an RT's criteria. | 834 * called to check the cache for a SB that matches an RT's criteria. |
831 */ | 835 */ |
832 void addStencilBuffer(GrStencilBuffer* sb); | 836 void addStencilBuffer(GrStencilBuffer* sb); |
833 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); | 837 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); |
834 | 838 |
835 GrPathRenderer* getPathRenderer( | 839 GrPathRenderer* getPathRenderer( |
836 const SkPath& path, | 840 const SkPath& path, |
837 const SkStrokeRec& stroke, | 841 const SkStrokeRec& stroke, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 } | 1017 } |
1014 | 1018 |
1015 GrTexture* texture() { return fTexture; } | 1019 GrTexture* texture() { return fTexture; } |
1016 | 1020 |
1017 private: | 1021 private: |
1018 GrContext* fContext; | 1022 GrContext* fContext; |
1019 GrTexture* fTexture; | 1023 GrTexture* fTexture; |
1020 }; | 1024 }; |
1021 | 1025 |
1022 #endif | 1026 #endif |
OLD | NEW |