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

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

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 9 months 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/GrNinePatch.cpp
diff --git a/src/gpu/batches/GrNinePatch.cpp b/src/gpu/batches/GrNinePatch.cpp
index bbd28019f9ff7a14c21638054b0352bc4ce62a08..db05318a6a4e0da24c8c3b5910f7e8f48583ae49 100644
--- a/src/gpu/batches/GrNinePatch.cpp
+++ b/src/gpu/batches/GrNinePatch.cpp
@@ -91,7 +91,7 @@ private:
return;
}
- target->initDraw(gp, this->pipeline());
+ target->initDraw(gp, kTriangles_GrPrimitiveType);
size_t vertexStride = gp->getVertexStride();
int instanceCount = fGeoData.count();
@@ -99,8 +99,7 @@ private:
SkAutoTUnref<const GrIndexBuffer> indexBuffer(
target->resourceProvider()->refQuadIndexBuffer());
InstancedHelper helper;
- void* vertices = helper.init(target, kTriangles_GrPrimitiveType, vertexStride,
- indexBuffer, kVertsPerRect,
+ void* vertices = helper.init(target, vertexStride, indexBuffer, kVertsPerRect,
kIndicesPerRect, instanceCount * kRectsPerInstance);
if (!vertices || !indexBuffer) {
SkDebugf("Could not allocate vertices\n");

Powered by Google App Engine
This is Rietveld 408576698