| 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 GrGpuTraceMarker; | 26 class GrGpuTraceMarker; |
| 27 class GrIndexBuffer; | 27 class GrIndexBuffer; |
| 28 class GrIndexBufferAllocPool; | 28 class GrIndexBufferAllocPool; |
| 29 class GrInOrderDrawBuffer; | 29 class GrInOrderDrawBuffer; |
| 30 class GrLayerCache; | 30 class GrLayerCache; |
| 31 class GrOvalRenderer; | 31 class GrOvalRenderer; |
| 32 class GrPath; | 32 class GrPath; |
| 33 class GrPathRenderer; | 33 class GrPathRenderer; |
| 34 class GrPipelineBuilder; | 34 class GrPipelineBuilder; |
| 35 class GrResourceEntry; | 35 class GrResourceEntry; |
| 36 class GrResourceCache2; | 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 SkStrokeRec; | 44 class SkStrokeRec; |
| 45 | 45 |
| 46 class SK_API GrContext : public SkRefCnt { | 46 class SK_API GrContext : public SkRefCnt { |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 748 |
| 749 /////////////////////////////////////////////////////////////////////////// | 749 /////////////////////////////////////////////////////////////////////////// |
| 750 // Functions intended for internal use only. | 750 // Functions intended for internal use only. |
| 751 GrGpu* getGpu() { return fGpu; } | 751 GrGpu* getGpu() { return fGpu; } |
| 752 const GrGpu* getGpu() const { return fGpu; } | 752 const GrGpu* getGpu() const { return fGpu; } |
| 753 GrFontCache* getFontCache() { return fFontCache; } | 753 GrFontCache* getFontCache() { return fFontCache; } |
| 754 GrLayerCache* getLayerCache() { return fLayerCache.get(); } | 754 GrLayerCache* getLayerCache() { return fLayerCache.get(); } |
| 755 GrDrawTarget* getTextTarget(); | 755 GrDrawTarget* getTextTarget(); |
| 756 const GrIndexBuffer* getQuadIndexBuffer() const; | 756 const GrIndexBuffer* getQuadIndexBuffer() const; |
| 757 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } | 757 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } |
| 758 GrResourceCache2* getResourceCache2() { return fResourceCache2; } | 758 GrResourceCache* getResourceCache() { return fResourceCache; } |
| 759 | 759 |
| 760 // Called by tests that draw directly to the context via GrDrawTarget | 760 // Called by tests that draw directly to the context via GrDrawTarget |
| 761 void getTestTarget(GrTestTarget*); | 761 void getTestTarget(GrTestTarget*); |
| 762 | 762 |
| 763 void addGpuTraceMarker(const GrGpuTraceMarker* marker); | 763 void addGpuTraceMarker(const GrGpuTraceMarker* marker); |
| 764 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); | 764 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); |
| 765 | 765 |
| 766 GrPathRenderer* getPathRenderer( | 766 GrPathRenderer* getPathRenderer( |
| 767 const GrDrawTarget* target, | 767 const GrDrawTarget* target, |
| 768 const GrPipelineBuilder*, | 768 const GrPipelineBuilder*, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 785 | 785 |
| 786 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ | 786 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ |
| 787 void dumpGpuStats(SkString*) const; | 787 void dumpGpuStats(SkString*) const; |
| 788 void printGpuStats() const; | 788 void printGpuStats() const; |
| 789 | 789 |
| 790 private: | 790 private: |
| 791 GrGpu* fGpu; | 791 GrGpu* fGpu; |
| 792 SkAutoTUnref<GrRenderTarget> fRenderTarget; | 792 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
| 793 const GrClipData* fClip; // TODO: make this ref counted | 793 const GrClipData* fClip; // TODO: make this ref counted |
| 794 | 794 |
| 795 GrResourceCache2* fResourceCache2; | 795 GrResourceCache* fResourceCache; |
| 796 GrFontCache* fFontCache; | 796 GrFontCache* fFontCache; |
| 797 SkAutoTDelete<GrLayerCache> fLayerCache; | 797 SkAutoTDelete<GrLayerCache> fLayerCache; |
| 798 | 798 |
| 799 GrPathRendererChain* fPathRendererChain; | 799 GrPathRendererChain* fPathRendererChain; |
| 800 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 800 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
| 801 | 801 |
| 802 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; | 802 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; |
| 803 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; | 803 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; |
| 804 GrInOrderDrawBuffer* fDrawBuffer; | 804 GrInOrderDrawBuffer* fDrawBuffer; |
| 805 | 805 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 /** | 856 /** |
| 857 * This callback allows the resource cache to callback into the GrContext | 857 * This callback allows the resource cache to callback into the GrContext |
| 858 * when the cache is still over budget after a purge. | 858 * when the cache is still over budget after a purge. |
| 859 */ | 859 */ |
| 860 static void OverBudgetCB(void* data); | 860 static void OverBudgetCB(void* data); |
| 861 | 861 |
| 862 typedef SkRefCnt INHERITED; | 862 typedef SkRefCnt INHERITED; |
| 863 }; | 863 }; |
| 864 | 864 |
| 865 #endif | 865 #endif |
| OLD | NEW |