Clean up capture interface.
Start/end is a little odd, changed to start/stop.
Change-Id: I91a4b74013133de27c87f6c79e992eb10851def0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/583956
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/ganesh/GrGpu.h b/src/gpu/ganesh/GrGpu.h
index 24088fc..4467a70 100644
--- a/src/gpu/ganesh/GrGpu.h
+++ b/src/gpu/ganesh/GrGpu.h
@@ -643,7 +643,7 @@
* Currently only works with the Metal backend.
*/
virtual void testingOnly_startCapture() {}
- virtual void testingOnly_endCapture() {}
+ virtual void testingOnly_stopCapture() {}
#endif
// width and height may be larger than rt (if underlying API allows it).
diff --git a/src/gpu/ganesh/d3d/GrD3DGpu.cpp b/src/gpu/ganesh/d3d/GrD3DGpu.cpp
index 8ef1806..d733f30 100644
--- a/src/gpu/ganesh/d3d/GrD3DGpu.cpp
+++ b/src/gpu/ganesh/d3d/GrD3DGpu.cpp
@@ -1675,7 +1675,7 @@
}
}
-void GrD3DGpu::testingOnly_endCapture() {
+void GrD3DGpu::testingOnly_stopCapture() {
if (fGraphicsAnalysis) {
fGraphicsAnalysis->EndCapture();
}
diff --git a/src/gpu/ganesh/d3d/GrD3DGpu.h b/src/gpu/ganesh/d3d/GrD3DGpu.h
index c747658..36ab6e97 100644
--- a/src/gpu/ganesh/d3d/GrD3DGpu.h
+++ b/src/gpu/ganesh/d3d/GrD3DGpu.h
@@ -69,7 +69,7 @@
void deleteTestingOnlyBackendRenderTarget(const GrBackendRenderTarget&) override;
void testingOnly_startCapture() override;
- void testingOnly_endCapture() override;
+ void testingOnly_stopCapture() override;
void resetShaderCacheForTesting() const override {
fResourceProvider.resetShaderCacheForTesting();
diff --git a/src/gpu/ganesh/mtl/GrMtlGpu.h b/src/gpu/ganesh/mtl/GrMtlGpu.h
index 82a8ebd..07cb51e 100644
--- a/src/gpu/ganesh/mtl/GrMtlGpu.h
+++ b/src/gpu/ganesh/mtl/GrMtlGpu.h
@@ -296,7 +296,7 @@
#if GR_TEST_UTILS
void testingOnly_startCapture() override;
- void testingOnly_endCapture() override;
+ void testingOnly_stopCapture() override;
#endif
#ifdef SK_ENABLE_DUMP_GPU
diff --git a/src/gpu/ganesh/mtl/GrMtlGpu.mm b/src/gpu/ganesh/mtl/GrMtlGpu.mm
index f08d48b..1176b0b 100644
--- a/src/gpu/ganesh/mtl/GrMtlGpu.mm
+++ b/src/gpu/ganesh/mtl/GrMtlGpu.mm
@@ -229,7 +229,7 @@
this->checkForFinishedCommandBuffers();
#if GR_METAL_CAPTURE_COMMANDBUFFER
- this->testingOnly_endCapture();
+ this->testingOnly_stopCapture();
#endif
return didCommit;
}
@@ -1770,7 +1770,7 @@
}
}
-void GrMtlGpu::testingOnly_endCapture() {
+void GrMtlGpu::testingOnly_stopCapture() {
if (@available(macOS 10.13, iOS 11.0, *)) {
MTLCaptureManager* captureManager = [MTLCaptureManager sharedCaptureManager];
if (captureManager.isCapturing) {
diff --git a/src/gpu/graphite/ContextPriv.h b/src/gpu/graphite/ContextPriv.h
index d0d3350..93f22b42 100644
--- a/src/gpu/graphite/ContextPriv.h
+++ b/src/gpu/graphite/ContextPriv.h
@@ -38,8 +38,8 @@
void startCapture() {
fContext->fQueueManager->startCapture();
}
- void endCapture() {
- fContext->fQueueManager->endCapture();
+ void stopCapture() {
+ fContext->fQueueManager->stopCapture();
}
#endif
diff --git a/src/gpu/graphite/QueueManager.h b/src/gpu/graphite/QueueManager.h
index 0f552a0..cc2ebcf 100644
--- a/src/gpu/graphite/QueueManager.h
+++ b/src/gpu/graphite/QueueManager.h
@@ -32,7 +32,7 @@
#if GRAPHITE_TEST_UTILS
virtual void startCapture() {}
- virtual void endCapture() {}
+ virtual void stopCapture() {}
#endif
protected:
diff --git a/src/gpu/graphite/mtl/MtlQueueManager.h b/src/gpu/graphite/mtl/MtlQueueManager.h
index d88c9b4..eaae2dcf 100644
--- a/src/gpu/graphite/mtl/MtlQueueManager.h
+++ b/src/gpu/graphite/mtl/MtlQueueManager.h
@@ -35,7 +35,7 @@
#if GRAPHITE_TEST_UTILS
void startCapture() override;
- void endCapture() override;
+ void stopCapture() override;
#endif
sk_cfp<id<MTLCommandQueue>> fQueue;
diff --git a/src/gpu/graphite/mtl/MtlQueueManager.mm b/src/gpu/graphite/mtl/MtlQueueManager.mm
index 351947e..6e40b29 100644
--- a/src/gpu/graphite/mtl/MtlQueueManager.mm
+++ b/src/gpu/graphite/mtl/MtlQueueManager.mm
@@ -90,7 +90,7 @@
}
}
-void MtlQueueManager::endCapture() {
+void MtlQueueManager::stopCapture() {
if (@available(macOS 10.13, iOS 11.0, *)) {
MTLCaptureManager* captureManager = [MTLCaptureManager sharedCaptureManager];
if (captureManager.isCapturing) {