diff options
Diffstat (limited to 'src/gpu/GrDrawingManager.cpp')
-rw-r--r-- | src/gpu/GrDrawingManager.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index 0df9b34468..8b0fb22f6b 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp @@ -32,11 +32,6 @@ #include "ccpr/GrCoverageCountingPathRenderer.h" #include "text/GrTextContext.h" -// Turn on/off the sorting of opLists at flush time -#ifndef SK_DISABLE_RENDER_TARGET_SORTING - #define SK_DISABLE_RENDER_TARGET_SORTING -#endif - GrDrawingManager::GrDrawingManager(GrContext* context, const GrPathRendererChain::Options& optionsForPathRendererChain, const GrTextContext::Options& optionsForTextContext, @@ -132,6 +127,11 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*, fOpLists[i]->makeClosed(*fContext->contextPriv().caps()); } + if (fSortRenderTargets) { + SkDEBUGCODE(bool result =) SkTTopoSort<GrOpList, GrOpList::TopoSortTraits>(&fOpLists); + SkASSERT(result); + } + #ifdef SK_DEBUG // This block checks for any unnecessary splits in the opLists. If two sequential opLists // share the same backing GrSurfaceProxy it means the opList was artificially split. @@ -149,11 +149,6 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*, } #endif - if (fSortRenderTargets) { - SkDEBUGCODE(bool result =) SkTTopoSort<GrOpList, GrOpList::TopoSortTraits>(&fOpLists); - SkASSERT(result); - } - GrOpFlushState flushState(gpu, fContext->contextPriv().resourceProvider(), &fTokenTracker); @@ -278,7 +273,7 @@ bool GrDrawingManager::executeOpLists(int startIndex, int stopIndex, GrOpFlushSt SkDebugf("Flushing opLists: %d to %d out of [%d, %d]\n", startIndex, stopIndex, 0, fOpLists.count()); for (int i = startIndex; i < stopIndex; ++i) { - fOpLists[i]->dump(false); + fOpLists[i]->dump(true); } #endif @@ -431,10 +426,11 @@ sk_sp<GrRenderTargetOpList> GrDrawingManager::newRTOpList(GrRenderTargetProxy* r bool managedOpList) { SkASSERT(fContext); - // This is a temporary fix for the partial-MDB world. In that world we're not reordering - // so ops that (in the single opList world) would've just glommed onto the end of the single - // opList but referred to a far earlier RT need to appear in their own opList. if (!fOpLists.empty()) { + // This is a temporary fix for the partial-MDB world. In that world we're not + // reordering so ops that (in the single opList world) would've just glommed onto the + // end of the single opList but referred to a far earlier RT need to appear in their + // own opList. fOpLists.back()->makeClosed(*fContext->contextPriv().caps()); } @@ -457,10 +453,11 @@ sk_sp<GrRenderTargetOpList> GrDrawingManager::newRTOpList(GrRenderTargetProxy* r sk_sp<GrTextureOpList> GrDrawingManager::newTextureOpList(GrTextureProxy* textureProxy) { SkASSERT(fContext); - // This is a temporary fix for the partial-MDB world. In that world we're not reordering - // so ops that (in the single opList world) would've just glommed onto the end of the single - // opList but referred to a far earlier RT need to appear in their own opList. if (!fOpLists.empty()) { + // This is a temporary fix for the partial-MDB world. In that world we're not + // reordering so ops that (in the single opList world) would've just glommed onto the + // end of the single opList but referred to a far earlier RT need to appear in their + // own opList. fOpLists.back()->makeClosed(*fContext->contextPriv().caps()); } |