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 11 matching lines...) Expand all Loading... | |
22 class GrAutoScratchTexture; | 22 class GrAutoScratchTexture; |
23 class GrDrawState; | 23 class GrDrawState; |
24 class GrDrawTarget; | 24 class GrDrawTarget; |
25 class GrEffect; | 25 class GrEffect; |
26 class GrFontCache; | 26 class GrFontCache; |
27 class GrGpu; | 27 class GrGpu; |
28 class GrIndexBuffer; | 28 class GrIndexBuffer; |
29 class GrIndexBufferAllocPool; | 29 class GrIndexBufferAllocPool; |
30 class GrInOrderDrawBuffer; | 30 class GrInOrderDrawBuffer; |
31 class GrOvalRenderer; | 31 class GrOvalRenderer; |
32 class GrPath; | |
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 GrTestTarget; | 37 class GrTestTarget; |
37 class GrTextureParams; | 38 class GrTextureParams; |
38 class GrVertexBuffer; | 39 class GrVertexBuffer; |
39 class GrVertexBufferAllocPool; | 40 class GrVertexBufferAllocPool; |
40 class GrSoftwarePathRenderer; | 41 class GrSoftwarePathRenderer; |
41 class SkStrokeRec; | 42 class SkStrokeRec; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 | 257 |
257 /** | 258 /** |
258 * Temporarily override the true max texture size. Note: an override | 259 * Temporarily override the true max texture size. Note: an override |
259 * larger then the true max texture size will have no effect. | 260 * larger then the true max texture size will have no effect. |
260 * This entry point is mainly meant for testing texture size dependent | 261 * This entry point is mainly meant for testing texture size dependent |
261 * features and is only available if defined outside of Skia (see | 262 * features and is only available if defined outside of Skia (see |
262 * bleed GM. | 263 * bleed GM. |
263 */ | 264 */ |
264 void setMaxTextureSizeOverride(int maxTextureSizeOverride); | 265 void setMaxTextureSizeOverride(int maxTextureSizeOverride); |
265 | 266 |
267 // Other resources | |
268 | |
269 /** Creates a new gpu path, based on the specified path and stroke and retur ns it. | |
270 * The caller owns a ref on the returned path which must be balanced by a ca ll to unref. | |
271 * | |
272 * @param skPath the path geometry. | |
273 * @param stroke the path stroke. | |
274 * @return a new path or NULL if the operation is not supported by the backe nd. | |
275 */ | |
276 GrPath* createPath(const SkPath& skPath, const SkStrokeRec& stroke); | |
bsalomon
2013/10/18 13:25:24
I'm wondering if there is any way to avoid this as
Kimmo Kinnunen
2013/10/21 13:40:48
Done.
| |
277 | |
266 /////////////////////////////////////////////////////////////////////////// | 278 /////////////////////////////////////////////////////////////////////////// |
267 // Render targets | 279 // Render targets |
268 | 280 |
269 /** | 281 /** |
270 * Sets the render target. | 282 * Sets the render target. |
271 * @param target the render target to set. | 283 * @param target the render target to set. |
272 */ | 284 */ |
273 void setRenderTarget(GrRenderTarget* target) { | 285 void setRenderTarget(GrRenderTarget* target) { |
274 fRenderTarget.reset(SkSafeRef(target)); | 286 fRenderTarget.reset(SkSafeRef(target)); |
275 } | 287 } |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
861 }; | 873 }; |
862 BufferedDraw fLastDrawWasBuffered; | 874 BufferedDraw fLastDrawWasBuffered; |
863 | 875 |
864 GrGpu* fGpu; | 876 GrGpu* fGpu; |
865 SkMatrix fViewMatrix; | 877 SkMatrix fViewMatrix; |
866 SkAutoTUnref<GrRenderTarget> fRenderTarget; | 878 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
867 const GrClipData* fClip; // TODO: make this ref counted | 879 const GrClipData* fClip; // TODO: make this ref counted |
868 GrDrawState* fDrawState; | 880 GrDrawState* fDrawState; |
869 | 881 |
870 GrResourceCache* fTextureCache; | 882 GrResourceCache* fTextureCache; |
883 GrResourceCache* fPathCache; // TODO: merge this with fTextur eCache. | |
871 GrFontCache* fFontCache; | 884 GrFontCache* fFontCache; |
872 | 885 |
873 GrPathRendererChain* fPathRendererChain; | 886 GrPathRendererChain* fPathRendererChain; |
874 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 887 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
875 | 888 |
876 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; | 889 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; |
877 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; | 890 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; |
878 GrInOrderDrawBuffer* fDrawBuffer; | 891 GrInOrderDrawBuffer* fDrawBuffer; |
879 | 892 |
880 // Set by OverbudgetCB() to request that GrContext flush before exiting a dr aw. | 893 // Set by OverbudgetCB() to request that GrContext flush before exiting a dr aw. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1025 } | 1038 } |
1026 | 1039 |
1027 GrTexture* texture() { return fTexture; } | 1040 GrTexture* texture() { return fTexture; } |
1028 | 1041 |
1029 private: | 1042 private: |
1030 GrContext* fContext; | 1043 GrContext* fContext; |
1031 GrTexture* fTexture; | 1044 GrTexture* fTexture; |
1032 }; | 1045 }; |
1033 | 1046 |
1034 #endif | 1047 #endif |
OLD | NEW |