| 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 "GrClipData.h" | 11 #include "GrClipData.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 GrDrawState; | |
| 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; |
| 33 class GrPath; | 32 class GrPath; |
| 34 class GrPathRenderer; | 33 class GrPathRenderer; |
| 34 class GrPipelineBuilder; |
| 35 class GrResourceEntry; | 35 class GrResourceEntry; |
| 36 class GrResourceCache2; | 36 class GrResourceCache2; |
| 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; |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 GrResourceCache2* getResourceCache2() { return fResourceCache2; } | 766 GrResourceCache2* getResourceCache2() { return fResourceCache2; } |
| 767 | 767 |
| 768 // Called by tests that draw directly to the context via GrDrawTarget | 768 // Called by tests that draw directly to the context via GrDrawTarget |
| 769 void getTestTarget(GrTestTarget*); | 769 void getTestTarget(GrTestTarget*); |
| 770 | 770 |
| 771 void addGpuTraceMarker(const GrGpuTraceMarker* marker); | 771 void addGpuTraceMarker(const GrGpuTraceMarker* marker); |
| 772 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); | 772 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); |
| 773 | 773 |
| 774 GrPathRenderer* getPathRenderer( | 774 GrPathRenderer* getPathRenderer( |
| 775 const GrDrawTarget* target, | 775 const GrDrawTarget* target, |
| 776 const GrDrawState*, | 776 const GrPipelineBuilder*, |
| 777 const SkMatrix& viewMatrix, | 777 const SkMatrix& viewMatrix, |
| 778 const SkPath& path, | 778 const SkPath& path, |
| 779 const SkStrokeRec& stroke, | 779 const SkStrokeRec& stroke, |
| 780 bool allowSW, | 780 bool allowSW, |
| 781 GrPathRendererChain::DrawType drawType = GrPathRendererChain
::kColor_DrawType, | 781 GrPathRendererChain::DrawType drawType = GrPathRendererChain
::kColor_DrawType, |
| 782 GrPathRendererChain::StencilSupport* stencilSupport = NULL); | 782 GrPathRendererChain::StencilSupport* stencilSupport = NULL); |
| 783 | 783 |
| 784 /** | 784 /** |
| 785 * This returns a copy of the the GrContext::Options that was passed to the | 785 * This returns a copy of the the GrContext::Options that was passed to the |
| 786 * constructor of this class. | 786 * constructor of this class. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 GrContext(const Options&); // init must be called after the constructor. | 854 GrContext(const Options&); // init must be called after the constructor. |
| 855 bool init(GrBackend, GrBackendContext); | 855 bool init(GrBackend, GrBackendContext); |
| 856 void initMockContext(); | 856 void initMockContext(); |
| 857 void initCommon(); | 857 void initCommon(); |
| 858 | 858 |
| 859 void setupDrawBuffer(); | 859 void setupDrawBuffer(); |
| 860 | 860 |
| 861 class AutoCheckFlush; | 861 class AutoCheckFlush; |
| 862 // Sets the paint and returns the target to draw into. This function is ove
rloaded to either | 862 // Sets the paint and returns the target to draw into. This function is ove
rloaded to either |
| 863 // take a GrDrawState, GrPaint, and AutoCheckFlush, or JUST an AutoCheckFlus
h | 863 // take a GrDrawState, GrPaint, and AutoCheckFlush, or JUST an AutoCheckFlus
h |
| 864 GrDrawTarget* prepareToDraw(GrDrawState* ds, const GrPaint* paint, const Aut
oCheckFlush*); | 864 GrDrawTarget* prepareToDraw(GrPipelineBuilder*, const GrPaint* paint, const
AutoCheckFlush*); |
| 865 | 865 |
| 866 void internalDrawPath(GrDrawTarget*, | 866 void internalDrawPath(GrDrawTarget*, |
| 867 GrDrawState*, | 867 GrPipelineBuilder*, |
| 868 const SkMatrix& viewMatrix, | 868 const SkMatrix& viewMatrix, |
| 869 GrColor, | 869 GrColor, |
| 870 bool useAA, | 870 bool useAA, |
| 871 const SkPath&, | 871 const SkPath&, |
| 872 const GrStrokeInfo&); | 872 const GrStrokeInfo&); |
| 873 | 873 |
| 874 GrTexture* createResizedTexture(const GrSurfaceDesc& desc, | 874 GrTexture* createResizedTexture(const GrSurfaceDesc& desc, |
| 875 const GrCacheID& cacheID, | 875 const GrCacheID& cacheID, |
| 876 const void* srcData, | 876 const void* srcData, |
| 877 size_t rowBytes, | 877 size_t rowBytes, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 888 /** | 888 /** |
| 889 * This callback allows the resource cache to callback into the GrContext | 889 * This callback allows the resource cache to callback into the GrContext |
| 890 * when the cache is still over budget after a purge. | 890 * when the cache is still over budget after a purge. |
| 891 */ | 891 */ |
| 892 static void OverBudgetCB(void* data); | 892 static void OverBudgetCB(void* data); |
| 893 | 893 |
| 894 typedef SkRefCnt INHERITED; | 894 typedef SkRefCnt INHERITED; |
| 895 }; | 895 }; |
| 896 | 896 |
| 897 #endif | 897 #endif |
| OLD | NEW |