| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrDrawingManager_DEFINED | 8 #ifndef GrDrawingManager_DEFINED |
| 9 #define GrDrawingManager_DEFINED | 9 #define GrDrawingManager_DEFINED |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // | 24 // |
| 25 // In the future this class will allocate a new GrDrawContext for | 25 // In the future this class will allocate a new GrDrawContext for |
| 26 // each GrRenderTarget/GrDrawTarget and manage the DAG. | 26 // each GrRenderTarget/GrDrawTarget and manage the DAG. |
| 27 class GrDrawingManager { | 27 class GrDrawingManager { |
| 28 public: | 28 public: |
| 29 ~GrDrawingManager(); | 29 ~GrDrawingManager(); |
| 30 | 30 |
| 31 bool wasAbandoned() const { return fAbandoned; } | 31 bool wasAbandoned() const { return fAbandoned; } |
| 32 void freeGpuResources(); | 32 void freeGpuResources(); |
| 33 | 33 |
| 34 sk_sp<GrDrawContext> drawContext(sk_sp<GrRenderTarget> rt, const SkSurfacePr
ops*); | 34 sk_sp<GrDrawContext> drawContext(sk_sp<GrRenderTarget> rt, sk_sp<SkColorSpac
e> colorSpace, |
| 35 const SkSurfaceProps*); |
| 35 | 36 |
| 36 // The caller automatically gets a ref on the returned drawTarget. It must | 37 // The caller automatically gets a ref on the returned drawTarget. It must |
| 37 // be balanced by an unref call. | 38 // be balanced by an unref call. |
| 38 GrDrawTarget* newDrawTarget(GrRenderTarget* rt); | 39 GrDrawTarget* newDrawTarget(GrRenderTarget* rt); |
| 39 | 40 |
| 40 GrContext* getContext() { return fContext; } | 41 GrContext* getContext() { return fContext; } |
| 41 | 42 |
| 42 GrPathRenderer* getPathRenderer(const GrPathRenderer::CanDrawPathArgs& args, | 43 GrPathRenderer* getPathRenderer(const GrPathRenderer::CanDrawPathArgs& args, |
| 43 bool allowSW, | 44 bool allowSW, |
| 44 GrPathRendererChain::DrawType drawType, | 45 GrPathRendererChain::DrawType drawType, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 SkTDArray<GrDrawTarget*> fDrawTargets; | 80 SkTDArray<GrDrawTarget*> fDrawTargets; |
| 80 | 81 |
| 81 GrPathRendererChain* fPathRendererChain; | 82 GrPathRendererChain* fPathRendererChain; |
| 82 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 83 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
| 83 | 84 |
| 84 GrBatchFlushState fFlushState; | 85 GrBatchFlushState fFlushState; |
| 85 bool fFlushing; | 86 bool fFlushing; |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 #endif | 89 #endif |
| OLD | NEW |