Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/opengl/scene_opengl.h
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Line(s) | 138 | private: | |||
---|---|---|---|---|---|
140 | QScopedPointer<GLTexture> m_cursorTexture; | 140 | QScopedPointer<GLTexture> m_cursorTexture; | ||
141 | QMatrix4x4 m_projectionMatrix; | 141 | QMatrix4x4 m_projectionMatrix; | ||
142 | QMatrix4x4 m_screenProjectionMatrix; | 142 | QMatrix4x4 m_screenProjectionMatrix; | ||
143 | GLuint vao; | 143 | GLuint vao; | ||
144 | }; | 144 | }; | ||
145 | 145 | | |||
146 | class OpenGLWindowPixmap; | 146 | class OpenGLWindowPixmap; | ||
147 | 147 | | |||
148 | class OpenGLWindow final : public Scene::Window | 148 | class OpenGLWindow final : public QObject, public Scene::Window | ||
149 | { | 149 | { | ||
150 | Q_OBJECT | ||||
150 | public: | 151 | public: | ||
151 | enum Leaf { ShadowLeaf, DecorationLeaf, ContentLeaf, PreviousContentLeaf }; | 152 | enum Leaf { ShadowLeaf, DecorationLeaf, ContentLeaf, PreviousContentLeaf }; | ||
152 | 153 | | |||
153 | struct RenderNode | 154 | struct RenderNode | ||
154 | { | 155 | { | ||
155 | RenderNode() | 156 | RenderNode() | ||
156 | : texture(nullptr) | 157 | : texture(nullptr) | ||
157 | , firstVertex(0) | 158 | , firstVertex(0) | ||
Show All 25 Lines | |||||
183 | }; | 184 | }; | ||
184 | 185 | | |||
185 | OpenGLWindow(Toplevel *toplevel, SceneOpenGL *scene); | 186 | OpenGLWindow(Toplevel *toplevel, SceneOpenGL *scene); | ||
186 | ~OpenGLWindow() override; | 187 | ~OpenGLWindow() override; | ||
187 | 188 | | |||
188 | WindowPixmap *createWindowPixmap() override; | 189 | WindowPixmap *createWindowPixmap() override; | ||
189 | void performPaint(int mask, const QRegion ®ion, const WindowPaintData &data) override; | 190 | void performPaint(int mask, const QRegion ®ion, const WindowPaintData &data) override; | ||
190 | 191 | | |||
192 | void startStreaming(KWaylandServer::ScreencastStreamInterface * stream) override; | ||||
193 | | ||||
194 | Q_SIGNALS: | ||||
195 | void painted(); | ||||
196 | | ||||
191 | private: | 197 | private: | ||
192 | QMatrix4x4 transformation(int mask, const WindowPaintData &data) const; | 198 | QMatrix4x4 transformation(int mask, const WindowPaintData &data) const; | ||
193 | GLTexture *getDecorationTexture() const; | 199 | GLTexture *getDecorationTexture() const; | ||
194 | QMatrix4x4 modelViewProjectionMatrix(int mask, const WindowPaintData &data) const; | 200 | QMatrix4x4 modelViewProjectionMatrix(int mask, const WindowPaintData &data) const; | ||
195 | QVector4D modulate(float opacity, float brightness) const; | 201 | QVector4D modulate(float opacity, float brightness) const; | ||
196 | void setBlendEnabled(bool enabled); | 202 | void setBlendEnabled(bool enabled); | ||
197 | void initializeRenderContext(RenderContext &context, const WindowPaintData &data); | 203 | void initializeRenderContext(RenderContext &context, const WindowPaintData &data); | ||
198 | bool beginRenderWindow(int mask, const QRegion ®ion, WindowPaintData &data); | 204 | bool beginRenderWindow(int mask, const QRegion ®ion, WindowPaintData &data); | ||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |