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