| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 void GrDrawingManager::flush() { | 60 void GrDrawingManager::flush() { |
| 61 if (fFlushing || this->wasAbandoned()) { | 61 if (fFlushing || this->wasAbandoned()) { |
| 62 return; | 62 return; |
| 63 } | 63 } |
| 64 fFlushing = true; | 64 fFlushing = true; |
| 65 | 65 |
| 66 SkDEBUGCODE(bool result =) | 66 SkDEBUGCODE(bool result =) |
| 67 SkTTopoSort<GrDrawTarget, GrDrawTarget::TopoSortTraits>(
&fDrawTargets); | 67 SkTTopoSort<GrDrawTarget, GrDrawTarget::TopoSortTraits>(
&fDrawTargets); |
| 68 SkASSERT(result); | 68 SkASSERT(result); |
| 69 | 69 |
| 70 // Enable this to print out verbose batching information |
| 70 #if 0 | 71 #if 0 |
| 71 for (int i = 0; i < fDrawTargets.count(); ++i) { | 72 for (int i = 0; i < fDrawTargets.count(); ++i) { |
| 72 SkDEBUGCODE(fDrawTargets[i]->dump();) | 73 SkDEBUGCODE(fDrawTargets[i]->dump();) |
| 73 } | 74 } |
| 74 #endif | 75 #endif |
| 75 | 76 |
| 76 for (int i = 0; i < fDrawTargets.count(); ++i) { | 77 for (int i = 0; i < fDrawTargets.count(); ++i) { |
| 77 fDrawTargets[i]->prepareBatches(&fFlushState); | 78 fDrawTargets[i]->prepareBatches(&fFlushState); |
| 78 } | 79 } |
| 79 | 80 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 fContext, this, std::mov
e(rt), | 180 fContext, this, std::mov
e(rt), |
| 180 surfaceProps, | 181 surfaceProps, |
| 181 fContext->getAuditTrail(
), fSingleOwner)); | 182 fContext->getAuditTrail(
), fSingleOwner)); |
| 182 } | 183 } |
| 183 } | 184 } |
| 184 | 185 |
| 185 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt),
surfaceProps, | 186 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt),
surfaceProps, |
| 186 fContext->getAuditTrail(), | 187 fContext->getAuditTrail(), |
| 187 fSingleOwner)); | 188 fSingleOwner)); |
| 188 } | 189 } |
| OLD | NEW |