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

Unified Diff: gm/convexpolyeffect.cpp

Issue 1483103003: Make onPrepareDraws const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: merge Created 5 years, 1 month 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
« no previous file with comments | « gm/beziereffects.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/convexpolyeffect.cpp
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index f040b90ed28a56cbb110948a600a0beae9304d51..fb767ddc89f760d4994b6c137d77039fe4045e2e 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -45,6 +45,9 @@ private:
ConvexPolyTestBatch(const GrGeometryProcessor* gp, const Geometry& geo)
: INHERITED(ClassID(), gp, geo.fBounds)
, fGeometry(geo) {
+ // Make sure any artifacts around the exterior of path are visible by using overly
+ // conservative bounding geometry.
+ fGeometry.fBounds.outset(5.f, 5.f);
}
Geometry* geoData(int index) override {
@@ -57,7 +60,7 @@ private:
return &fGeometry;
}
- void generateGeometry(Target* target) override {
+ void generateGeometry(Target* target) const override {
size_t vertexStride = this->geometryProcessor()->getVertexStride();
SkASSERT(vertexStride == sizeof(SkPoint));
QuadHelper helper;
@@ -66,9 +69,6 @@ private:
return;
}
- // Make sure any artifacts around the exterior of path are visible by using overly
- // conservative bounding geometry.
- fGeometry.fBounds.outset(5.f, 5.f);
fGeometry.fBounds.toQuad(verts);
helper.recordDraw(target);
« no previous file with comments | « gm/beziereffects.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698