diff options
author | Robert Phillips <robertphillips@google.com> | 2017-04-18 11:21:38 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-18 15:59:45 +0000 |
commit | bc8ee52d4649afdc972599e5ef2a2a543867985d (patch) | |
tree | fa21947e32de29e4c582d777e25a7b181d01efd6 /src/gpu/GrTextureContext.cpp | |
parent | 6e834799946537370e6f3c10aa2745ed969b2a27 (diff) |
Split up opLists
Split into:
https://skia-review.googlesource.com/c/11793/ (Remove lastProxy capability from GrSurface)
Change-Id: I903ba30e17de4aab8cb0d2cc3281ae5c262142f9
Reviewed-on: https://skia-review.googlesource.com/11581
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrTextureContext.cpp')
-rw-r--r-- | src/gpu/GrTextureContext.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/gpu/GrTextureContext.cpp b/src/gpu/GrTextureContext.cpp index 68e94f9be3..f41fcd1837 100644 --- a/src/gpu/GrTextureContext.cpp +++ b/src/gpu/GrTextureContext.cpp @@ -68,32 +68,16 @@ GrTextureOpList* GrTextureContext::getOpList() { return fOpList.get(); } -// TODO: move this (and GrRenderTargetContext::copy) to GrSurfaceContext? +// MDB TODO: move this (and GrRenderTargetContext::copy) to GrSurfaceContext? bool GrTextureContext::onCopy(GrSurfaceProxy* srcProxy, const SkIRect& srcRect, const SkIPoint& dstPoint) { ASSERT_SINGLE_OWNER RETURN_FALSE_IF_ABANDONED SkDEBUGCODE(this->validate();) - GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrTextureContext::copy"); + GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrTextureContext::onCopy"); -#ifndef ENABLE_MDB - // We can't yet fully defer copies to textures, so GrTextureContext::copySurface will - // execute the copy immediately. Ensure the data is ready. - fContext->contextPriv().flushSurfaceWrites(srcProxy); -#endif - - GrTextureOpList* opList = this->getOpList(); - bool result = opList->copySurface(fContext->resourceProvider(), - fTextureProxy.get(), srcProxy, srcRect, dstPoint); - -#ifndef ENABLE_MDB - GrOpFlushState flushState(fContext->getGpu(), nullptr); - opList->prepareOps(&flushState); - opList->executeOps(&flushState); - opList->reset(); -#endif - - return result; + return this->getOpList()->copySurface(fContext->resourceProvider(), + fTextureProxy.get(), srcProxy, srcRect, dstPoint); } |