Revert "Move more Ops to skgpu::v1 namespace"
This reverts commit f3158abda33ad84e3df90cfb75a3ed82abd2fbe2.
Reason for revert: Broke Flutter build
Original change's description:
> Move more Ops to skgpu::v1 namespace
>
> GrClearOp
> GrDashOp
>
> Bug: skia:11837
> Change-Id: Ib65418952e7d4fb1e419e4942223823f22302b34
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443518
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Ic181ced7f5f2a8ff834fdcfb4e5265b99eef1666
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444365
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/DashLinePathRenderer.cpp b/src/gpu/ops/DashLinePathRenderer.cpp
index ccfd5ba..d9e51125 100644
--- a/src/gpu/ops/DashLinePathRenderer.cpp
+++ b/src/gpu/ops/DashLinePathRenderer.cpp
@@ -10,7 +10,7 @@
#include "src/gpu/GrAuditTrail.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/geometry/GrStyledShape.h"
-#include "src/gpu/ops/DashOp.h"
+#include "src/gpu/ops/GrDashOp.h"
#include "src/gpu/ops/GrMeshDrawOp.h"
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
@@ -22,7 +22,7 @@
if (args.fShape->style().isDashed() && args.fShape->asLine(pts, &inverted)) {
// We should never have an inverse dashed case.
SkASSERT(!inverted);
- if (!DashOp::CanDrawDashLine(pts, args.fShape->style(), *args.fViewMatrix)) {
+ if (!GrDashOp::CanDrawDashLine(pts, args.fShape->style(), *args.fViewMatrix)) {
return CanDrawPath::kNo;
}
return CanDrawPath::kYes;
@@ -33,25 +33,25 @@
bool DashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
GR_AUDIT_TRAIL_AUTO_FRAME(args.fContext->priv().auditTrail(),
"DashLinePathRenderer::onDrawPath");
- DashOp::AAMode aaMode;
+ GrDashOp::AAMode aaMode;
switch (args.fAAType) {
case GrAAType::kNone:
- aaMode = DashOp::AAMode::kNone;
+ aaMode = GrDashOp::AAMode::kNone;
break;
case GrAAType::kMSAA:
// In this mode we will use aa between dashes but the outer border uses MSAA. Otherwise,
// we can wind up with external edges antialiased and internal edges unantialiased.
- aaMode = DashOp::AAMode::kCoverageWithMSAA;
+ aaMode = GrDashOp::AAMode::kCoverageWithMSAA;
break;
case GrAAType::kCoverage:
- aaMode = DashOp::AAMode::kCoverage;
+ aaMode = GrDashOp::AAMode::kCoverage;
break;
}
SkPoint pts[2];
SkAssertResult(args.fShape->asLine(pts, nullptr));
- GrOp::Owner op = DashOp::MakeDashLineOp(args.fContext, std::move(args.fPaint),
- *args.fViewMatrix, pts, aaMode, args.fShape->style(),
- args.fUserStencilSettings);
+ GrOp::Owner op =
+ GrDashOp::MakeDashLineOp(args.fContext, std::move(args.fPaint), *args.fViewMatrix, pts,
+ aaMode, args.fShape->style(), args.fUserStencilSettings);
if (!op) {
return false;
}