aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureContext.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-24 08:39:40 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-24 13:54:59 +0000
commitdf2bf213649e0b2bcb9402548af9976bbdf7a218 (patch)
tree1adc7935eb5fd8fceb518dfd22934e784d5d3e77 /src/gpu/GrTextureContext.cpp
parentef90ae4e35637d0e15c7201d4314726059ea6a0f (diff)
Split up opLists (take 2)
Reland of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) https://skia-review.googlesource.com/c/13860/ (Make InstancedRendering more opList-splitting friendly) has landed so this should be good for another attempt. Change-Id: Icc9998196587510328e0a9ca1b2ce42013a86c6c Reviewed-on: https://skia-review.googlesource.com/13802 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureContext.cpp')
-rw-r--r--src/gpu/GrTextureContext.cpp24
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);
}