aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureContext.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-11 16:29:14 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-12 12:10:31 +0000
commit6cdc22cde8e6297d34fdaaa3ed5e69ae86c30a77 (patch)
treea2462bae16096f92b528d059ff1fb95881ed8d0d /src/gpu/GrTextureContext.cpp
parent5c7960be57010bf61db3d4ce879a3194687b5af9 (diff)
Split up opLists (take 3)
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. TBR=egdaniel@google.com Change-Id: I2a09729342bb035af3a16807c1895adbae432ade Reviewed-on: https://skia-review.googlesource.com/14186 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureContext.cpp')
-rw-r--r--src/gpu/GrTextureContext.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/gpu/GrTextureContext.cpp b/src/gpu/GrTextureContext.cpp
index 479957b8e1..0021c23da1 100644
--- a/src/gpu/GrTextureContext.cpp
+++ b/src/gpu/GrTextureContext.cpp
@@ -77,23 +77,7 @@ bool GrTextureContext::onCopy(GrSurfaceProxy* srcProxy,
SkDEBUGCODE(this->validate();)
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);
}