28class QOhosSurfaceImage :
public QObject
32 explicit QOhosSurfaceImage(uint32_t glTextureId, QObject *parent =
nullptr);
33 ~QOhosSurfaceImage() override;
35 Q_DISABLE_COPY_MOVE(QOhosSurfaceImage)
37 bool isValid()
const {
return m_image !=
nullptr; }
39 OHNativeWindow *nativeWindow()
const {
return m_nativeWindow; }
40 QByteArray surfaceId()
const {
return m_surfaceId; }
43 bool updateTexImage();
44 QMatrix4x4 transformMatrix()
const;
46 quint64 index()
const {
return m_index; }
49 void frameAvailable(quint64 index);
52 static void onFrameAvailableTrampoline(
void *context);
54 OH_NativeImage *m_image{
nullptr };
55 OHNativeWindow *m_nativeWindow{
nullptr };
56 uint32_t m_textureId{ 0 };
57 QByteArray m_surfaceId;
59 static std::atomic<quint64> s_nextIndex;