aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawContext.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-10-23 09:38:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-23 09:38:03 -0700
commitb83bec5e0427be6fbe2a8f9802a5a031de91e11a (patch)
tree884b39b11582bccccc69aee2bd161cf03a829356 /src/gpu/GrDrawContext.cpp
parentef27d89b076ce7ab81703c9c08ce1f5c44106ee6 (diff)
Narrow the distribution of GrDrawTarget a bit
BUG=skia:4094 TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1420043002
Diffstat (limited to 'src/gpu/GrDrawContext.cpp')
-rw-r--r--src/gpu/GrDrawContext.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 99a1ce5390..f52d7dcd15 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -461,7 +461,7 @@ void GrDrawContext::drawRRect(const GrClip& clip,
SkPath path;
path.setIsVolatile(true);
path.addRRect(rrect);
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, strokeInfo);
}
}
@@ -498,7 +498,7 @@ void GrDrawContext::drawDRRect(const GrClip& clip,
path.setFillType(SkPath::kEvenOdd_FillType);
GrStrokeInfo fillRec(SkStrokeRec::kFill_InitStyle);
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, fillRec);
}
}
@@ -540,7 +540,7 @@ void GrDrawContext::drawOval(const GrClip& clip,
SkPath path;
path.setIsVolatile(true);
path.addOval(oval);
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, strokeInfo);
}
}
@@ -661,12 +661,11 @@ void GrDrawContext::drawPath(const GrClip& clip,
}
}
}
- this->internalDrawPath(this->getDrawTarget(), &pipelineBuilder, viewMatrix, color,
+ this->internalDrawPath(&pipelineBuilder, viewMatrix, color,
paint.isAntiAlias(), path, strokeInfo);
}
-void GrDrawContext::internalDrawPath(GrDrawTarget* target,
- GrPipelineBuilder* pipelineBuilder,
+void GrDrawContext::internalDrawPath(GrPipelineBuilder* pipelineBuilder,
const SkMatrix& viewMatrix,
GrColor color,
bool useAA,
@@ -692,7 +691,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
const GrStrokeInfo* strokeInfoPtr = &strokeInfo;
// Try a 1st time without stroking the path and without allowing the SW renderer
- GrPathRenderer* pr = fDrawingManager->getContext()->getPathRenderer(target, pipelineBuilder,
+ GrPathRenderer* pr = fDrawingManager->getContext()->getPathRenderer(pipelineBuilder,
viewMatrix, *pathPtr,
*strokeInfoPtr, false,
type);
@@ -708,7 +707,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
return;
}
strokeInfoPtr = &dashlessStrokeInfo;
- pr = fDrawingManager->getContext()->getPathRenderer(target, pipelineBuilder, viewMatrix,
+ pr = fDrawingManager->getContext()->getPathRenderer(pipelineBuilder, viewMatrix,
*pathPtr, *strokeInfoPtr,
false, type);
}
@@ -733,7 +732,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
}
// This time, allow SW renderer
- pr = fDrawingManager->getContext()->getPathRenderer(target, pipelineBuilder, viewMatrix,
+ pr = fDrawingManager->getContext()->getPathRenderer(pipelineBuilder, viewMatrix,
*pathPtr, *strokeInfoPtr,
true, type);
}
@@ -746,7 +745,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
}
GrPathRenderer::DrawPathArgs args;
- args.fTarget = target;
+ args.fTarget = this->getDrawTarget();
args.fResourceProvider = fDrawingManager->getContext()->resourceProvider();
args.fPipelineBuilder = pipelineBuilder;
args.fColor = color;