Move GrOpsTask to gpu/ops and the the skgpu::v1 namespace
Bug: skia:11837
Change-Id: I9ee6343b5144b02e8f455df0ea01b8199a8f14e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440837
Commit-Queue: Robert Phillips <[email protected]>
Reviewed-by: Greg Daniel <[email protected]>
diff --git a/tests/BulkRectTest.cpp b/tests/BulkRectTest.cpp
index 01fae79..7a8c035 100644
--- a/tests/BulkRectTest.cpp
+++ b/tests/BulkRectTest.cpp
@@ -73,7 +73,7 @@
GrFillRectOp::AddFillRectOps(sdc.get(), nullptr, dContext, std::move(paint), overallAA,
SkMatrix::I(), quads, requestedTotNumQuads);
- GrOpsTask* opsTask = sdc->testingOnly_PeekLastOpsTask();
+ auto opsTask = sdc->testingOnly_PeekLastOpsTask();
int actualNumOps = opsTask->numOpChains();
int actualTotNumQuads = 0;
@@ -178,7 +178,7 @@
nullptr);
}
- GrOpsTask* opsTask = sdc->testingOnly_PeekLastOpsTask();
+ auto opsTask = sdc->testingOnly_PeekLastOpsTask();
int actualNumOps = opsTask->numOpChains();
int actualTotNumQuads = 0;
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index cc90443..e6b04c2 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -250,10 +250,10 @@
// This should combine w/ the prior combined clear and overwrite the color
sdc->clear(kScissorRect, SK_PMColor4fBLACK);
- GrOpsTask* ops = sdc->getOpsTask();
- REPORTER_ASSERT(reporter, ops->numOpChains() == 1);
+ auto opsTask = sdc->getOpsTask();
+ REPORTER_ASSERT(reporter, opsTask->numOpChains() == 1);
- const GrClearOp& clearOp = ops->getChain(0)->cast<GrClearOp>();
+ const GrClearOp& clearOp = opsTask->getChain(0)->cast<GrClearOp>();
constexpr std::array<float, 4> kExpected { 0, 0, 0, 1 };
REPORTER_ASSERT(reporter, clearOp.color() == kExpected);
@@ -276,10 +276,10 @@
// field
sdc->clearStencilClip(kScissorRect, false);
- GrOpsTask* ops = sdc->getOpsTask();
- REPORTER_ASSERT(reporter, ops->numOpChains() == 1);
+ auto opsTask = sdc->getOpsTask();
+ REPORTER_ASSERT(reporter, opsTask->numOpChains() == 1);
- const GrClearOp& clearOp = ops->getChain(0)->cast<GrClearOp>();
+ const GrClearOp& clearOp = opsTask->getChain(0)->cast<GrClearOp>();
constexpr std::array<float, 4> kExpected { 1, 1, 1, 1 };
REPORTER_ASSERT(reporter, clearOp.color() == kExpected);
diff --git a/tests/GrOpListFlushTest.cpp b/tests/GrOpListFlushTest.cpp
index 370a2bd..36228d4 100644
--- a/tests/GrOpListFlushTest.cpp
+++ b/tests/GrOpListFlushTest.cpp
@@ -26,7 +26,7 @@
return result;
}
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrOpsTaskFlushCount, reporter, ctxInfo) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(OpsTaskFlushCount, reporter, ctxInfo) {
auto context = ctxInfo.directContext();
GrGpu* gpu = context->priv().getGpu();
diff --git a/tests/OpChainTest.cpp b/tests/OpChainTest.cpp
index 58aa3e2..a7b0db7 100644
--- a/tests/OpChainTest.cpp
+++ b/tests/OpChainTest.cpp
@@ -9,10 +9,10 @@
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/GrMemoryPool.h"
#include "src/gpu/GrOpFlushState.h"
-#include "src/gpu/GrOpsTask.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/ops/GrOp.h"
+#include "src/gpu/ops/OpsTask.h"
#include "tests/Test.h"
#include <iterator>
@@ -140,7 +140,7 @@
}
CombineResult onCombineIfPossible(GrOp* t, SkArenaAlloc* arenas, const GrCaps&) override {
- // This op doesn't use the arenas, but make sure the GrOpsTask is sending it
+ // This op doesn't use the arenas, but make sure the OpsTask is sending it
SkASSERT(arenas);
(void) arenas;
auto that = t->cast<TestOp>();
@@ -220,10 +220,10 @@
GrOpFlushState flushState(dContext->priv().getGpu(),
dContext->priv().resourceProvider(),
&tracker);
- GrOpsTask opsTask(drawingMgr,
- GrSurfaceProxyView(proxy, kOrigin, writeSwizzle),
- dContext->priv().auditTrail(),
- arenas);
+ skgpu::v1::OpsTask opsTask(drawingMgr,
+ GrSurfaceProxyView(proxy, kOrigin, writeSwizzle),
+ dContext->priv().auditTrail(),
+ arenas);
// This assumes the particular values of kRanges.
std::fill_n(result, result_width(), -1);
std::fill_n(validResult, result_width(), -1);
diff --git a/tests/TextureOpTest.cpp b/tests/TextureOpTest.cpp
index 40c967c..4bc9253 100644
--- a/tests/TextureOpTest.cpp
+++ b/tests/TextureOpTest.cpp
@@ -9,16 +9,16 @@
#include "include/gpu/GrRecordingContext.h"
#include "src/gpu/GrColorSpaceXform.h"
#include "src/gpu/GrDirectContextPriv.h"
-#include "src/gpu/GrOpsTask.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/geometry/GrQuad.h"
#include "src/gpu/ops/GrTextureOp.h"
+#include "src/gpu/ops/OpsTask.h"
#include "tests/Test.h"
class OpsTaskTestingAccess {
public:
- typedef GrOpsTask::OpChain OpChain;
+ typedef skgpu::v1::OpsTask::OpChain OpChain;
};
static void check_chain(OpsTaskTestingAccess::OpChain* chain, SkRect firstRect, SkRect lastRect,
diff --git a/tests/WrappedSurfaceCopyOnWriteTest.cpp b/tests/WrappedSurfaceCopyOnWriteTest.cpp
index 1e773f3..9db0e93 100644
--- a/tests/WrappedSurfaceCopyOnWriteTest.cpp
+++ b/tests/WrappedSurfaceCopyOnWriteTest.cpp
@@ -129,7 +129,7 @@
#if SK_GPU_V1
-// Make sure GrOpsTask are skippable
+// Make sure OpsTask are skippable
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SkipOpsTaskTest, reporter, ctxInfo) {
GrDirectContext* dContext = ctxInfo.directContext();