From 342bfc25de5b0452b1551bf9db4bf45eac7718b2 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Fri, 1 Apr 2016 06:06:20 -0700 Subject: Simplify GrDrawBatch uploads and token uage. GrVertexBatch subclasses no longer need "initDraw". Simplifies GrTestBatch BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835283002 Review URL: https://codereview.chromium.org/1835283002 --- src/gpu/batches/GrDrawAtlasBatch.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gpu/batches/GrDrawAtlasBatch.cpp') diff --git a/src/gpu/batches/GrDrawAtlasBatch.cpp b/src/gpu/batches/GrDrawAtlasBatch.cpp index 3884ef200f..58ce137d76 100644 --- a/src/gpu/batches/GrDrawAtlasBatch.cpp +++ b/src/gpu/batches/GrDrawAtlasBatch.cpp @@ -58,8 +58,6 @@ void GrDrawAtlasBatch::onPrepareDraws(Target* target) const { this->viewMatrix(), this->coverageIgnored())); - target->initDraw(gp); - int instanceCount = fGeoData.count(); size_t vertexStride = gp->getVertexStride(); SkASSERT(vertexStride == sizeof(SkPoint) + sizeof(SkPoint) @@ -81,7 +79,7 @@ void GrDrawAtlasBatch::onPrepareDraws(Target* target) const { memcpy(vertPtr, args.fVerts.begin(), allocSize); vertPtr += allocSize; } - helper.recordDraw(target); + helper.recordDraw(target, gp); } GrDrawAtlasBatch::GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, -- cgit v1.2.3