diff options
author | Robert Phillips <robertphillips@google.com> | 2018-05-30 08:38:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-30 13:21:48 +0000 |
commit | 93540dd15715057e00b4f136977f441720317b60 (patch) | |
tree | 849d34a21533c1b4a300c651279e1585228756d4 /src/gpu/GrDrawingManager.cpp | |
parent | e61ba84299eb4840e82a25a411f2c380ff754a7f (diff) |
Allow CCPR in DDL mode
Bug: skia:7988
Change-Id: If757f29e0156c0ef7045b437b04e17aebe4de851
Reviewed-on: https://skia-review.googlesource.com/130509
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@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 4391117248..a1df078d7b 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 @@ -381,6 +382,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, @@ -388,6 +394,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()); } |