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

Unified Diff: src/gpu/GrAARectRenderer.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/GrAARectRenderer.cpp
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index 569466f23793d70d4cbef373705e2e3ff591dc31..777c5842665dd636b202e3557544dac6db878275 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -186,6 +186,8 @@ private:
: fIndexBuffer(indexBuffer) {
this->initClassID<AAFillRectBatch>();
fGeoData.push_back(geometry);
+
+ this->setBounds(geometry.fDevRect);
}
GrColor color() const { return fBatch.fColor; }
@@ -216,6 +218,7 @@ private:
}
fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin());
+ this->joinBounds(that->bounds());
return true;
}
@@ -476,7 +479,7 @@ void GrAARectRenderer::geometryFillAARect(GrDrawTarget* target,
geometry.fColor = color;
SkAutoTUnref<GrBatch> batch(AAFillRectBatch::Create(geometry, fAAFillRectIndexBuffer));
- target->drawBatch(pipelineBuilder, batch, &devRect);
+ target->drawBatch(pipelineBuilder, batch);
}
void GrAARectRenderer::strokeAARect(GrDrawTarget* target,
@@ -693,6 +696,9 @@ private:
this->initClassID<AAStrokeRectBatch>();
fBatch.fViewMatrix = viewMatrix;
fGeoData.push_back(geometry);
+
robertphillips 2015/05/01 13:02:59 fDevOutsideAssist joined with fDevOutside ?
+ // TODO tighter bounds
+ this->setBoundsLargest();
}
GrColor color() const { return fBatch.fColor; }
@@ -727,6 +733,7 @@ private:
fBatch.fColor = GrColor_ILLEGAL;
}
fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin());
+ this->joinBounds(that->bounds());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698