| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 , fAtlasTextContext(nullptr) | 61 , fAtlasTextContext(nullptr) |
| 62 , fPathRendererChain(nullptr) | 62 , fPathRendererChain(nullptr) |
| 63 , fSoftwarePathRenderer(nullptr) | 63 , fSoftwarePathRenderer(nullptr) |
| 64 , fFlushState(context->getGpu(), context->resourceProvider()) | 64 , fFlushState(context->getGpu(), context->resourceProvider()) |
| 65 , fFlushing(false) { | 65 , fFlushing(false) { |
| 66 } | 66 } |
| 67 | 67 |
| 68 void abandon(); | 68 void abandon(); |
| 69 void cleanup(); | 69 void cleanup(); |
| 70 void reset(); | 70 void reset(); |
| 71 void flush(); | 71 /** Returns true if there was anything to flush and false otherwise */ |
| 72 bool flush(); |
| 72 | 73 |
| 73 friend class GrContext; // for access to: ctor, abandon, reset & flush | 74 friend class GrContext; // for access to: ctor, abandon, reset & flush |
| 74 | 75 |
| 75 static const int kNumPixelGeometries = 5; // The different pixel geometries | 76 static const int kNumPixelGeometries = 5; // The different pixel geometries |
| 76 static const int kNumDFTOptions = 2; // DFT or no DFT | 77 static const int kNumDFTOptions = 2; // DFT or no DFT |
| 77 | 78 |
| 78 GrContext* fContext; | 79 GrContext* fContext; |
| 79 GrDrawTarget::Options fOptionsForDrawTargets; | 80 GrDrawTarget::Options fOptionsForDrawTargets; |
| 80 | 81 |
| 81 // In debug builds we guard against improper thread handling | 82 // In debug builds we guard against improper thread handling |
| 82 GrSingleOwner* fSingleOwner; | 83 GrSingleOwner* fSingleOwner; |
| 83 | 84 |
| 84 bool fAbandoned; | 85 bool fAbandoned; |
| 85 SkTDArray<GrDrawTarget*> fDrawTargets; | 86 SkTDArray<GrDrawTarget*> fDrawTargets; |
| 86 | 87 |
| 87 SkAutoTDelete<GrAtlasTextContext> fAtlasTextContext; | 88 SkAutoTDelete<GrAtlasTextContext> fAtlasTextContext; |
| 88 | 89 |
| 89 GrPathRendererChain* fPathRendererChain; | 90 GrPathRendererChain* fPathRendererChain; |
| 90 GrSoftwarePathRenderer* fSoftwarePathRenderer; | 91 GrSoftwarePathRenderer* fSoftwarePathRenderer; |
| 91 | 92 |
| 92 GrBatchFlushState fFlushState; | 93 GrBatchFlushState fFlushState; |
| 93 bool fFlushing; | 94 bool fFlushing; |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 #endif | 97 #endif |
| OLD | NEW |