Rename GrSurfaceDrawContext to skgpu::v1::SurfaceDrawContext
This CL is mostly mechanical. It:
replaces "src/gpu/GrSurfaceDrawContext.h" #includes with
"src/gpu/v1/SurfaceDrawContext_v1.h" and reorders
replaces "class GrSurfaceDrawContext;" with
"namespace skgpu { namespace v1 { class SurfaceDrawContext; }}"
replaces "GrSurfaceDrawContext*" with "auto" where possible
replaces "rtc" with "sdc"
replaces "surfaceDrawContext" with "sdc"
replaces GrSurfaceDrawContext with skgpu::v1::SurfaceDrawContext
reflows parameters as needed
This CL does not try to:
make skgpu::v1::SurfaceDrawContext V1-only
minimize the skgpu and/or skgpu::v1 prefixes
Those two tasks will be accomplished in follow up CLs. This CL is just trying to get the bulk of the mechanical changes comprehensibly landed.
Bug: skia:11837
Change-Id: I6fe59080249d585df8f5d27c6b67569cdc35842f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp
index 2d50353..df472e6 100644
--- a/tests/PathRendererCacheTests.cpp
+++ b/tests/PathRendererCacheTests.cpp
@@ -15,10 +15,10 @@
#include "src/gpu/GrResourceCache.h"
#include "src/gpu/GrSoftwarePathRenderer.h"
#include "src/gpu/GrStyle.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/effects/GrPorterDuffXferProcessor.h"
#include "src/gpu/geometry/GrStyledShape.h"
#include "src/gpu/ops/GrTriangulatingPathRenderer.h"
+#include "src/gpu/v1/SurfaceDrawContext_v1.h"
static SkPath create_concave_path() {
SkPath path;
@@ -31,7 +31,7 @@
}
static void draw_path(GrRecordingContext* rContext,
- GrSurfaceDrawContext* surfaceDrawContext,
+ skgpu::v1::SurfaceDrawContext* sdc,
const SkPath& path,
GrPathRenderer* pr,
GrAAType aaType,
@@ -40,8 +40,8 @@
GrPaint paint;
paint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
- SkIRect clipConservativeBounds = SkIRect::MakeWH(surfaceDrawContext->width(),
- surfaceDrawContext->height());
+ SkIRect clipConservativeBounds = SkIRect::MakeWH(sdc->width(),
+ sdc->height());
GrStyledShape shape(path, style);
if (shape.style().applies()) {
shape = shape.applyStyle(GrStyle::Apply::kPathEffectAndStrokeRec, 1.0f);
@@ -51,7 +51,7 @@
GrPathRenderer::DrawPathArgs args{rContext,
std::move(paint),
&GrUserStencilSettings::kUnused,
- surfaceDrawContext,
+ sdc,
nullptr,
&clipConservativeBounds,
&matrix,
@@ -83,7 +83,7 @@
dContext->setResourceCacheLimit(8000000);
GrResourceCache* cache = dContext->priv().getResourceCache();
- auto sdc = GrSurfaceDrawContext::Make(
+ auto sdc = skgpu::v1::SurfaceDrawContext::Make(
dContext.get(), GrColorType::kRGBA_8888, nullptr, SkBackingFit::kApprox, {800, 800},
SkSurfaceProps(), 1, GrMipmapped::kNo, GrProtected::kNo, kTopLeft_GrSurfaceOrigin);
if (!sdc) {