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 |
11 #include "GrDrawTarget.h" | 11 #include "GrDrawTarget.h" |
12 #include "GrBatchFlushState.h" | 12 #include "GrBatchFlushState.h" |
13 #include "GrPathRendererChain.h" | 13 #include "GrPathRendererChain.h" |
14 #include "GrPathRenderer.h" | 14 #include "GrPathRenderer.h" |
15 #include "SkTDArray.h" | 15 #include "SkTDArray.h" |
16 | 16 |
17 class GrContext; | 17 class GrContext; |
18 class GrDrawContext; | 18 class GrDrawContext; |
19 class GrSingleOWner; | 19 class GrSingleOWner; |
20 class GrSoftwarePathRenderer; | 20 class GrSoftwarePathRenderer; |
21 class GrTextContext; | |
22 | 21 |
23 // Currently the DrawingManager creates a separate GrTextContext for each | 22 // The GrDrawingManager allocates a new GrDrawContext for each GrRenderTarget |
24 // combination of text drawing options (pixel geometry x DFT use) | |
25 // and hands the appropriate one back given the DrawContext's request. | |
26 // | |
27 // It allocates a new GrDrawContext for each GrRenderTarget | |
28 // but all of them still land in the same GrDrawTarget! | 23 // but all of them still land in the same GrDrawTarget! |
29 // | 24 // |
30 // In the future this class will allocate a new GrDrawContext for | 25 // In the future this class will allocate a new GrDrawContext for |
31 // each GrRenderTarget/GrDrawTarget and manage the DAG. | 26 // each GrRenderTarget/GrDrawTarget and manage the DAG. |
32 class GrDrawingManager { | 27 class GrDrawingManager { |
33 public: | 28 public: |
34 ~GrDrawingManager(); | 29 ~GrDrawingManager(); |
35 | 30 |
36 bool abandoned() const { return fAbandoned; } | 31 bool abandoned() const { return fAbandoned; } |
37 void freeGpuResources(); | 32 void freeGpuResources(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 SkTDArray<GrDrawTarget*> fDrawTargets; | 79 SkTDArray<GrDrawTarget*> fDrawTargets; |
85 | 80 |
86 GrPathRendererChain* fPathRendererChain; | 81 GrPathRendererChain* fPathRendererChain; |
87 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 82 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
88 | 83 |
89 GrBatchFlushState fFlushState; | 84 GrBatchFlushState fFlushState; |
90 bool fFlushing; | 85 bool fFlushing; |
91 }; | 86 }; |
92 | 87 |
93 #endif | 88 #endif |
OLD | NEW |