Revert "Feed all top-level GPU accessors through skgpu::BaseDevice"
This reverts commit 5de8b1950422d002f9c1a1ebdf545364d7d1dcfe.
Reason for revert: blocking Android roll
Original change's description:
> Feed all top-level GPU accessors through skgpu::BaseDevice
>
> This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.
>
> This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.
>
> Bug: skia:11837
> Change-Id: I4e205255706680ac58ffe40f714884c2ee7ac799
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431036
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,brianosman@google.com,michaelludwig@google.com
Change-Id: I8a015be4edbe21d63db09d5593af13cc89df4217
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431538
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/BaseDevice.h b/src/gpu/BaseDevice.h
index 1427921..fbd28c5 100644
--- a/src/gpu/BaseDevice.h
+++ b/src/gpu/BaseDevice.h
@@ -11,9 +11,6 @@
#include "include/core/SkImage.h"
#include "include/private/GrTypesPriv.h"
-class GrRenderTargetProxy;
-class GrSurfaceDrawContext;
-class GrSurfaceFillContext;
class GrSurfaceProxyView;
// NOTE: when not defined, SkGpuDevice extends SkBaseDevice directly and manages its clip stack
@@ -43,20 +40,17 @@
kUninit_InitContents
};
- BaseDevice(sk_sp<GrRecordingContext>, const SkImageInfo&, const SkSurfaceProps&);
+ BaseDevice(sk_sp<GrRecordingContext> rContext,
+ const SkImageInfo& ii,
+ const SkSurfaceProps& props)
+ : INHERITED(ii, props)
+ , fContext(std::move(rContext)) {
+ }
virtual GrSurfaceProxyView readSurfaceView() = 0;
+ GrRenderTargetProxy* targetProxy() override;
- BaseDevice* asGpuDevice() override { return this; }
-
-#if SK_GPU_V1
- // TODO: make this return a skgpu::v1:SurfaceDrawContext
- virtual GrSurfaceDrawContext* surfaceDrawContext() { return nullptr; }
-#endif
-
- virtual GrSurfaceFillContext* surfaceFillContext() = 0;
- GrRenderTargetProxy* targetProxy();
- GrRecordingContext* recordingContext() const { return fContext.get(); }
+ GrRecordingContext* recordingContext() const override { return fContext.get(); }
virtual bool wait(int numSemaphores,
const GrBackendSemaphore* waitSemaphores,