diff options
author | Robert Phillips <robertphillips@google.com> | 2017-07-28 11:56:47 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-31 16:02:42 +0000 |
commit | df0e09feacb29290fe94d37f921731b18f2edae0 (patch) | |
tree | 8059c31deb493e101b616578f6db0d4bc4d05438 /src/gpu/vk/GrVkGpuCommandBuffer.cpp | |
parent | f57c0d67611186ba74179b53b421e64b63a579c7 (diff) |
Remove origin field from GrSurface
This mainly consists of rm origin from GrSurface and the wrapBackEnd*
methods and then re-adding an explicit origin parameter to all the
GrGpu methods that need it.
Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18
Reviewed-on: https://skia-review.googlesource.com/26363
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/vk/GrVkGpuCommandBuffer.cpp')
-rw-r--r-- | src/gpu/vk/GrVkGpuCommandBuffer.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp index 4c1ad8e787..50780b0adf 100644 --- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp +++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp @@ -178,7 +178,8 @@ void GrVkGpuCommandBuffer::onSubmit() { cbInfo.fBounds.roundOut(&iBounds); fGpu->submitSecondaryCommandBuffer(cbInfo.fCommandBuffers, cbInfo.fRenderPass, - &cbInfo.fColorClearValue, fRenderTarget, iBounds); + &cbInfo.fColorClearValue, fRenderTarget, fOrigin, + iBounds); } } } @@ -499,10 +500,12 @@ sk_sp<GrVkPipelineState> GrVkGpuCommandBuffer::prepareDrawState( GrRenderTarget* rt = pipeline.renderTarget(); if (!pipeline.getScissorState().enabled()) { - GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), rt, + GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), + rt, pipeline.proxy()->origin(), SkIRect::MakeWH(rt->width(), rt->height())); } else if (!hasDynamicState) { - GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), rt, + GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), + rt, pipeline.proxy()->origin(), pipeline.getScissorState().rect()); } GrVkPipeline::SetDynamicViewportState(fGpu, cbInfo.currentCmdBuf(), rt); @@ -531,14 +534,14 @@ static void prepare_sampled_images(const GrResourceIOProcessor& processor, GrVkG // We may need to resolve the texture first if it is also a render target GrVkRenderTarget* texRT = static_cast<GrVkRenderTarget*>(vkTexture->asRenderTarget()); if (texRT) { - gpu->onResolveRenderTarget(texRT); + gpu->onResolveRenderTarget(texRT, sampler.proxy()->origin()); } const GrSamplerParams& params = sampler.params(); // Check if we need to regenerate any mip maps if (GrSamplerParams::kMipMap_FilterMode == params.filterMode()) { if (vkTexture->texturePriv().mipMapsAreDirty()) { - gpu->generateMipmap(vkTexture); + gpu->generateMipmap(vkTexture, sampler.proxy()->origin()); vkTexture->texturePriv().dirtyMipMaps(false); } } @@ -602,7 +605,8 @@ void GrVkGpuCommandBuffer::onDraw(const GrPipeline& pipeline, if (dynamicStates) { if (pipeline.getScissorState().enabled()) { GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), - target, dynamicStates[i].fScissorRect); + target, pipeline.proxy()->origin(), + dynamicStates[i].fScissorRect); } } |