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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 static bool ProgramUnitTest(GrContext* context, int maxStages); | 53 static bool ProgramUnitTest(GrContext* context, int maxStages); |
54 | 54 |
55 private: | 55 private: |
56 GrDrawingManager(GrContext* context, const GrDrawTarget::Options& optionsFor
DrawTargets) | 56 GrDrawingManager(GrContext* context, const GrDrawTarget::Options& optionsFor
DrawTargets) |
57 : fContext(context) | 57 : fContext(context) |
58 , fOptionsForDrawTargets(optionsForDrawTargets) | 58 , fOptionsForDrawTargets(optionsForDrawTargets) |
59 , fAbandoned(false) | 59 , fAbandoned(false) |
60 , fNVPRTextContext(nullptr) | 60 , fNVPRTextContext(nullptr) |
61 , fPathRendererChain(nullptr) | 61 , fPathRendererChain(nullptr) |
62 , fSoftwarePathRenderer(nullptr) | 62 , fSoftwarePathRenderer(nullptr) |
63 , fFlushState(context->getGpu(), context->resourceProvider()) { | 63 , fFlushState(context->getGpu(), context->resourceProvider()) |
| 64 , fFlushing(false) { |
64 sk_bzero(fTextContexts, sizeof(fTextContexts)); | 65 sk_bzero(fTextContexts, sizeof(fTextContexts)); |
65 } | 66 } |
66 | 67 |
67 void abandon(); | 68 void abandon(); |
68 void cleanup(); | 69 void cleanup(); |
69 void reset(); | 70 void reset(); |
70 void flush(); | 71 void flush(); |
71 | 72 |
72 friend class GrContext; // for access to: ctor, abandon, reset & flush | 73 friend class GrContext; // for access to: ctor, abandon, reset & flush |
73 | 74 |
74 static const int kNumPixelGeometries = 5; // The different pixel geometries | 75 static const int kNumPixelGeometries = 5; // The different pixel geometries |
75 static const int kNumDFTOptions = 2; // DFT or no DFT | 76 static const int kNumDFTOptions = 2; // DFT or no DFT |
76 | 77 |
77 GrContext* fContext; | 78 GrContext* fContext; |
78 GrDrawTarget::Options fOptionsForDrawTargets; | 79 GrDrawTarget::Options fOptionsForDrawTargets; |
79 | 80 |
80 bool fAbandoned; | 81 bool fAbandoned; |
81 SkTDArray<GrDrawTarget*> fDrawTargets; | 82 SkTDArray<GrDrawTarget*> fDrawTargets; |
82 | 83 |
83 GrTextContext* fNVPRTextContext; | 84 GrTextContext* fNVPRTextContext; |
84 GrTextContext* fTextContexts[kNumPixelGeometries][kNumDFTOption
s]; | 85 GrTextContext* fTextContexts[kNumPixelGeometries][kNumDFTOption
s]; |
85 | 86 |
86 GrPathRendererChain* fPathRendererChain; | 87 GrPathRendererChain* fPathRendererChain; |
87 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 88 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
88 | 89 |
89 GrBatchFlushState fFlushState; | 90 GrBatchFlushState fFlushState; |
| 91 bool fFlushing; |
90 }; | 92 }; |
91 | 93 |
92 #endif | 94 #endif |
OLD | NEW |