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

Unified Diff: src/gpu/batches/GrTessellatingPathRenderer.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/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 8cd411a49f8e2b21127831f403b0f410365b755f..082a8dbdcfa68779e57f9676dd5b4c5e74fe3e46 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -1418,7 +1418,7 @@ private:
int tessellate(GrUniqueKey* key,
GrResourceProvider* resourceProvider,
SkAutoTUnref<GrVertexBuffer>& vertexBuffer,
- bool canMapVB) {
+ bool canMapVB) const {
SkPath path;
GrStrokeInfo stroke(fStroke);
if (stroke.isDashed()) {
@@ -1521,7 +1521,7 @@ private:
return actualCount;
}
- void onPrepareDraws(Target* target) override {
+ void onPrepareDraws(Target* target) const override {
// construct a cache key from the path's genID and the view matrix
static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
GrUniqueKey key;
@@ -1545,7 +1545,7 @@ private:
screenSpaceTol, fViewMatrix, fPath.getBounds());
if (!cache_match(vertexBuffer.get(), tol, &actualCount)) {
bool canMapVB = GrCaps::kNone_MapFlags != target->caps().mapBufferFlags();
- actualCount = tessellate(&key, rp, vertexBuffer, canMapVB);
+ actualCount = this->tessellate(&key, rp, vertexBuffer, canMapVB);
}
if (actualCount == 0) {
« no previous file with comments | « src/gpu/batches/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698