| 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 #include "GrDrawContext.h" | 8 #include "GrDrawContext.h" |
| 9 #include "GrDrawingManager.h" | 9 #include "GrDrawingManager.h" |
| 10 #include "GrDrawTarget.h" | 10 #include "GrDrawTarget.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 if (fDrawTargets.count()) { | 107 if (fDrawTargets.count()) { |
| 108 SkASSERT(fDrawTargets.count() == 1); | 108 SkASSERT(fDrawTargets.count() == 1); |
| 109 // Clear out this flag so the topological sort's SkTTopoSort_CheckAllUnm
arked check | 109 // Clear out this flag so the topological sort's SkTTopoSort_CheckAllUnm
arked check |
| 110 // won't bark | 110 // won't bark |
| 111 fDrawTargets[0]->resetFlag(GrDrawTarget::kWasOutput_Flag); | 111 fDrawTargets[0]->resetFlag(GrDrawTarget::kWasOutput_Flag); |
| 112 } | 112 } |
| 113 #else | 113 #else |
| 114 fDrawTargets.reset(); | 114 fDrawTargets.reset(); |
| 115 #endif | 115 #endif |
| 116 | 116 |
| 117 // Clear batch debugging output | |
| 118 if (GR_BATCH_DEBUGGING_OUTPUT) { | |
| 119 SkDebugf("%s\n", fContext->getAuditTrail()->toJson().c_str()); | |
| 120 // TODO This currently crashes because not all ops are accounted for | |
| 121 //GR_AUDIT_TRAIL_RESET(fContext->getAuditTrail()); | |
| 122 } | |
| 123 | |
| 124 fFlushState.reset(); | 117 fFlushState.reset(); |
| 125 fFlushing = false; | 118 fFlushing = false; |
| 126 } | 119 } |
| 127 | 120 |
| 128 GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props, | 121 GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props, |
| 129 GrRenderTarget* rt) { | 122 GrRenderTarget* rt) { |
| 130 if (this->abandoned()) { | 123 if (this->abandoned()) { |
| 131 return nullptr; | 124 return nullptr; |
| 132 } | 125 } |
| 133 | 126 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 195 |
| 203 return pr; | 196 return pr; |
| 204 } | 197 } |
| 205 | 198 |
| 206 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, | 199 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, |
| 207 const SkSurfaceProps* surfaceProps)
{ | 200 const SkSurfaceProps* surfaceProps)
{ |
| 208 if (this->abandoned()) { | 201 if (this->abandoned()) { |
| 209 return nullptr; | 202 return nullptr; |
| 210 } | 203 } |
| 211 | 204 |
| 212 return new GrDrawContext(this, rt, surfaceProps, fSingleOwner); | 205 return new GrDrawContext(this, rt, surfaceProps, fContext->getAuditTrail(),
fSingleOwner); |
| 213 } | 206 } |
| OLD | NEW |