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

Unified Diff: src/gpu/GrOvalRenderer.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/convexpolyeffect.cpp ('k') | src/gpu/GrPathUtils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index 6aba34b68bf1933ee58bf1c78262866d68b620f8..e13c0d11e4e5aa448c33607d98b6ab1d94e20473 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -692,7 +692,7 @@ private:
fBatch.fCoverageIgnored = !overrides.readsCoverage();
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
SkMatrix invert;
if (!this->viewMatrix().invert(&invert)) {
return;
@@ -717,7 +717,7 @@ private:
}
for (int i = 0; i < instanceCount; i++) {
- Geometry& geom = fGeoData[i];
+ const Geometry& geom = fGeoData[i];
SkScalar innerRadius = geom.fInnerRadius;
SkScalar outerRadius = geom.fOuterRadius;
@@ -912,7 +912,7 @@ private:
fBatch.fCoverageIgnored = !overrides.readsCoverage();
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
SkMatrix invert;
if (!this->viewMatrix().invert(&invert)) {
return;
@@ -937,7 +937,7 @@ private:
}
for (int i = 0; i < instanceCount; i++) {
- Geometry& geom = fGeoData[i];
+ const Geometry& geom = fGeoData[i];
SkScalar xRadius = geom.fXRadius;
SkScalar yRadius = geom.fYRadius;
@@ -1185,7 +1185,7 @@ private:
fBatch.fCoverageIgnored = !overrides.readsCoverage();
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
// Setup geometry processor
SkAutoTUnref<GrGeometryProcessor> gp(DIEllipseEdgeEffect::Create(this->color(),
this->viewMatrix(),
@@ -1205,7 +1205,7 @@ private:
}
for (int i = 0; i < instanceCount; i++) {
- Geometry& geom = fGeoData[i];
+ const Geometry& geom = fGeoData[i];
SkScalar xRadius = geom.fXRadius;
SkScalar yRadius = geom.fYRadius;
@@ -1540,7 +1540,7 @@ private:
fBatch.fCoverageIgnored = !overrides.readsCoverage();
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
// reset to device coordinates
SkMatrix invert;
if (!this->viewMatrix().invert(&invert)) {
@@ -1575,7 +1575,7 @@ private:
}
for (int i = 0; i < instanceCount; i++) {
- Geometry& args = fGeoData[i];
+ const Geometry& args = fGeoData[i];
SkScalar outerRadius = args.fOuterRadius;
@@ -1720,7 +1720,7 @@ private:
fBatch.fCoverageIgnored = !overrides.readsCoverage();
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
// reset to device coordinates
SkMatrix invert;
if (!this->viewMatrix().invert(&invert)) {
@@ -1755,7 +1755,7 @@ private:
}
for (int i = 0; i < instanceCount; i++) {
- Geometry& args = fGeoData[i];
+ const Geometry& args = fGeoData[i];
// Compute the reciprocals of the radii here to save time in the shader
SkScalar xRadRecip = SkScalarInvert(args.fXRadius);
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | src/gpu/GrPathUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698