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/BulkRectTest.cpp b/tests/BulkRectTest.cpp
index aeb6b30..01fae79 100644
--- a/tests/BulkRectTest.cpp
+++ b/tests/BulkRectTest.cpp
@@ -11,13 +11,13 @@
#include "src/gpu/GrOpsTypes.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrResourceProvider.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/ops/GrFillRectOp.h"
#include "src/gpu/ops/GrTextureOp.h"
+#include "src/gpu/v1/SurfaceDrawContext_v1.h"
#include "tests/Test.h"
-static std::unique_ptr<GrSurfaceDrawContext> new_RTC(GrRecordingContext* rContext) {
- return GrSurfaceDrawContext::Make(
+static std::unique_ptr<skgpu::v1::SurfaceDrawContext> new_SDC(GrRecordingContext* rContext) {
+ return skgpu::v1::SurfaceDrawContext::Make(
rContext, GrColorType::kRGBA_8888, nullptr, SkBackingFit::kExact, {128, 128},
SkSurfaceProps());
}
@@ -56,7 +56,7 @@
return;
}
- std::unique_ptr<GrSurfaceDrawContext> rtc = new_RTC(dContext);
+ std::unique_ptr<skgpu::v1::SurfaceDrawContext> sdc = new_SDC(dContext);
auto quads = new GrQuadSetEntry[requestedTotNumQuads];
@@ -70,10 +70,10 @@
GrPaint paint;
paint.setXPFactory(SkBlendMode_AsXPFactory(blendMode));
- GrFillRectOp::AddFillRectOps(rtc.get(), nullptr, dContext, std::move(paint), overallAA,
+ GrFillRectOp::AddFillRectOps(sdc.get(), nullptr, dContext, std::move(paint), overallAA,
SkMatrix::I(), quads, requestedTotNumQuads);
- GrOpsTask* opsTask = rtc->testingOnly_PeekLastOpsTask();
+ GrOpsTask* opsTask = sdc->testingOnly_PeekLastOpsTask();
int actualNumOps = opsTask->numOpChains();
int actualTotNumQuads = 0;
@@ -100,7 +100,7 @@
bool allUniqueProxies,
int requestedTotNumQuads, int expectedNumOps) {
- std::unique_ptr<GrSurfaceDrawContext> rtc = new_RTC(dContext);
+ std::unique_ptr<skgpu::v1::SurfaceDrawContext> sdc = new_SDC(dContext);
GrSurfaceProxyView proxyViewA, proxyViewB;
@@ -159,10 +159,10 @@
overallAA,
&quad,
nullptr);
- rtc->addDrawOp(nullptr, std::move(op));
+ sdc->addDrawOp(nullptr, std::move(op));
}
} else {
- GrTextureOp::AddTextureSetOps(rtc.get(),
+ GrTextureOp::AddTextureSetOps(sdc.get(),
nullptr,
dContext,
set,
@@ -178,7 +178,7 @@
nullptr);
}
- GrOpsTask* opsTask = rtc->testingOnly_PeekLastOpsTask();
+ GrOpsTask* opsTask = sdc->testingOnly_PeekLastOpsTask();
int actualNumOps = opsTask->numOpChains();
int actualTotNumQuads = 0;