| 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 GrDrawState*, |
| 777 const SkMatrix& viewMatrix, |
| 777 const SkPath& path, | 778 const SkPath& path, |
| 778 const SkStrokeRec& stroke, | 779 const SkStrokeRec& stroke, |
| 779 bool allowSW, | 780 bool allowSW, |
| 780 GrPathRendererChain::DrawType drawType = GrPathRendererChain
::kColor_DrawType, | 781 GrPathRendererChain::DrawType drawType = GrPathRendererChain
::kColor_DrawType, |
| 781 GrPathRendererChain::StencilSupport* stencilSupport = NULL); | 782 GrPathRendererChain::StencilSupport* stencilSupport = NULL); |
| 782 | 783 |
| 783 /** | 784 /** |
| 784 * 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 |
| 785 * constructor of this class. | 786 * constructor of this class. |
| 786 */ | 787 */ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 GrContext(const Options&); // init must be called after the constructor. | 854 GrContext(const Options&); // init must be called after the constructor. |
| 854 bool init(GrBackend, GrBackendContext); | 855 bool init(GrBackend, GrBackendContext); |
| 855 void initMockContext(); | 856 void initMockContext(); |
| 856 void initCommon(); | 857 void initCommon(); |
| 857 | 858 |
| 858 void setupDrawBuffer(); | 859 void setupDrawBuffer(); |
| 859 | 860 |
| 860 class AutoCheckFlush; | 861 class AutoCheckFlush; |
| 861 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the | 862 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the |
| 862 /// draw state is left unmodified. | 863 /// draw state is left unmodified. |
| 863 GrDrawTarget* prepareToDraw(GrDrawState* ds, | 864 GrDrawTarget* prepareToDraw(GrDrawState* ds, const GrPaint* paint, const Aut
oCheckFlush*); |
| 864 const GrPaint* paint, | |
| 865 const SkMatrix* viewMatrix, | |
| 866 const AutoCheckFlush*); | |
| 867 | 865 |
| 868 void internalDrawPath(GrDrawTarget*, | 866 void internalDrawPath(GrDrawTarget*, |
| 869 GrDrawState*, | 867 GrDrawState*, |
| 870 const SkMatrix& viewMatrix, | 868 const SkMatrix& viewMatrix, |
| 871 GrColor, | 869 GrColor, |
| 872 bool useAA, | 870 bool useAA, |
| 873 const SkPath&, | 871 const SkPath&, |
| 874 const GrStrokeInfo&); | 872 const GrStrokeInfo&); |
| 875 | 873 |
| 876 GrTexture* createResizedTexture(const GrSurfaceDesc& desc, | 874 GrTexture* createResizedTexture(const GrSurfaceDesc& desc, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 890 /** | 888 /** |
| 891 * This callback allows the resource cache to callback into the GrContext | 889 * This callback allows the resource cache to callback into the GrContext |
| 892 * when the cache is still over budget after a purge. | 890 * when the cache is still over budget after a purge. |
| 893 */ | 891 */ |
| 894 static void OverBudgetCB(void* data); | 892 static void OverBudgetCB(void* data); |
| 895 | 893 |
| 896 typedef SkRefCnt INHERITED; | 894 typedef SkRefCnt INHERITED; |
| 897 }; | 895 }; |
| 898 | 896 |
| 899 #endif | 897 #endif |
| OLD | NEW |