Web Inspector: Canvas: add support for showing WebGPU contexts
[WebKit-https.git] / Source / WebCore / Modules / webgpu / GPUCanvasContext.h
index e65476b..61c9aa2 100644 (file)
@@ -28,6 +28,7 @@
 #if ENABLE(WEBGPU)
 
 #include "GPUBasedCanvasRenderingContext.h"
+#include "HTMLCanvasElement.h"
 #include "WebGPUSwapChain.h"
 #include <wtf/RefPtr.h>
 
@@ -37,6 +38,8 @@ class GPUCanvasContext final : public GPUBasedCanvasRenderingContext {
 public:
     static std::unique_ptr<GPUCanvasContext> create(CanvasBase&);
 
+    HTMLCanvasElement& canvas() const { return downcast<HTMLCanvasElement>(canvasBase()); }
+
     void replaceSwapChain(Ref<WebGPUSwapChain>&&);
 
 private: