| 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 |
| 11 #include "GrClip.h" | 11 #include "GrClip.h" |
| 12 #include "GrColor.h" | 12 #include "GrColor.h" |
| 13 #include "GrPaint.h" | 13 #include "GrPaint.h" |
| 14 #include "GrPathRendererChain.h" | 14 #include "GrPathRendererChain.h" |
| 15 #include "GrRenderTarget.h" | 15 #include "GrRenderTarget.h" |
| 16 #include "GrTexture.h" | 16 #include "GrTexture.h" |
| 17 #include "SkMatrix.h" | 17 #include "SkMatrix.h" |
| 18 #include "SkPathEffect.h" | 18 #include "SkPathEffect.h" |
| 19 #include "SkTypes.h" | 19 #include "SkTypes.h" |
| 20 | 20 |
| 21 class GrAARectRenderer; | 21 class GrAARectRenderer; |
| 22 class GrBatchFontCache; | |
| 23 class GrDrawTarget; | 22 class GrDrawTarget; |
| 24 class GrFontCache; | 23 class GrFontCache; |
| 25 class GrFragmentProcessor; | 24 class GrFragmentProcessor; |
| 26 class GrGpu; | 25 class GrGpu; |
| 27 class GrGpuTraceMarker; | 26 class GrGpuTraceMarker; |
| 28 class GrIndexBuffer; | 27 class GrIndexBuffer; |
| 29 class GrIndexBufferAllocPool; | 28 class GrIndexBufferAllocPool; |
| 30 class GrInOrderDrawBuffer; | 29 class GrInOrderDrawBuffer; |
| 31 class GrLayerCache; | 30 class GrLayerCache; |
| 32 class GrOvalRenderer; | 31 class GrOvalRenderer; |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 void discardRenderTarget(GrRenderTarget*); | 647 void discardRenderTarget(GrRenderTarget*); |
| 649 | 648 |
| 650 #ifdef SK_DEVELOPER | 649 #ifdef SK_DEVELOPER |
| 651 void dumpFontCache() const; | 650 void dumpFontCache() const; |
| 652 #endif | 651 #endif |
| 653 | 652 |
| 654 /////////////////////////////////////////////////////////////////////////// | 653 /////////////////////////////////////////////////////////////////////////// |
| 655 // Functions intended for internal use only. | 654 // Functions intended for internal use only. |
| 656 GrGpu* getGpu() { return fGpu; } | 655 GrGpu* getGpu() { return fGpu; } |
| 657 const GrGpu* getGpu() const { return fGpu; } | 656 const GrGpu* getGpu() const { return fGpu; } |
| 658 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } | |
| 659 GrFontCache* getFontCache() { return fFontCache; } | 657 GrFontCache* getFontCache() { return fFontCache; } |
| 660 GrLayerCache* getLayerCache() { return fLayerCache.get(); } | 658 GrLayerCache* getLayerCache() { return fLayerCache.get(); } |
| 661 GrDrawTarget* getTextTarget(); | 659 GrDrawTarget* getTextTarget(); |
| 662 const GrIndexBuffer* getQuadIndexBuffer() const; | 660 const GrIndexBuffer* getQuadIndexBuffer() const; |
| 663 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } | 661 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } |
| 664 GrResourceCache* getResourceCache() { return fResourceCache; } | 662 GrResourceCache* getResourceCache() { return fResourceCache; } |
| 665 | 663 |
| 666 // Called by tests that draw directly to the context via GrDrawTarget | 664 // Called by tests that draw directly to the context via GrDrawTarget |
| 667 void getTestTarget(GrTestTarget*); | 665 void getTestTarget(GrTestTarget*); |
| 668 | 666 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 690 void printCacheStats() const; | 688 void printCacheStats() const; |
| 691 | 689 |
| 692 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ | 690 /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ |
| 693 void dumpGpuStats(SkString*) const; | 691 void dumpGpuStats(SkString*) const; |
| 694 void printGpuStats() const; | 692 void printGpuStats() const; |
| 695 | 693 |
| 696 private: | 694 private: |
| 697 GrGpu* fGpu; | 695 GrGpu* fGpu; |
| 698 | 696 |
| 699 GrResourceCache* fResourceCache; | 697 GrResourceCache* fResourceCache; |
| 700 GrBatchFontCache* fBatchFontCache; | |
| 701 GrFontCache* fFontCache; | 698 GrFontCache* fFontCache; |
| 702 SkAutoTDelete<GrLayerCache> fLayerCache; | 699 SkAutoTDelete<GrLayerCache> fLayerCache; |
| 703 | 700 |
| 704 GrPathRendererChain* fPathRendererChain; | 701 GrPathRendererChain* fPathRendererChain; |
| 705 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 702 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
| 706 | 703 |
| 707 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; | 704 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; |
| 708 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; | 705 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; |
| 709 GrInOrderDrawBuffer* fDrawBuffer; | 706 GrInOrderDrawBuffer* fDrawBuffer; |
| 710 | 707 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 */ | 781 */ |
| 785 static void OverBudgetCB(void* data); | 782 static void OverBudgetCB(void* data); |
| 786 | 783 |
| 787 // TODO see note on createTextContext | 784 // TODO see note on createTextContext |
| 788 friend class SkGpuDevice; | 785 friend class SkGpuDevice; |
| 789 | 786 |
| 790 typedef SkRefCnt INHERITED; | 787 typedef SkRefCnt INHERITED; |
| 791 }; | 788 }; |
| 792 | 789 |
| 793 #endif | 790 #endif |
| OLD | NEW |