feat: add vaapi path for video wallpapers on generic gpus
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 11s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Failing after 32s
Rust / build (pull_request) Successful in 52s
Python / verify (pull_request) Failing after 1m23s
Rust / fmt (pull_request) Successful in 51s
Rust / clippy (pull_request) Successful in 1m2s
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 11s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Failing after 32s
Rust / build (pull_request) Successful in 52s
Python / verify (pull_request) Failing after 1m23s
Rust / fmt (pull_request) Successful in 51s
Rust / clippy (pull_request) Successful in 1m2s
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <wayland-egl.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
|
||||
#include <qwayland-fractional-scale-v1.h>
|
||||
#include <qwayland-viewporter.h>
|
||||
#include <qwayland-wlr-layer-shell-unstable-v1.h>
|
||||
#include <wayland-client-protocol.h>
|
||||
|
||||
namespace ZShell::internal {
|
||||
|
||||
class WallpaperService;
|
||||
|
||||
class WallpaperSurface : public QtWayland::zwlr_layer_surface_v1,
|
||||
public QtWayland::wp_viewport,
|
||||
public QtWayland::wp_fractional_scale_v1 {
|
||||
public:
|
||||
WallpaperSurface(
|
||||
WallpaperService* service,
|
||||
wl_surface* surface,
|
||||
wl_output* output,
|
||||
const QString& screen);
|
||||
~WallpaperSurface() override;
|
||||
|
||||
[[nodiscard]] const QString& screen() const { return m_screen; }
|
||||
|
||||
[[nodiscard]] const QSize& size() const { return m_size; }
|
||||
[[nodiscard]] const QSize& bufferSize() const { return m_bufferSize; }
|
||||
[[nodiscard]] EGLSurface eglSurface() const { return m_eglSurface; }
|
||||
|
||||
void markDirty();
|
||||
[[nodiscard]] bool needsDraw() const;
|
||||
|
||||
[[nodiscard]] bool frameReady() const;
|
||||
|
||||
void requestFrame();
|
||||
|
||||
void endDraw();
|
||||
|
||||
private:
|
||||
void zwlr_layer_surface_v1_configure(
|
||||
uint32_t serial, uint32_t width, uint32_t height) override;
|
||||
void zwlr_layer_surface_v1_closed() override;
|
||||
void wp_fractional_scale_v1_preferred_scale(uint32_t scale) override;
|
||||
|
||||
void updateBuffer();
|
||||
|
||||
void onFrameDone();
|
||||
|
||||
WallpaperService* m_service;
|
||||
QString m_screen;
|
||||
wl_surface* m_surface;
|
||||
wl_egl_window* m_window = nullptr;
|
||||
EGLSurface m_eglSurface = EGL_NO_SURFACE;
|
||||
|
||||
QSize m_size;
|
||||
QSize m_bufferSize;
|
||||
qreal m_scale = 1.0;
|
||||
|
||||
bool configured = false;
|
||||
|
||||
std::atomic<bool> m_dirty{false};
|
||||
std::atomic<bool> m_frameReady{true};
|
||||
struct wl_callback* m_frameCallback = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ZShell::internal
|
||||
Reference in New Issue
Block a user