diff options
author | joshualitt <joshualitt@chromium.org> | 2015-11-30 12:30:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-30 12:30:13 -0800 |
commit | 144c3c8b7ff3ebc389b41211f3388fb24a7ff0c2 (patch) | |
tree | 9339d400b3d47a8d0307f19419e3dacd62a6cf12 /src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp | |
parent | 0cf5ecb67a2af5ec3ea20c5a189ff165ccb678c9 (diff) |
Make onPrepareDraws const
BUG=skia:
Review URL: https://codereview.chromium.org/1483103003
Diffstat (limited to 'src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp')
-rw-r--r-- | src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp index 295bcb1f0c..4b03c5a3f6 100644 --- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp +++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp @@ -162,7 +162,7 @@ private: } void draw(GrVertexBatch::Target* target, const GrPipeline* pipeline, int vertexCount, - size_t vertexStride, void* vertices, int indexCount, uint16_t* indices) { + size_t vertexStride, void* vertices, int indexCount, uint16_t* indices) const { if (vertexCount == 0 || indexCount == 0) { return; } @@ -190,7 +190,7 @@ private: target->draw(info); } - void onPrepareDraws(Target* target) override { + void onPrepareDraws(Target* target) const override { bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage(); // Setup GrGeometryProcessor @@ -220,7 +220,7 @@ private: uint8_t* vertices = (uint8_t*) sk_malloc_throw(maxVertices * vertexStride); uint16_t* indices = (uint16_t*) sk_malloc_throw(maxIndices * sizeof(uint16_t)); for (int i = 0; i < instanceCount; i++) { - Geometry& args = fGeoData[i]; + const Geometry& args = fGeoData[i]; GrAAConvexTessellator tess(args.fStrokeWidth, args.fJoin, args.fMiterLimit); if (!tess.tessellate(args.fViewMatrix, args.fPath)) { @@ -232,8 +232,8 @@ private: if (indexCount + currentIndices > UINT16_MAX) { // if we added the current instance, we would overflow the indices we can store in a // uint16_t. Draw what we've got so far and reset. - draw(target, this->pipeline(), vertexCount, vertexStride, vertices, indexCount, - indices); + this->draw(target, this->pipeline(), vertexCount, vertexStride, vertices, + indexCount, indices); vertexCount = 0; indexCount = 0; } @@ -252,8 +252,8 @@ private: vertexCount += currentVertices; indexCount += currentIndices; } - draw(target, this->pipeline(), vertexCount, vertexStride, vertices, indexCount, - indices); + this->draw(target, this->pipeline(), vertexCount, vertexStride, vertices, indexCount, + indices); sk_free(vertices); sk_free(indices); } |