72 Q_PROPERTY(uint winId READ winId WRITE setWinId RESET resetWinId NOTIFY winIdChanged)
73 Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged)
74 Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
75 Q_PROPERTY(
bool thumbnailAvailable READ thumbnailAvailable NOTIFY thumbnailAvailableChanged)
80 bool nativeEventFilter(
const QByteArray &eventType,
void *message, qintptr *result)
override;
81 QSGNode *updatePaintNode(
QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
override;
83 uint32_t winId()
const;
84 void setWinId(uint32_t winId);
87 qreal paintedWidth()
const;
88 qreal paintedHeight()
const;
89 bool thumbnailAvailable()
const;
91 bool isTextureProvider()
const override;
96 void paintedSizeChanged();
97 void thumbnailAvailableChanged();
100 void invalidateSceneGraph();
104 void releaseResources()
override;
107 void iconToTexture(WindowTextureProvider *textureProvider);
108 void windowToTexture(WindowTextureProvider *textureProvider);
109 bool startRedirecting();
110 void stopRedirecting();
112 void setThumbnailAvailable(
bool thumbnailAvailable);
113 void sceneVisibilityChanged(
bool visible);
115 bool m_composite =
false;
117 uint32_t m_winId = 0;
119 bool m_thumbnailAvailable =
false;
120 bool m_redirecting =
false;
121 bool m_damaged =
false;
122 mutable WindowTextureProvider *m_textureProvider =
nullptr;
123#if HAVE_XCB_COMPOSITE
124 xcb_pixmap_t pixmapForWindow();
125 static std::optional<bool> s_hasPixmapExtension;
126 bool m_openGLFunctionsResolved =
false;
127 uint8_t m_damageEventBase = 0;
128 xcb_damage_damage_t m_damage = XCB_NONE;
129 xcb_pixmap_t m_pixmap = XCB_PIXMAP_NONE;
134 bool windowToTextureGLX(WindowTextureProvider *textureProvider);
135 void resolveGLXFunctions();
136 bool loadGLXTexture();
137 void bindGLXTexture();
139 xcb_pixmap_t m_glxPixmap = XCB_PIXMAP_NONE;
140 xcb_visualid_t m_visualid = XCB_NONE;
141 QFunctionPointer m_bindTexImage =
nullptr;
142 QFunctionPointer m_releaseTexImage =
nullptr;
145 bool xcbWindowToTextureEGL(WindowTextureProvider *textureProvider);
146 void resolveEGLFunctions();
147 void bindEGLTexture();
148 bool m_eglFunctionsResolved =
false;
149 EGLImageKHR m_image = EGL_NO_IMAGE_KHR;
150 QFunctionPointer m_eglCreateImageKHR =
nullptr;
151 QFunctionPointer m_eglDestroyImageKHR =
nullptr;
152 QFunctionPointer m_glEGLImageTargetTexture2DOES =
nullptr;