aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrRenderTargetContext.cpp237
-rw-r--r--src/gpu/GrSWMaskHelper.cpp2
-rw-r--r--src/gpu/GrSoftwarePathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrAAConvexPathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrAADistanceFieldPathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrAAHairLinePathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrDashLinePathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrDefaultPathRenderer.cpp4
-rw-r--r--src/gpu/batches/GrMSAAPathRenderer.cpp4
-rw-r--r--src/gpu/batches/GrPLSPathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrStencilAndCoverPathRenderer.cpp4
-rw-r--r--src/gpu/batches/GrTessellatingPathRenderer.cpp2
-rw-r--r--src/gpu/text/GrAtlasTextBlob.cpp2
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp2
15 files changed, 131 insertions, 140 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 6ea4f1b651..bc29a70a91 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -274,11 +274,11 @@ void GrRenderTargetContext::internalClear(const GrFixedClip& clip,
if (!this->accessRenderTarget()) {
return;
}
- sk_sp<GrOp> batch(GrClearBatch::Make(clip, color, this->accessRenderTarget()));
- if (!batch) {
+ sk_sp<GrOp> op(GrClearBatch::Make(clip, color, this->accessRenderTarget()));
+ if (!op) {
return;
}
- this->getOpList()->addOp(std::move(batch));
+ this->getOpList()->addOp(std::move(op));
}
}
@@ -420,20 +420,19 @@ bool GrRenderTargetContext::drawFilledRect(const GrClip& clip,
return true;
}
- sk_sp<GrDrawOp> batch;
+ sk_sp<GrDrawOp> op;
bool useHWAA;
if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
InstancedRendering* ir = this->getOpList()->instancedRendering();
- batch.reset(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
- paint.isAntiAlias(), fInstancedPipelineInfo,
- &useHWAA));
- if (batch) {
+ op.reset(ir->recordRect(croppedRect, viewMatrix, paint.getColor(), paint.isAntiAlias(),
+ fInstancedPipelineInfo, &useHWAA));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
if (ss) {
pipelineBuilder.setUserStencil(ss);
}
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return true;
}
}
@@ -444,14 +443,14 @@ bool GrRenderTargetContext::drawFilledRect(const GrClip& clip,
SkRect devBoundRect;
viewMatrix.mapRect(&devBoundRect, croppedRect);
- batch.reset(GrRectBatchFactory::CreateAAFill(paint, viewMatrix, rect, croppedRect,
- devBoundRect));
- if (batch) {
+ op.reset(GrRectBatchFactory::CreateAAFill(paint, viewMatrix, rect, croppedRect,
+ devBoundRect));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
if (ss) {
pipelineBuilder.setUserStencil(ss);
}
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return true;
}
}
@@ -551,13 +550,13 @@ void GrRenderTargetContext::drawRect(const GrClip& clip,
bool useHWAA;
bool snapToPixelCenters = false;
- sk_sp<GrDrawOp> batch;
+ sk_sp<GrDrawOp> op;
GrColor color = paint.getColor();
if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
// The stroke path needs the rect to remain axis aligned (no rotation or skew).
if (viewMatrix.rectStaysRect()) {
- batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, stroke));
+ op.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, stroke));
}
} else {
// Depending on sub-pixel coordinates and the particular GPU, we may lose a corner of
@@ -565,11 +564,11 @@ void GrRenderTargetContext::drawRect(const GrClip& clip,
// when MSAA is enabled because it can cause ugly artifacts.
snapToPixelCenters = stroke.getStyle() == SkStrokeRec::kHairline_Style &&
!fRenderTargetProxy->isUnifiedMultisampled();
- batch.reset(GrRectBatchFactory::CreateNonAAStroke(color, viewMatrix, rect,
- stroke, snapToPixelCenters));
+ op.reset(GrRectBatchFactory::CreateNonAAStroke(color, viewMatrix, rect,
+ stroke, snapToPixelCenters));
}
- if (batch) {
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
if (snapToPixelCenters) {
@@ -577,7 +576,7 @@ void GrRenderTargetContext::drawRect(const GrClip& clip,
snapToPixelCenters);
}
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
@@ -688,12 +687,12 @@ void GrRenderTargetContext::fillRectToRect(const GrClip& clip,
if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
InstancedRendering* ir = this->getOpList()->instancedRendering();
- sk_sp<GrDrawOp> batch(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
- croppedLocalRect, paint.isAntiAlias(),
- fInstancedPipelineInfo, &useHWAA));
- if (batch) {
+ sk_sp<GrDrawOp> op(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
+ croppedLocalRect, paint.isAntiAlias(),
+ fInstancedPipelineInfo, &useHWAA));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
@@ -705,12 +704,10 @@ void GrRenderTargetContext::fillRectToRect(const GrClip& clip,
}
if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) {
- sk_sp<GrDrawOp> batch(GrAAFillRectBatch::CreateWithLocalRect(paint.getColor(),
- viewMatrix,
- croppedRect,
- croppedLocalRect));
+ sk_sp<GrDrawOp> op(GrAAFillRectBatch::CreateWithLocalRect(paint.getColor(), viewMatrix,
+ croppedRect, croppedLocalRect));
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->drawBatch(pipelineBuilder, clip, batch.get());
+ this->addDrawOp(pipelineBuilder, clip, op.get());
return;
}
@@ -747,12 +744,11 @@ void GrRenderTargetContext::fillRectWithLocalMatrix(const GrClip& clip,
if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
InstancedRendering* ir = this->getOpList()->instancedRendering();
- sk_sp<GrDrawOp> batch(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
- localMatrix, paint.isAntiAlias(),
- fInstancedPipelineInfo, &useHWAA));
- if (batch) {
+ sk_sp<GrDrawOp> op(ir->recordRect(croppedRect, viewMatrix, paint.getColor(), localMatrix,
+ paint.isAntiAlias(), fInstancedPipelineInfo, &useHWAA));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
@@ -764,10 +760,10 @@ void GrRenderTargetContext::fillRectWithLocalMatrix(const GrClip& clip,
}
if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) {
- sk_sp<GrDrawOp> batch(GrAAFillRectBatch::Create(paint.getColor(), viewMatrix,
- localMatrix, croppedRect));
+ sk_sp<GrDrawOp> op(GrAAFillRectBatch::Create(paint.getColor(), viewMatrix, localMatrix,
+ croppedRect));
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
@@ -811,13 +807,12 @@ void GrRenderTargetContext::drawVertices(const GrClip& clip,
viewMatrix.mapRect(&bounds);
- sk_sp<GrDrawOp> batch(new GrDrawVerticesBatch(paint.getColor(),
- primitiveType, viewMatrix, positions,
- vertexCount, indices, indexCount,
- colors, texCoords, bounds));
+ sk_sp<GrDrawOp> op(new GrDrawVerticesBatch(paint.getColor(), primitiveType, viewMatrix,
+ positions, vertexCount, indices, indexCount, colors,
+ texCoords, bounds));
GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
}
///////////////////////////////////////////////////////////////////////////////
@@ -836,11 +831,11 @@ void GrRenderTargetContext::drawAtlas(const GrClip& clip,
AutoCheckFlush acf(fDrawingManager);
- sk_sp<GrDrawOp> batch(new GrDrawAtlasBatch(paint.getColor(), viewMatrix, spriteCount,
- xform, texRect, colors));
+ sk_sp<GrDrawOp> op(new GrDrawAtlasBatch(paint.getColor(), viewMatrix, spriteCount, xform,
+ texRect, colors));
GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
}
///////////////////////////////////////////////////////////////////////////////
@@ -862,7 +857,7 @@ void GrRenderTargetContext::drawRRect(const GrClip& origClip,
const GrClip* clip = &origClip;
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
// The Android framework frequently clips rrects to themselves where the clip is non-aa and the
- // draw is aa. Since our lower level clip code works from batch bounds, which are SkRects, it
+ // draw is aa. Since our lower level clip code works from op bounds, which are SkRects, it
// doesn't detect that the clip can be ignored (modulo antialiasing). The following test
// attempts to mitigate the stencil clip cost but will only help when the entire clip stack
// can be ignored. We'd prefer to fix this in the framework by removing the clips calls.
@@ -880,27 +875,26 @@ void GrRenderTargetContext::drawRRect(const GrClip& origClip,
if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
stroke.isFillStyle()) {
InstancedRendering* ir = this->getOpList()->instancedRendering();
- sk_sp<GrDrawOp> batch(ir->recordRRect(rrect, viewMatrix, paint.getColor(),
- paint.isAntiAlias(), fInstancedPipelineInfo,
- &useHWAA));
- if (batch) {
+ sk_sp<GrDrawOp> op(ir->recordRRect(rrect, viewMatrix, paint.getColor(), paint.isAntiAlias(),
+ fInstancedPipelineInfo, &useHWAA));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, op.get());
return;
}
}
if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
- sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateRRectBatch(paint.getColor(),
- paint.usesDistanceVectorField(),
- viewMatrix,
- rrect,
- stroke,
- shaderCaps));
- if (batch) {
+ sk_sp<GrDrawOp> op(GrOvalRenderer::CreateRRectBatch(paint.getColor(),
+ paint.usesDistanceVectorField(),
+ viewMatrix,
+ rrect,
+ stroke,
+ shaderCaps));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, op.get());
return;
}
}
@@ -937,27 +931,27 @@ void GrRenderTargetContext::drawShadowRRect(const GrClip& clip,
//if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
// stroke.isFillStyle()) {
// InstancedRendering* ir = this->getOpList()->instancedRendering();
- // SkAutoTUnref<GrDrawOp> batch(ir->recordRRect(rrect, viewMatrix, paint.getColor(),
- // paint.isAntiAlias(), fInstancedPipelineInfo,
- // &useHWAA));
- // if (batch) {
+ // SkAutoTUnref<GrDrawOp> op(ir->recordRRect(rrect, viewMatrix, paint.getColor(),
+ // paint.isAntiAlias(), fInstancedPipelineInfo,
+ // &useHWAA));
+ // if (op) {
// GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- // this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, batch);
+ // this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, op);
// return;
// }
//}
if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
- sk_sp<GrDrawOp> batch(CreateShadowRRectBatch(paint.getColor(),
- viewMatrix,
- rrect,
- blurRadius,
- stroke,
- shaderCaps));
- if (batch) {
+ sk_sp<GrDrawOp> op(CreateShadowRRectBatch(paint.getColor(),
+ viewMatrix,
+ rrect,
+ blurRadius,
+ stroke,
+ shaderCaps));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
@@ -981,12 +975,12 @@ bool GrRenderTargetContext::drawFilledDRRect(const GrClip& clip,
if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
bool useHWAA;
InstancedRendering* ir = this->getOpList()->instancedRendering();
- sk_sp<GrDrawOp> batch(ir->recordDRRect(origOuter, origInner, viewMatrix,
- paintIn.getColor(), paintIn.isAntiAlias(),
- fInstancedPipelineInfo, &useHWAA));
- if (batch) {
+ sk_sp<GrDrawOp> op(ir->recordDRRect(origOuter, origInner, viewMatrix, paintIn.getColor(),
+ paintIn.isAntiAlias(), fInstancedPipelineInfo,
+ &useHWAA));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paintIn, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return true;
}
}
@@ -1099,9 +1093,9 @@ void GrRenderTargetContext::drawRegion(const GrClip& clip,
return this->drawPath(clip, paint, viewMatrix, path, style);
}
- sk_sp<GrDrawOp> batch(GrRegionBatch::Create(paint.getColor(), viewMatrix, region));
+ sk_sp<GrDrawOp> op(GrRegionBatch::Create(paint.getColor(), viewMatrix, region));
GrPipelineBuilder pipelineBuilder(paint, false);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
}
void GrRenderTargetContext::drawOval(const GrClip& clip,
@@ -1127,26 +1121,25 @@ void GrRenderTargetContext::drawOval(const GrClip& clip,
if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
stroke.isFillStyle()) {
InstancedRendering* ir = this->getOpList()->instancedRendering();
- sk_sp<GrDrawOp> batch(ir->recordOval(oval, viewMatrix, paint.getColor(),
- paint.isAntiAlias(), fInstancedPipelineInfo,
- &useHWAA));
- if (batch) {
+ sk_sp<GrDrawOp> op(ir->recordOval(oval, viewMatrix, paint.getColor(), paint.isAntiAlias(),
+ fInstancedPipelineInfo, &useHWAA));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
- sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
- viewMatrix,
- oval,
- stroke,
- shaderCaps));
- if (batch) {
+ sk_sp<GrDrawOp> op(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
+ viewMatrix,
+ oval,
+ stroke,
+ shaderCaps));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
@@ -1168,17 +1161,17 @@ void GrRenderTargetContext::drawArc(const GrClip& clip,
bool useHWAA;
if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
- sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateArcBatch(paint.getColor(),
- viewMatrix,
- oval,
- startAngle,
- sweepAngle,
- useCenter,
- style,
- shaderCaps));
- if (batch) {
+ sk_sp<GrDrawOp> op(GrOvalRenderer::CreateArcBatch(paint.getColor(),
+ viewMatrix,
+ oval,
+ startAngle,
+ sweepAngle,
+ useCenter,
+ style,
+ shaderCaps));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
@@ -1203,12 +1196,11 @@ void GrRenderTargetContext::drawImageLattice(const GrClip& clip,
AutoCheckFlush acf(fDrawingManager);
- sk_sp<GrDrawOp> batch(GrNinePatch::CreateNonAA(paint.getColor(), viewMatrix,
- imageWidth, imageHeight,
- std::move(iter), dst));
+ sk_sp<GrDrawOp> op(GrNinePatch::CreateNonAA(paint.getColor(), viewMatrix, imageWidth,
+ imageHeight, std::move(iter), dst));
GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
}
void GrRenderTargetContext::prepareForExternalIO() {
@@ -1238,14 +1230,13 @@ void GrRenderTargetContext::drawNonAAFilledRect(const GrClip& clip,
const GrUserStencilSettings* ss,
bool useHWAA) {
SkASSERT(!useHWAA || this->isStencilBufferMultisampled());
- sk_sp<GrDrawOp> batch(
- GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewMatrix, rect, localRect,
- localMatrix));
+ sk_sp<GrDrawOp> op( GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewMatrix, rect,
+ localRect, localMatrix));
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
if (ss) {
pipelineBuilder.setUserStencil(ss);
}
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
}
bool GrRenderTargetContext::readPixels(const SkImageInfo& dstInfo, void* dstBuffer,
@@ -1368,11 +1359,11 @@ void GrRenderTargetContext::drawPath(const GrClip& clip,
SkRect rects[2];
if (fills_as_nested_rects(viewMatrix, path, rects)) {
- sk_sp<GrDrawOp> batch(GrRectBatchFactory::CreateAAFillNestedRects(
+ sk_sp<GrDrawOp> op(GrRectBatchFactory::CreateAAFillNestedRects(
paint.getColor(), viewMatrix, rects));
- if (batch) {
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
}
return;
}
@@ -1382,14 +1373,14 @@ void GrRenderTargetContext::drawPath(const GrClip& clip,
if (isOval && !path.isInverseFillType()) {
const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
- sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
- viewMatrix,
- ovalRect,
- style.strokeRec(),
- shaderCaps));
- if (batch) {
+ sk_sp<GrDrawOp> op(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
+ viewMatrix,
+ ovalRect,
+ style.strokeRec(),
+ shaderCaps));
+ if (op) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
return;
}
}
@@ -1555,12 +1546,12 @@ void GrRenderTargetContext::internalDrawPath(const GrClip& clip,
pr->drawPath(args);
}
-void GrRenderTargetContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const GrClip& clip,
- GrDrawOp* batch) {
+void GrRenderTargetContext::addDrawOp(const GrPipelineBuilder& pipelineBuilder, const GrClip& clip,
+ GrDrawOp* op) {
ASSERT_SINGLE_OWNER
RETURN_IF_ABANDONED
SkDEBUGCODE(this->validate();)
- GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrRenderTargetContext::drawBatch");
+ GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrRenderTargetContext::addDrawOp");
- this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch);
+ this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op);
}
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index 0eef23ae4b..ec76c48bf9 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -196,5 +196,5 @@ void GrSWMaskHelper::DrawToTargetWithShapeMask(GrTexture* texture,
sk_sp<GrDrawOp> batch(GrRectBatchFactory::CreateNonAAFill(paint.getColor(), SkMatrix::I(),
dstRect, nullptr, &invert));
- renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+ renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
}
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index e978ec4603..8b941ebaff 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -74,7 +74,7 @@ void GrSoftwarePathRenderer::DrawNonAARect(GrRenderTargetContext* renderTargetCo
GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
pipelineBuilder.setUserStencil(&userStencilSettings);
- renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+ renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
}
void GrSoftwarePathRenderer::DrawAroundInvPath(GrRenderTargetContext* renderTargetContext,
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index 0107e274bd..7de67f60d3 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -1005,7 +1005,7 @@ bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
GrPipelineBuilder pipelineBuilder(*args.fPaint);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
return true;
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
index b06c503041..8f7c679b1d 100644
--- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
@@ -543,7 +543,7 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) {
GrPipelineBuilder pipelineBuilder(*args.fPaint);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
return true;
}
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index 624be6e9b3..8ff4231ac2 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -983,7 +983,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
GrPipelineBuilder pipelineBuilder(*args.fPaint);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
return true;
}
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
index f3a76cb112..f959df6c08 100644
--- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
@@ -364,7 +364,7 @@ bool GrAALinearizingConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
GrPipelineBuilder pipelineBuilder(*args.fPaint);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
return true;
}
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index b64f5de957..d2a420d4be 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -51,6 +51,6 @@ bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
GrPipelineBuilder pipelineBuilder(*args.fPaint, useHWAA);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
return true;
}
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index e41818dbd6..ce51cf099b 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -571,7 +571,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrRenderTargetContext* renderTarget
pipelineBuilder.setDrawFace(drawFace[p]);
pipelineBuilder.setUserStencil(passes[p]);
- renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+ renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
} else {
sk_sp<GrDrawOp> batch(new DefaultPathBatch(paint.getColor(), path, srcSpaceTol,
newCoverage, viewMatrix, isHairline,
@@ -584,7 +584,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrRenderTargetContext* renderTarget
pipelineBuilder.setDisableColorXPFactory();
}
- renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+ renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
}
}
return true;
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index 5aa8f37903..6b96349793 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -665,7 +665,7 @@ bool GrMSAAPathRenderer::internalDrawPath(GrRenderTargetContext* renderTargetCon
GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
pipelineBuilder.setUserStencil(passes[p]);
- renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+ renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
} else {
sk_sp<MSAAPathBatch> batch(new MSAAPathBatch(paint.getColor(), path,
viewMatrix, devBounds));
@@ -679,7 +679,7 @@ bool GrMSAAPathRenderer::internalDrawPath(GrRenderTargetContext* renderTargetCon
pipelineBuilder.setDisableColorXPFactory();
}
- renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+ renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
}
}
return true;
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index f233cccd8d..bdc102494f 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -941,7 +941,7 @@ bool GrPLSPathRenderer::onDrawPath(const DrawPathArgs& args) {
args.fRenderTargetContext->mustUseHWAA(*args.fPaint));
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
SkDEBUGCODE(inPLSDraw = false;)
return true;
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
index c12f299f34..97287d2c86 100644
--- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
@@ -147,7 +147,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
!args.fRenderTargetContext->hasMixedSamples());
pipelineBuilder.setUserStencil(&kInvertedCoverPass);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, coverBatch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, coverBatch.get());
}
} else {
static constexpr GrUserStencilSettings kCoverPass(
@@ -170,7 +170,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag);
}
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
}
return true;
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 6e78c11bd2..e0327d0694 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -370,7 +370,7 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
args.fRenderTargetContext->mustUseHWAA(*args.fPaint));
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+ args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
return true;
}
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index b1e4f92357..5b35f845c1 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -326,7 +326,7 @@ void GrAtlasTextBlob::flushRun(GrRenderTargetContext* rtc, const GrPaint& grPain
GrPipelineBuilder pipelineBuilder(grPaint, rtc->mustUseHWAA(grPaint));
- rtc->drawBatch(pipelineBuilder, clip, batch.get());
+ rtc->addDrawOp(pipelineBuilder, clip, batch.get());
}
}
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index 23fdea2030..ba98784c71 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -644,7 +644,7 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx,
pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, grPaint.isAntiAlias());
pipelineBuilder.setUserStencil(&kCoverPass);
- renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+ renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
}
if (fFallbackTextBlob) {