diff options
author | Brian Salomon <bsalomon@google.com> | 2018-07-02 14:08:49 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-02 14:09:01 +0000 |
commit | d818ebf4a31724aa93fd439a2ac4195f69ae3af0 (patch) | |
tree | 28b49c892741fe114f6d99a1f2fb15fac3251133 /src/gpu/vk | |
parent | 068025e39ca5131b598805d5f1513cc18ae15dea (diff) |
Revert "Some scissor state cleanup."
This reverts commit a219419c9d76432dca74494b611ff1f59086d139.
Reason for revert: breaking things
Original change's description:
> Some scissor state cleanup.
>
> Separate flushing the enablement of scissor from the rect in GrGLGpu.
>
> Move GrPipeline::ScissorState to a global enum and use more broadly.
> Rename to GrScissorTest to avoid name conflict with existing
> GrScissorState.
>
> Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683
> Reviewed-on: https://skia-review.googlesource.com/137395
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkGpuCommandBuffer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp index 63ebba0f25..91adb5a778 100644 --- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp +++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp @@ -305,7 +305,7 @@ void GrVkGpuRTCommandBuffer::onClearStencilClip(const GrFixedClip& clip, bool in VkClearRect clearRect; // Flip rect if necessary SkIRect vkRect; - if (clip.scissorTest() == GrScissorTest::kDisabled) { + if (!clip.scissorEnabled()) { vkRect.setXYWH(0, 0, fRenderTarget->width(), fRenderTarget->height()); } else if (kBottomLeft_GrSurfaceOrigin != fOrigin) { vkRect = clip.scissorRect(); @@ -333,7 +333,7 @@ void GrVkGpuRTCommandBuffer::onClearStencilClip(const GrFixedClip& clip, bool in cbInfo.fIsEmpty = false; // Update command buffer bounds - if (clip.scissorTest() == GrScissorTest::kDisabled) { + if (!clip.scissorEnabled()) { cbInfo.fBounds.join(fRenderTarget->getBoundsRect()); } else { cbInfo.fBounds.join(SkRect::Make(clip.scissorRect())); @@ -351,7 +351,7 @@ void GrVkGpuRTCommandBuffer::onClear(const GrFixedClip& clip, GrColor color) { VkClearColorValue vkColor; GrColorToRGBAFloat(color, vkColor.float32); - if (cbInfo.fIsEmpty && clip.scissorTest() == GrScissorTest::kDisabled) { + if (cbInfo.fIsEmpty && !clip.scissorEnabled()) { // Change the render pass to do a clear load GrVkRenderPass::LoadStoreOps vkColorOps(VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_STORE); @@ -390,7 +390,7 @@ void GrVkGpuRTCommandBuffer::onClear(const GrFixedClip& clip, GrColor color) { VkClearRect clearRect; // Flip rect if necessary SkIRect vkRect; - if (clip.scissorTest() == GrScissorTest::kDisabled) { + if (!clip.scissorEnabled()) { vkRect.setXYWH(0, 0, fRenderTarget->width(), fRenderTarget->height()); } else if (kBottomLeft_GrSurfaceOrigin != fOrigin) { vkRect = clip.scissorRect(); @@ -416,7 +416,7 @@ void GrVkGpuRTCommandBuffer::onClear(const GrFixedClip& clip, GrColor color) { cbInfo.fIsEmpty = false; // Update command buffer bounds - if (clip.scissorTest() == GrScissorTest::kDisabled) { + if (!clip.scissorEnabled()) { cbInfo.fBounds.join(fRenderTarget->getBoundsRect()); } else { cbInfo.fBounds.join(SkRect::Make(clip.scissorRect())); @@ -591,7 +591,7 @@ GrVkPipelineState* GrVkGpuRTCommandBuffer::prepareDrawState( GrRenderTarget* rt = pipeline.renderTarget(); - if (pipeline.scissorTest() == GrScissorTest::kDisabled) { + if (!pipeline.isScissorEnabled()) { GrVkPipeline::SetDynamicScissorRectState(fGpu, cbInfo.currentCmdBuf(), rt, pipeline.proxy()->origin(), SkIRect::MakeWH(rt->width(), rt->height())); @@ -663,8 +663,8 @@ void GrVkGpuRTCommandBuffer::onDraw(const GrPrimitiveProcessor& primProc, return; } - bool dynamicScissor = (pipeline.scissorTest() == GrScissorTest::kEnabled) && - dynamicStateArrays && dynamicStateArrays->fScissorRects; + bool dynamicScissor = + pipeline.isScissorEnabled() && dynamicStateArrays && dynamicStateArrays->fScissorRects; for (int i = 0; i < meshCount; ++i) { const GrMesh& mesh = meshes[i]; |