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

Unified Diff: src/gpu/batches/GrDefaultPathRenderer.cpp

Issue 1483103003: Make onPrepareDraws const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: src/gpu/batches/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index fa2ffe0b4df0e1b170a76088769eac5e1ce5f233..6102ea53da037f20cfbd7bd269f5b5b25376199c 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -250,7 +250,7 @@ private:
fBatch.fCoverageIgnored = !opt.readsCoverage();
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
SkAutoTUnref<const GrGeometryProcessor> gp;
{
using namespace GrDefaultGeoProcFactory;
@@ -278,7 +278,7 @@ private:
// We will use index buffers if we have multiple paths or one path with multiple contours
bool isIndexed = instanceCount > 1;
for (int i = 0; i < instanceCount; i++) {
- Geometry& args = fGeoData[i];
+ const Geometry& args = fGeoData[i];
int contourCount;
maxVertices += GrPathUtils::worstCasePointCount(args.fPath, &contourCount,
@@ -340,7 +340,7 @@ private:
int vertexOffset = 0;
int indexOffset = 0;
for (int i = 0; i < instanceCount; i++) {
- Geometry& args = fGeoData[i];
+ const Geometry& args = fGeoData[i];
int vertexCnt = 0;
int indexCnt = 0;
@@ -430,7 +430,7 @@ private:
int* indexCnt,
const SkPath& path,
SkScalar srcSpaceTol,
- bool isIndexed) {
+ bool isIndexed) const {
{
SkScalar srcSpaceTolSqd = SkScalarMul(srcSpaceTol, srcSpaceTol);

Powered by Google App Engine
This is Rietveld 408576698