OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef GrContext_DEFINED | 10 #ifndef GrContext_DEFINED |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class GrAutoScratchTexture; | 23 class GrAutoScratchTexture; |
24 class GrDrawState; | 24 class GrDrawState; |
25 class GrDrawTarget; | 25 class GrDrawTarget; |
26 class GrEffect; | 26 class GrEffect; |
27 class GrFontCache; | 27 class GrFontCache; |
28 class GrGpu; | 28 class GrGpu; |
29 class GrIndexBuffer; | 29 class GrIndexBuffer; |
30 class GrIndexBufferAllocPool; | 30 class GrIndexBufferAllocPool; |
31 class GrInOrderDrawBuffer; | 31 class GrInOrderDrawBuffer; |
| 32 class GrOvalRenderer; |
32 class GrPathRenderer; | 33 class GrPathRenderer; |
33 class GrResourceEntry; | 34 class GrResourceEntry; |
34 class GrResourceCache; | 35 class GrResourceCache; |
35 class GrStencilBuffer; | 36 class GrStencilBuffer; |
36 class GrTextureParams; | 37 class GrTextureParams; |
37 class GrVertexBuffer; | 38 class GrVertexBuffer; |
38 class GrVertexBufferAllocPool; | 39 class GrVertexBufferAllocPool; |
39 class GrSoftwarePathRenderer; | 40 class GrSoftwarePathRenderer; |
40 class SkStrokeRec; | 41 class SkStrokeRec; |
41 | 42 |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 GrFontCache* fFontCache; | 860 GrFontCache* fFontCache; |
860 | 861 |
861 GrPathRendererChain* fPathRendererChain; | 862 GrPathRendererChain* fPathRendererChain; |
862 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 863 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
863 | 864 |
864 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; | 865 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; |
865 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; | 866 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; |
866 GrInOrderDrawBuffer* fDrawBuffer; | 867 GrInOrderDrawBuffer* fDrawBuffer; |
867 | 868 |
868 GrAARectRenderer* fAARectRenderer; | 869 GrAARectRenderer* fAARectRenderer; |
| 870 GrOvalRenderer* fOvalRenderer; |
869 | 871 |
870 bool fDidTestPMConversions; | 872 bool fDidTestPMConversions; |
871 int fPMToUPMConversion; | 873 int fPMToUPMConversion; |
872 int fUPMToPMConversion; | 874 int fUPMToPMConversion; |
873 | 875 |
874 struct CleanUpData { | 876 struct CleanUpData { |
875 PFCleanUpFunc fFunc; | 877 PFCleanUpFunc fFunc; |
876 void* fInfo; | 878 void* fInfo; |
877 }; | 879 }; |
878 | 880 |
879 SkTDArray<CleanUpData> fCleanUpData; | 881 SkTDArray<CleanUpData> fCleanUpData; |
880 | 882 |
881 GrContext(); // init must be called after the constructor. | 883 GrContext(); // init must be called after the constructor. |
882 bool init(GrBackend, GrBackendContext); | 884 bool init(GrBackend, GrBackendContext); |
883 | 885 |
884 void setupDrawBuffer(); | 886 void setupDrawBuffer(); |
885 | 887 |
886 void flushDrawBuffer(); | 888 void flushDrawBuffer(); |
887 | 889 |
888 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the | 890 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the |
889 /// draw state is left unmodified. | 891 /// draw state is left unmodified. |
890 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw); | 892 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw); |
891 | 893 |
892 void internalDrawPath(const GrPaint& paint, const SkPath& path, const SkStro
keRec& stroke); | 894 void internalDrawPath(GrDrawTarget* target, const GrPaint& paint, const SkPa
th& path, |
893 | 895 const SkStrokeRec& stroke); |
894 void internalDrawOval(const GrPaint& paint, const GrRect& oval, const SkStro
keRec& stroke); | |
895 void internalDrawCircle(const GrPaint& paint, const GrRect& circle, const Sk
StrokeRec& stroke); | |
896 bool canDrawOval(const GrPaint& paint, const GrRect& oval, bool* isCircle) c
onst; | |
897 | 896 |
898 GrTexture* createResizedTexture(const GrTextureDesc& desc, | 897 GrTexture* createResizedTexture(const GrTextureDesc& desc, |
899 const GrCacheID& cacheID, | 898 const GrCacheID& cacheID, |
900 void* srcData, | 899 void* srcData, |
901 size_t rowBytes, | 900 size_t rowBytes, |
902 bool needsFiltering); | 901 bool needsFiltering); |
903 | 902 |
904 // Needed so GrTexture's returnToCache helper function can call | 903 // Needed so GrTexture's returnToCache helper function can call |
905 // addExistingTextureToCache | 904 // addExistingTextureToCache |
906 friend class GrTexture; | 905 friend class GrTexture; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 } | 1000 } |
1002 | 1001 |
1003 GrTexture* texture() { return fTexture; } | 1002 GrTexture* texture() { return fTexture; } |
1004 | 1003 |
1005 private: | 1004 private: |
1006 GrContext* fContext; | 1005 GrContext* fContext; |
1007 GrTexture* fTexture; | 1006 GrTexture* fTexture; |
1008 }; | 1007 }; |
1009 | 1008 |
1010 #endif | 1009 #endif |
OLD | NEW |