From 46983b7dd88603bb2a9a3c3e1ce3e147f5615f2f Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Tue, 6 Jun 2017 12:27:16 -0600 Subject: 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 Commit-Queue: Chris Dalton --- src/gpu/GrGpuCommandBuffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gpu/GrGpuCommandBuffer.cpp') diff --git a/src/gpu/GrGpuCommandBuffer.cpp b/src/gpu/GrGpuCommandBuffer.cpp index 5570a5a65e..9659ca3b9a 100644 --- a/src/gpu/GrGpuCommandBuffer.cpp +++ b/src/gpu/GrGpuCommandBuffer.cpp @@ -39,6 +39,7 @@ void GrGpuCommandBuffer::clearStencilClip(GrRenderTarget* rt, const GrFixedClip& bool GrGpuCommandBuffer::draw(const GrPipeline& pipeline, const GrPrimitiveProcessor& primProc, const GrMesh meshes[], + const GrPipeline::DynamicState dynamicStates[], int meshCount, const SkRect& bounds) { #ifdef SK_DEBUG @@ -58,7 +59,7 @@ bool GrGpuCommandBuffer::draw(const GrPipeline& pipeline, this->gpu()->stats()->incNumFailedDraws(); return false; } - this->onDraw(pipeline, primProc, meshes, meshCount, bounds); + this->onDraw(pipeline, primProc, meshes, dynamicStates, meshCount, bounds); return true; } -- cgit v1.2.3