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

Unified Diff: src/gpu/batches/GrDefaultPathRenderer.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 | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index 23f9fc8178e727598e342155af67cdf1ab466111..c6ca1cafc7710cf97058309430bc3da87d0d81a3 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -251,7 +251,7 @@ private:
fBatch.fCoverageIgnored = !overrides.readsCoverage();
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
SkAutoTUnref<const GrGeometryProcessor> gp;
{
using namespace GrDefaultGeoProcFactory;
@@ -279,7 +279,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,
@@ -341,7 +341,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;
@@ -431,7 +431,7 @@ private:
int* indexCnt,
const SkPath& path,
SkScalar srcSpaceTol,
- bool isIndexed) {
+ bool isIndexed) const {
{
SkScalar srcSpaceTolSqd = SkScalarMul(srcSpaceTol, srcSpaceTol);
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698