Chromium Code Reviews| Index: src/gpu/GrDrawTarget.cpp |
| diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
| index d868bcb6bd3b9790143f79e6c6dd428495be6549..dc1e4ea0ac19a0c2df974dd68ae0b89184010468 100644 |
| --- a/src/gpu/GrDrawTarget.cpp |
| +++ b/src/gpu/GrDrawTarget.cpp |
| @@ -163,20 +163,23 @@ void GrDrawTarget::flush() { |
| } |
| void GrDrawTarget::drawBatch(GrPipelineBuilder* pipelineBuilder, |
| - GrBatch* batch, |
| - const SkRect* devBounds) { |
| + GrBatch* batch) { |
| SkASSERT(pipelineBuilder); |
| // TODO some kind of checkdraw, but not at this level |
| + // Batch bounds are tight, so for dev copies and clipping we outset; |
| + SkRect bounds = batch->bounds(); |
| + bounds.outset(0.5f, 0.5f); |
| + |
| // Setup clip |
| GrScissorState scissorState; |
| GrPipelineBuilder::AutoRestoreFragmentProcessors arfp; |
| GrPipelineBuilder::AutoRestoreStencil ars; |
| - if (!this->setupClip(pipelineBuilder, &arfp, &ars, &scissorState, devBounds)) { |
| + if (!this->setupClip(pipelineBuilder, &arfp, &ars, &scissorState, &bounds)) { |
|
bsalomon
2015/04/30 18:53:23
did you try doing the outsetting after clipping? W
joshualitt
2015/05/01 13:49:58
Acknowledged.
|
| return; |
| } |
| - GrDrawTarget::PipelineInfo pipelineInfo(pipelineBuilder, &scissorState, batch, devBounds, this); |
| + GrDrawTarget::PipelineInfo pipelineInfo(pipelineBuilder, &scissorState, batch, &bounds, this); |
|
bsalomon
2015/04/30 18:53:24
should the bounds be a required param now (non-ptr
joshualitt
2015/05/01 13:49:58
I can't do this until path is in batch
|
| if (pipelineInfo.mustSkipDraw()) { |
| return; |
| } |