diff options
author | Robert Phillips <robertphillips@google.com> | 2017-03-15 18:41:24 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-15 18:41:31 +0000 |
commit | 18ea816aad843117cdee99f7d996b3542e467b22 (patch) | |
tree | 5665ef069823c6a22d3f8a5650a636816f38f897 /src/gpu/GrDrawingManager.cpp | |
parent | d492db941a0f8110ef4b6bceacfe788a8d33a5b7 (diff) |
Revert "Add pre-Flush callback to GrDrawingManager"
This reverts commit d222ec492f5d0229986f529134d083e589bcc4a9.
Reason for revert: TegraX1 Vulkan bot
Original change's description:
> Add pre-Flush callback to GrDrawingManager
>
> This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.
>
> Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)
>
> Change-Id: I307796595d651cf376838bff1f9e4385c3753547
> Reviewed-on: https://skia-review.googlesource.com/8679
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I852648adc12d2aa58cd09c57d961c340d657776c
Reviewed-on: https://skia-review.googlesource.com/9735
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrDrawingManager.cpp')
-rw-r--r-- | src/gpu/GrDrawingManager.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index 449cae6b61..d670e16b73 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp @@ -75,53 +75,10 @@ void GrDrawingManager::internalFlush(GrResourceCache::FlushType type) { } fFlushing = true; bool flushed = false; - - for (int i = 0; i < fOpLists.count(); ++i) { - // Semi-usually the GrOpLists are already closed at this point, but sometimes Ganesh - // needs to flush mid-draw. In that case, the SkGpuDevice's GrOpLists won't be closed - // but need to be flushed anyway. Closing such GrOpLists here will mean new - // GrOpLists will be created to replace them if the SkGpuDevice(s) write to them again. - fOpLists[i]->makeClosed(); - } - SkDEBUGCODE(bool result =) SkTTopoSort<GrOpList, GrOpList::TopoSortTraits>(&fOpLists); SkASSERT(result); - GrPreFlushResourceProvider preFlushProvider(this); - - if (fPreFlushCBObjects.count()) { - // MDB TODO: pre-MDB '1' is the correct pre-allocated size. Post-MDB it will need - // to be larger. - SkAutoSTArray<1, uint32_t> opListIds(fOpLists.count()); - for (int i = 0; i < fOpLists.count(); ++i) { - opListIds[i] = fOpLists[i]->uniqueID(); - } - - SkSTArray<1, sk_sp<GrRenderTargetContext>> renderTargetContexts; - for (int i = 0; i < fPreFlushCBObjects.count(); ++i) { - fPreFlushCBObjects[i]->preFlush(&preFlushProvider, - opListIds.get(), opListIds.count(), - &renderTargetContexts); - if (!renderTargetContexts.count()) { - continue; // This is fine. No atlases of this type are required for this flush - } - - for (int j = 0; j < renderTargetContexts.count(); ++j) { - GrRenderTargetOpList* opList = renderTargetContexts[j]->getOpList(); - if (!opList) { - continue; // Odd - but not a big deal - } - SkDEBUGCODE(opList->validateTargetsSingleRenderTarget()); - opList->prepareOps(&fFlushState); - if (!opList->executeOps(&fFlushState)) { - continue; // This is bad - } - } - renderTargetContexts.reset(); - } - } - for (int i = 0; i < fOpLists.count(); ++i) { fOpLists[i]->prepareOps(&fFlushState); } @@ -188,10 +145,6 @@ void GrDrawingManager::prepareSurfaceForExternalIO(GrSurface* surface) { } } -void GrDrawingManager::addPreFlushCallbackObject(sk_sp<GrPreFlushCallbackObject> preFlushCBObject) { - fPreFlushCBObjects.push_back(preFlushCBObject); -} - GrRenderTargetOpList* GrDrawingManager::newOpList(GrRenderTargetProxy* rtp) { SkASSERT(fContext); |