diff options
author | Greg Daniel <egdaniel@google.com> | 2017-08-24 15:59:33 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-24 20:18:27 +0000 |
commit | 500d58b2a6e6fd03239622da42b67b2c9843b7be (patch) | |
tree | dc77637f3bbcc07773c3bdbd292870c59f28e333 /src/gpu/GrTextureOpList.cpp | |
parent | fb126fa96e0f49f5dc17a9a043acced68be99e93 (diff) |
Make Copy Ops to go through GpuCommandBuffer instead of straigt to GPU.
Bug: skia:
Change-Id: I4eae4507e07278997e26419e94586eef0780c423
Reviewed-on: https://skia-review.googlesource.com/38361
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureOpList.cpp')
-rw-r--r-- | src/gpu/GrTextureOpList.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp index f36cc350bb..b046e7c272 100644 --- a/src/gpu/GrTextureOpList.cpp +++ b/src/gpu/GrTextureOpList.cpp @@ -62,11 +62,19 @@ bool GrTextureOpList::onExecute(GrOpFlushState* flushState) { return false; } + std::unique_ptr<GrGpuTextureCommandBuffer> commandBuffer( + flushState->gpu()->createCommandBuffer(fTarget.get()->priv().peekTexture(), + fTarget.get()->origin())); + flushState->setCommandBuffer(commandBuffer.get()); + for (int i = 0; i < fRecordedOps.count(); ++i) { // We do not call flushState->setDrawOpArgs as this op list does not support GrDrawOps. fRecordedOps[i]->execute(flushState); } + commandBuffer->submit(); + flushState->setCommandBuffer(nullptr); + return true; } |