From 36a77ee494791989548b717515e3621b9c4ffe4e Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Tue, 18 Oct 2016 10:33:25 -0400 Subject: Refactor GrVkGpuCommandBuffer to handle multiple GrVkCommandBuffers. This CL is a pre CL to fix some issues where we will need a GpuCB to internally have multiple commandbuffers that it submits. Because of this, I need to move the bounds calculations down into the VkGpuCB since we need to know the bounds for each sub commandbuffer and not just entire set of commands. In part this is good since GL actually never needed the calculations so it saves some work there. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3142 Change-Id: Ied918765da3630aa6d87e29ccce6c883b96c4ead Reviewed-on: https://skia-review.googlesource.com/3142 Commit-Queue: Greg Daniel Reviewed-by: Ethan Nicholas Reviewed-by: Brian Osman --- src/gpu/instanced/InstancedRendering.cpp | 2 +- src/gpu/instanced/InstancedRendering.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpu/instanced') diff --git a/src/gpu/instanced/InstancedRendering.cpp b/src/gpu/instanced/InstancedRendering.cpp index 66e53dd5db..5564c63d8d 100644 --- a/src/gpu/instanced/InstancedRendering.cpp +++ b/src/gpu/instanced/InstancedRendering.cpp @@ -462,7 +462,7 @@ void InstancedRendering::beginFlush(GrResourceProvider* rp) { this->onBeginFlush(rp); } -void InstancedRendering::Batch::onDraw(GrBatchFlushState* state) { +void InstancedRendering::Batch::onDraw(GrBatchFlushState* state, const SkRect& bounds) { SkASSERT(State::kFlushing == fInstancedRendering->fState); SkASSERT(state->gpu() == fInstancedRendering->gpu()); diff --git a/src/gpu/instanced/InstancedRendering.h b/src/gpu/instanced/InstancedRendering.h index b2c360b252..77dc07e516 100644 --- a/src/gpu/instanced/InstancedRendering.h +++ b/src/gpu/instanced/InstancedRendering.h @@ -124,7 +124,7 @@ protected: GrBatchToXPOverrides*) const override; void onPrepare(GrBatchFlushState*) override {} - void onDraw(GrBatchFlushState*) override; + void onDraw(GrBatchFlushState*, const SkRect& bounds) override; InstancedRendering* const fInstancedRendering; BatchInfo fInfo; -- cgit v1.2.3