aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuCommandBuffer.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-30 13:38:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-30 20:17:51 +0000
commitc293a29bc2fced15ac44a66efa813d42cb3f2e0b (patch)
treef1dc394033e8baa97e05a060ca5dc9885224c85c /src/gpu/GrGpuCommandBuffer.cpp
parentc789b61167dd98efc3c3bfcf9673eef24c2e57f4 (diff)
Make GrGpuCommandBuffer infer its render target from first draw
This is a temporary workaround to allow removal of GrBatch::renderTarget(). Change-Id: Ic14710a369802064cf6446e8191a98ea3595556d Reviewed-on: https://skia-review.googlesource.com/5342 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrGpuCommandBuffer.cpp')
-rw-r--r--src/gpu/GrGpuCommandBuffer.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gpu/GrGpuCommandBuffer.cpp b/src/gpu/GrGpuCommandBuffer.cpp
index d2a4e6e6b9..9ef459f08d 100644
--- a/src/gpu/GrGpuCommandBuffer.cpp
+++ b/src/gpu/GrGpuCommandBuffer.cpp
@@ -19,20 +19,19 @@ void GrGpuCommandBuffer::submit() {
this->onSubmit();
}
-void GrGpuCommandBuffer::clear(const GrFixedClip& clip, GrColor color) {
+void GrGpuCommandBuffer::clear(GrRenderTarget* rt, const GrFixedClip& clip, GrColor color) {
#ifdef SK_DEBUG
- GrRenderTarget* rt = this->renderTarget();
SkASSERT(rt);
SkASSERT(!clip.scissorEnabled() ||
(SkIRect::MakeWH(rt->width(), rt->height()).contains(clip.scissorRect()) &&
SkIRect::MakeWH(rt->width(), rt->height()) != clip.scissorRect()));
#endif
- this->onClear(clip, color);
+ this->onClear(rt, clip, color);
}
-void GrGpuCommandBuffer::clearStencilClip(const GrFixedClip& clip,
+void GrGpuCommandBuffer::clearStencilClip(GrRenderTarget* rt, const GrFixedClip& clip,
bool insideStencilMask) {
- this->onClearStencilClip(clip, insideStencilMask);
+ this->onClearStencilClip(rt, clip, insideStencilMask);
}
bool GrGpuCommandBuffer::draw(const GrPipeline& pipeline,