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 18 matching lines...) Expand all Loading... |
29 class GrIndexBufferAllocPool; | 29 class GrIndexBufferAllocPool; |
30 class GrInOrderDrawBuffer; | 30 class GrInOrderDrawBuffer; |
31 class GrLayerCache; | 31 class GrLayerCache; |
32 class GrOvalRenderer; | 32 class GrOvalRenderer; |
33 class GrPath; | 33 class GrPath; |
34 class GrPathRenderer; | 34 class GrPathRenderer; |
35 class GrPipelineBuilder; | 35 class GrPipelineBuilder; |
36 class GrResourceEntry; | 36 class GrResourceEntry; |
37 class GrResourceCache; | 37 class GrResourceCache; |
38 class GrTestTarget; | 38 class GrTestTarget; |
| 39 class GrTextBlobCache; |
39 class GrTextContext; | 40 class GrTextContext; |
40 class GrTextureParams; | 41 class GrTextureParams; |
41 class GrVertexBuffer; | 42 class GrVertexBuffer; |
42 class GrVertexBufferAllocPool; | 43 class GrVertexBufferAllocPool; |
43 class GrStrokeInfo; | 44 class GrStrokeInfo; |
44 class GrSoftwarePathRenderer; | 45 class GrSoftwarePathRenderer; |
45 class SkGpuDevice; | 46 class SkGpuDevice; |
46 class SkStrokeRec; | 47 class SkStrokeRec; |
47 | 48 |
48 class SK_API GrContext : public SkRefCnt { | 49 class SK_API GrContext : public SkRefCnt { |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 void dumpFontCache() const; | 652 void dumpFontCache() const; |
652 #endif | 653 #endif |
653 | 654 |
654 /////////////////////////////////////////////////////////////////////////// | 655 /////////////////////////////////////////////////////////////////////////// |
655 // Functions intended for internal use only. | 656 // Functions intended for internal use only. |
656 GrGpu* getGpu() { return fGpu; } | 657 GrGpu* getGpu() { return fGpu; } |
657 const GrGpu* getGpu() const { return fGpu; } | 658 const GrGpu* getGpu() const { return fGpu; } |
658 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } | 659 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } |
659 GrFontCache* getFontCache() { return fFontCache; } | 660 GrFontCache* getFontCache() { return fFontCache; } |
660 GrLayerCache* getLayerCache() { return fLayerCache.get(); } | 661 GrLayerCache* getLayerCache() { return fLayerCache.get(); } |
| 662 GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; } |
661 GrDrawTarget* getTextTarget(); | 663 GrDrawTarget* getTextTarget(); |
662 const GrIndexBuffer* getQuadIndexBuffer() const; | 664 const GrIndexBuffer* getQuadIndexBuffer() const; |
663 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } | 665 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } |
664 GrResourceCache* getResourceCache() { return fResourceCache; } | 666 GrResourceCache* getResourceCache() { return fResourceCache; } |
665 | 667 |
666 // Called by tests that draw directly to the context via GrDrawTarget | 668 // Called by tests that draw directly to the context via GrDrawTarget |
667 void getTestTarget(GrTestTarget*); | 669 void getTestTarget(GrTestTarget*); |
668 | 670 |
669 void addGpuTraceMarker(const GrGpuTraceMarker* marker); | 671 void addGpuTraceMarker(const GrGpuTraceMarker* marker); |
670 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); | 672 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); |
(...skipping 22 matching lines...) Expand all Loading... |
693 void dumpGpuStats(SkString*) const; | 695 void dumpGpuStats(SkString*) const; |
694 void printGpuStats() const; | 696 void printGpuStats() const; |
695 | 697 |
696 private: | 698 private: |
697 GrGpu* fGpu; | 699 GrGpu* fGpu; |
698 | 700 |
699 GrResourceCache* fResourceCache; | 701 GrResourceCache* fResourceCache; |
700 GrBatchFontCache* fBatchFontCache; | 702 GrBatchFontCache* fBatchFontCache; |
701 GrFontCache* fFontCache; | 703 GrFontCache* fFontCache; |
702 SkAutoTDelete<GrLayerCache> fLayerCache; | 704 SkAutoTDelete<GrLayerCache> fLayerCache; |
| 705 SkAutoTDelete<GrTextBlobCache> fTextBlobCache; |
703 | 706 |
704 GrPathRendererChain* fPathRendererChain; | 707 GrPathRendererChain* fPathRendererChain; |
705 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 708 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
706 | 709 |
707 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; | 710 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; |
708 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; | 711 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; |
709 GrInOrderDrawBuffer* fDrawBuffer; | 712 GrInOrderDrawBuffer* fDrawBuffer; |
710 | 713 |
711 // Set by OverbudgetCB() to request that GrContext flush before exiting a dr
aw. | 714 // Set by OverbudgetCB() to request that GrContext flush before exiting a dr
aw. |
712 bool fFlushToReduceCacheSize; | 715 bool fFlushToReduceCacheSize; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 */ | 787 */ |
785 static void OverBudgetCB(void* data); | 788 static void OverBudgetCB(void* data); |
786 | 789 |
787 // TODO see note on createTextContext | 790 // TODO see note on createTextContext |
788 friend class SkGpuDevice; | 791 friend class SkGpuDevice; |
789 | 792 |
790 typedef SkRefCnt INHERITED; | 793 typedef SkRefCnt INHERITED; |
791 }; | 794 }; |
792 | 795 |
793 #endif | 796 #endif |
OLD | NEW |