Miscellaneous skgpu::v2 backend updates
Bug: skia:11837
Change-Id: I334cdeb75db1a80a35d333faa26aec4999bd6bb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449677
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/BaseDevice.h b/src/gpu/BaseDevice.h
index c8f8a73..6bcdf5e 100644
--- a/src/gpu/BaseDevice.h
+++ b/src/gpu/BaseDevice.h
@@ -23,6 +23,16 @@
namespace v1 { class SurfaceDrawContext; }
#endif // SK_GPU_V1
+/*
+ * The most important thing to remember about this class hierarchy is there is no skgpu::SDC
+ * base class so the v1 and v2 Devices privately hold their own version of the SDC. The best
+ * the BaseDevice can do is to return the SDC-variant as a generic SFC.
+ *
+ * skgpu::BaseDevice
+ * / \
+ * v1::Device v2::Device
+ * - v1::SDC - v2::SDC
+ */
class BaseDevice : public SkBaseDevice {
public:
enum class InitContents {
@@ -32,7 +42,7 @@
BaseDevice(sk_sp<GrRecordingContext>, const SkImageInfo&, const SkSurfaceProps&);
- virtual GrSurfaceProxyView readSurfaceView() = 0;
+ GrSurfaceProxyView readSurfaceView();
BaseDevice* asGpuDevice() override { return this; }