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

Unified Diff: src/gpu/batches/GrAALinearizingConvexPathRenderer.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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
index 295bcb1f0ce9e6c7807b93df4f8afba623b5364e..4b03c5a3f62d7faedfe8f5112937648e100dc2b7 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);
}
« no previous file with comments | « src/gpu/batches/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698