Move GrPathRenderer and GrPathRendererChain to skgpu::v1 namespace
Bug: skia:11837
Change-Id: I42abcd3724ac1e2c71d3bd13ff6295a4683af5e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440261
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 309aa4e..f536b86 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -51,7 +51,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
#if SK_GPU_V1
GrDrawingManager::GrDrawingManager(GrRecordingContext* rContext,
- const GrPathRendererChain::Options& optionsForPathRendererChain,
+ const PathRendererChain::Options& optionsForPathRendererChain,
bool reduceOpsTaskSplitting)
: fContext(rContext)
, fOptionsForPathRendererChain(optionsForPathRendererChain)
@@ -936,20 +936,21 @@
* Due to its expense, the software path renderer has split out so it can
* can be individually allowed/disallowed via the "allowSW" boolean.
*/
-GrPathRenderer* GrDrawingManager::getPathRenderer(const GrPathRenderer::CanDrawPathArgs& args,
- bool allowSW,
- GrPathRendererChain::DrawType drawType,
- GrPathRenderer::StencilSupport* stencilSupport) {
+skgpu::v1::PathRenderer* GrDrawingManager::getPathRenderer(
+ const PathRenderer::CanDrawPathArgs& args,
+ bool allowSW,
+ PathRendererChain::DrawType drawType,
+ PathRenderer::StencilSupport* stencilSupport) {
if (!fPathRendererChain) {
fPathRendererChain =
- std::make_unique<GrPathRendererChain>(fContext, fOptionsForPathRendererChain);
+ std::make_unique<PathRendererChain>(fContext, fOptionsForPathRendererChain);
}
- GrPathRenderer* pr = fPathRendererChain->getPathRenderer(args, drawType, stencilSupport);
+ auto pr = fPathRendererChain->getPathRenderer(args, drawType, stencilSupport);
if (!pr && allowSW) {
auto swPR = this->getSoftwarePathRenderer();
- if (GrPathRenderer::CanDrawPath::kNo != swPR->canDrawPath(args)) {
+ if (PathRenderer::CanDrawPath::kNo != swPR->canDrawPath(args)) {
pr = swPR;
}
}
@@ -963,7 +964,7 @@
return pr;
}
-GrPathRenderer* GrDrawingManager::getSoftwarePathRenderer() {
+skgpu::v1::PathRenderer* GrDrawingManager::getSoftwarePathRenderer() {
if (!fSoftwarePathRenderer) {
fSoftwarePathRenderer.reset(new skgpu::v1::SoftwarePathRenderer(
fContext->priv().proxyProvider(), fOptionsForPathRendererChain.fAllowPathMaskCaching));
@@ -973,16 +974,16 @@
skgpu::v1::AtlasPathRenderer* GrDrawingManager::getAtlasPathRenderer() {
if (!fPathRendererChain) {
- fPathRendererChain = std::make_unique<GrPathRendererChain>(fContext,
- fOptionsForPathRendererChain);
+ fPathRendererChain = std::make_unique<PathRendererChain>(fContext,
+ fOptionsForPathRendererChain);
}
return fPathRendererChain->getAtlasPathRenderer();
}
-GrPathRenderer* GrDrawingManager::getTessellationPathRenderer() {
+skgpu::v1::PathRenderer* GrDrawingManager::getTessellationPathRenderer() {
if (!fPathRendererChain) {
- fPathRendererChain = std::make_unique<GrPathRendererChain>(fContext,
- fOptionsForPathRendererChain);
+ fPathRendererChain = std::make_unique<PathRendererChain>(fContext,
+ fOptionsForPathRendererChain);
}
return fPathRendererChain->getTessellationPathRenderer();
}