wasm: provide isValid implementation for QWasmOffscreenSurface
Fixes: QTBUG-120350 Pick-to: 6.6 6.7 Change-Id: I0cb2ba66a2d27f3d96a4a6a1cb85695f6b305178 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>bb10
parent
9735b10558
commit
139d57a7e9
|
|
@ -27,4 +27,9 @@ QWasmOffscreenSurface::~QWasmOffscreenSurface()
|
|||
emscripten::val::module_property("specialHTMLTargets").delete_(m_specialTargetId);
|
||||
}
|
||||
|
||||
bool QWasmOffscreenSurface::isValid() const
|
||||
{
|
||||
return !m_offscreenCanvas.isNull() && !m_offscreenCanvas.isUndefined();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ public:
|
|||
~QWasmOffscreenSurface() final;
|
||||
|
||||
const std::string &id() const { return m_specialTargetId; }
|
||||
bool isValid() const override;
|
||||
|
||||
private:
|
||||
std::string m_specialTargetId;
|
||||
|
|
|
|||
Loading…
Reference in New Issue