diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-06-06 12:27:16 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-07 18:26:11 +0000 |
commit | 46983b7dd88603bb2a9a3c3e1ce3e147f5615f2f (patch) | |
tree | cb2dccc7b6d44b1100dc34af92c60d7b243d01c7 /tests/GrMeshTest.cpp | |
parent | 912e6b883782cd6a53348056012ff7ed38658c79 (diff) |
Introduce dynamic pipeline state
Adds a DynamicState struct to GrPipeline that has a field for the
scissor rect. Eventually this should become the only way to specify a
scissor rectangle and may grow to contain more fields. Adds an array of
DynamicStates to GrGpuCommandBuffer::draw and implements support in GL
and Vulkan.
Bug: skia:
Change-Id: If5aebbf9da5d192acf7e68e7def4674ffc7ec310
Reviewed-on: https://skia-review.googlesource.com/18510
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'tests/GrMeshTest.cpp')
-rw-r--r-- | tests/GrMeshTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp index 3a2be784a5..dd2a2d9e33 100644 --- a/tests/GrMeshTest.cpp +++ b/tests/GrMeshTest.cpp @@ -364,9 +364,9 @@ sk_sp<const GrBuffer> DrawMeshHelper::getIndexBuffer() { void DrawMeshHelper::drawMesh(const GrMesh& mesh) { GrRenderTarget* rt = fState->drawOpArgs().fRenderTarget; - GrPipeline pipeline(rt, SkBlendMode::kSrc); + GrPipeline pipeline(rt, GrPipeline::ScissorState::kDisabled, SkBlendMode::kSrc); GrMeshTestProcessor mtp(mesh.isInstanced(), mesh.hasVertexData()); - fState->commandBuffer()->draw(pipeline, mtp, &mesh, 1, + fState->commandBuffer()->draw(pipeline, mtp, &mesh, nullptr, 1, SkRect::MakeIWH(kImageWidth, kImageHeight)); } |