diff options
author | Robert Phillips <robertphillips@google.com> | 2018-05-31 12:43:27 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-31 17:27:43 +0000 |
commit | 774168efac172d096cd7f09841bce51650cb6e84 (patch) | |
tree | 1433b93978baaf92439289fe5a0a3e648a73974f /src/gpu/GrDrawingManager.cpp | |
parent | e304a8a21b0bc40c3a7d85a96371a21180750076 (diff) |
Allow CCPR in DDL mode (take 2)
A lot of the changes to get this compiling on the
win_chromium_compile_dbg_ng bot (i.e., moving a lot of header files to
private) should be undone if that bot is ever "fixed".
Bug: skia:7988
Change-Id: I704ff793d80b18e7312048538874498824803580
Reviewed-on: https://skia-review.googlesource.com/130920
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrDrawingManager.cpp')
-rw-r--r-- | src/gpu/GrDrawingManager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index 158239e460..99eb04b918 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp @@ -26,6 +26,7 @@ #include "SkSurface_Gpu.h" #include "SkTTopoSort.h" #include "GrTracing.h" +#include "ccpr/GrCoverageCountingPathRenderer.h" #include "text/GrTextContext.h" // Turn on/off the sorting of opLists at flush time @@ -383,6 +384,11 @@ void GrDrawingManager::moveOpListsToDDL(SkDeferredDisplayList* ddl) { } ddl->fOpLists = std::move(fOpLists); + if (fPathRendererChain) { + if (auto ccpr = fPathRendererChain->getCoverageCountingPathRenderer()) { + ddl->fPendingPaths = ccpr->detachPendingPaths(); + } + } } void GrDrawingManager::copyOpListsFromDDL(const SkDeferredDisplayList* ddl, @@ -390,6 +396,12 @@ void GrDrawingManager::copyOpListsFromDDL(const SkDeferredDisplayList* ddl, // Here we jam the proxy that backs the current replay SkSurface into the LazyProxyData. // The lazy proxy that references it (in the copied opLists) will steal its GrTexture. ddl->fLazyProxyData->fReplayDest = newDest; + + if (ddl->fPendingPaths.size()) { + GrCoverageCountingPathRenderer* ccpr = this->getCoverageCountingPathRenderer(); + + ccpr->mergePendingPaths(ddl->fPendingPaths); + } fOpLists.push_back_n(ddl->fOpLists.count(), ddl->fOpLists.begin()); } |