Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/egl_gbm_backend.h
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 64 | struct Output { | |||
---|---|---|---|---|---|
66 | DrmBuffer *buffer = nullptr; | 66 | DrmBuffer *buffer = nullptr; | ||
67 | std::shared_ptr<GbmSurface> gbmSurface; | 67 | std::shared_ptr<GbmSurface> gbmSurface; | ||
68 | EGLSurface eglSurface = EGL_NO_SURFACE; | 68 | EGLSurface eglSurface = EGL_NO_SURFACE; | ||
69 | int bufferAge = 0; | 69 | int bufferAge = 0; | ||
70 | /** | 70 | /** | ||
71 | * @brief The damage history for the past 10 frames. | 71 | * @brief The damage history for the past 10 frames. | ||
72 | */ | 72 | */ | ||
73 | QList<QRegion> damageHistory; | 73 | QList<QRegion> damageHistory; | ||
74 | | ||||
75 | struct { | ||||
76 | GLuint framebuffer = 0; | ||||
77 | GLuint texture = 0; | ||||
78 | std::shared_ptr<GLVertexBuffer> vbo; | ||||
79 | std::shared_ptr<GLShader> shader; | ||||
80 | } render; | ||||
romangg: Remove empty line | |||||
74 | }; | 81 | }; | ||
75 | 82 | | |||
76 | void createOutput(DrmOutput *drmOutput); | 83 | void createOutput(DrmOutput *drmOutput); | ||
77 | bool resetOutput(Output &output, DrmOutput *drmOutput); | 84 | bool resetOutput(Output &output, DrmOutput *drmOutput); | ||
78 | std::shared_ptr<GbmSurface> createGbmSurface(const QSize &size) const; | 85 | std::shared_ptr<GbmSurface> createGbmSurface(const QSize &size) const; | ||
79 | EGLSurface createEglSurface(std::shared_ptr<GbmSurface> gbmSurface) const; | 86 | EGLSurface createEglSurface(std::shared_ptr<GbmSurface> gbmSurface) const; | ||
80 | 87 | | |||
81 | bool makeContextCurrent(const Output &output) const; | 88 | bool makeContextCurrent(const Output &output) const; | ||
82 | void setViewport(const Output &output) const; | 89 | void setViewport(const Output &output) const; | ||
90 | | ||||
91 | bool resetFramebuffer(Output &output); | ||||
92 | bool initRenderTarget(Output &output); | ||||
93 | | ||||
94 | void prepareRenderFramebuffer(const Output &output) const; | ||||
95 | void renderFramebufferToSurface(Output &output); | ||||
96 | | ||||
83 | void presentOnOutput(Output &output); | 97 | void presentOnOutput(Output &output); | ||
84 | 98 | | |||
85 | void removeOutput(DrmOutput *drmOutput); | 99 | void removeOutput(DrmOutput *drmOutput); | ||
86 | void cleanupOutput(const Output &output); | 100 | void cleanupOutput(Output &output); | ||
101 | void cleanupFramebuffer(Output &output); | ||||
87 | 102 | | |||
88 | DrmBackend *m_backend; | 103 | DrmBackend *m_backend; | ||
89 | QVector<Output> m_outputs; | 104 | QVector<Output> m_outputs; | ||
90 | QScopedPointer<RemoteAccessManager> m_remoteaccessManager; | 105 | QScopedPointer<RemoteAccessManager> m_remoteaccessManager; | ||
91 | friend class EglGbmTexture; | 106 | friend class EglGbmTexture; | ||
92 | }; | 107 | }; | ||
93 | 108 | | |||
94 | /** | 109 | /** | ||
Show All 15 Lines |
Remove empty line