Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1121463002: Move bounds to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« src/gpu/GrBatch.h ('K') | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698