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 GrAutoScratchTexture; | 22 class GrAutoScratchTexture; |
23 class GrCacheable; | 23 class GrCacheable; |
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 GrGpuTraceMarker; |
29 class GrIndexBuffer; | 30 class GrIndexBuffer; |
30 class GrIndexBufferAllocPool; | 31 class GrIndexBufferAllocPool; |
31 class GrInOrderDrawBuffer; | 32 class GrInOrderDrawBuffer; |
32 class GrLayerCache; | 33 class GrLayerCache; |
33 class GrOvalRenderer; | 34 class GrOvalRenderer; |
34 class GrPath; | 35 class GrPath; |
35 class GrPathRenderer; | 36 class GrPathRenderer; |
36 class GrResourceEntry; | 37 class GrResourceEntry; |
37 class GrResourceCache; | 38 class GrResourceCache; |
38 class GrStencilBuffer; | 39 class GrStencilBuffer; |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } | 919 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } |
919 | 920 |
920 // Called by tests that draw directly to the context via GrDrawTarget | 921 // Called by tests that draw directly to the context via GrDrawTarget |
921 void getTestTarget(GrTestTarget*); | 922 void getTestTarget(GrTestTarget*); |
922 | 923 |
923 // Functions for managing gpu trace markers | 924 // Functions for managing gpu trace markers |
924 bool isGpuTracingEnabled() const { return fGpuTracingEnabled; } | 925 bool isGpuTracingEnabled() const { return fGpuTracingEnabled; } |
925 void enableGpuTracing() { fGpuTracingEnabled = true; } | 926 void enableGpuTracing() { fGpuTracingEnabled = true; } |
926 void disableGpuTracing() { fGpuTracingEnabled = false; } | 927 void disableGpuTracing() { fGpuTracingEnabled = false; } |
927 | 928 |
| 929 void addGpuTraceMarker(const GrGpuTraceMarker* marker); |
| 930 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); |
| 931 |
928 /** | 932 /** |
929 * Stencil buffers add themselves to the cache using addStencilBuffer. findS
tencilBuffer is | 933 * Stencil buffers add themselves to the cache using addStencilBuffer. findS
tencilBuffer is |
930 * called to check the cache for a SB that matches an RT's criteria. | 934 * called to check the cache for a SB that matches an RT's criteria. |
931 */ | 935 */ |
932 void addStencilBuffer(GrStencilBuffer* sb); | 936 void addStencilBuffer(GrStencilBuffer* sb); |
933 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); | 937 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); |
934 | 938 |
935 GrPathRenderer* getPathRenderer( | 939 GrPathRenderer* getPathRenderer( |
936 const SkPath& path, | 940 const SkPath& path, |
937 const SkStrokeRec& stroke, | 941 const SkStrokeRec& stroke, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 } | 1133 } |
1130 | 1134 |
1131 GrTexture* texture() { return fTexture; } | 1135 GrTexture* texture() { return fTexture; } |
1132 | 1136 |
1133 private: | 1137 private: |
1134 GrContext* fContext; | 1138 GrContext* fContext; |
1135 GrTexture* fTexture; | 1139 GrTexture* fTexture; |
1136 }; | 1140 }; |
1137 | 1141 |
1138 #endif | 1142 #endif |
OLD | NEW |