KWin
|
#include <compositor_x11.h>
Public Types | |
enum | SuspendReason { NoReasonSuspend = 0 , UserSuspend = 1 << 0 , BlockRuleSuspend = 1 << 1 , AllReasonSuspend = 0xff } |
enum class | OpenGLSafePoint { PreInit , PostInit , PreFrame , PostFrame , PostLastGuardedFrame } |
![]() | |
enum class | State { On = 0 , Off , Starting , Stopping } |
Public Member Functions | |
~X11Compositor () override | |
X11SyncManager * | syncManager () const |
void | toggle () |
void | suspend (SuspendReason reason) |
Suspends the Compositor if it is currently active. | |
void | resume (SuspendReason reason) |
Resumes the Compositor if it is currently suspended. | |
void | createOpenGLSafePoint (OpenGLSafePoint safePoint) |
void | inhibit (Window *window) override |
void | uninhibit (Window *window) override |
void | reinitialize () override |
bool | compositingPossible () const override |
QString | compositingNotPossibleReason () const override |
bool | openGLCompositingIsBroken () const override |
![]() | |
~Compositor () override | |
bool | isActive () |
WorkspaceScene * | scene () const |
CursorScene * | cursorScene () const |
RenderBackend * | backend () const |
void | keepSupportProperty (xcb_atom_t atom) |
void | removeSupportProperty (xcb_atom_t atom) |
Static Public Member Functions | |
static X11Compositor * | create (QObject *parent=nullptr) |
static X11Compositor * | self () |
![]() | |
static Compositor * | self () |
static bool | compositing () |
Static check to test whether the Compositor is available and active. | |
Protected Member Functions | |
void | start () override |
void | stop () override |
void | composite (RenderLoop *renderLoop) override |
![]() | |
Compositor (QObject *parent=nullptr) | |
void | deleteUnusedSupportProperties () |
Output * | findOutput (RenderLoop *loop) const |
void | addSuperLayer (RenderLayer *layer) |
void | removeSuperLayer (RenderLayer *layer) |
void | prePaintPass (RenderLayer *layer, QRegion *damage) |
void | postPaintPass (RenderLayer *layer) |
void | paintPass (RenderLayer *layer, const RenderTarget &renderTarget, const QRegion ®ion) |
void | framePass (RenderLayer *layer, OutputFrame *frame) |
Additional Inherited Members | |
![]() | |
void | compositingToggled (bool active) |
void | aboutToDestroy () |
void | aboutToToggleCompositing () |
void | sceneCreated () |
![]() | |
![]() | |
State | m_state = State::Off |
QList< xcb_atom_t > | m_unusedSupportProperties |
QTimer | m_unusedSupportPropertyTimer |
std::unique_ptr< WorkspaceScene > | m_scene |
std::unique_ptr< CursorScene > | m_cursorScene |
std::unique_ptr< RenderBackend > | m_backend |
QHash< RenderLoop *, RenderLayer * > | m_superlayers |
![]() | |
static Compositor * | s_compositor = nullptr |
Definition at line 23 of file compositor_x11.h.
|
strong |
Enumerator | |
---|---|
PreInit | |
PostInit | |
PreFrame | |
PostFrame | |
PostLastGuardedFrame |
Definition at line 80 of file compositor_x11.h.
Enumerator | |
---|---|
NoReasonSuspend | |
UserSuspend | |
BlockRuleSuspend | |
AllReasonSuspend |
Definition at line 27 of file compositor_x11.h.
|
override |
Definition at line 104 of file compositor_x11.cpp.
|
overrideprotectedvirtual |
Reimplemented from KWin::Compositor.
Definition at line 405 of file compositor_x11.cpp.
|
overridevirtual |
Returns a user facing text explaining why compositing is not possible in case compositingPossible returns false
.
The default implementation returns an empty string.
Reimplemented from KWin::Compositor.
Definition at line 508 of file compositor_x11.cpp.
|
overridevirtual |
Whether Compositing is possible in the Platform. Returning false
in this method makes only sense if requiresCompositing returns false
.
The default implementation returns true
.
Reimplemented from KWin::Compositor.
Definition at line 528 of file compositor_x11.cpp.
|
static |
Definition at line 67 of file compositor_x11.cpp.
void KWin::X11Compositor::createOpenGLSafePoint | ( | OpenGLSafePoint | safePoint | ) |
This method is invoked before and after creating the OpenGL rendering Scene. An implementing Platform can use it to detect crashes triggered by the OpenGL implementation. This can be used for openGLCompositingIsBroken.
The default implementation does nothing.
Definition at line 557 of file compositor_x11.cpp.
|
overridevirtual |
Reimplemented from KWin::Compositor.
Definition at line 461 of file compositor_x11.cpp.
|
overridevirtual |
Whether OpenGL compositing is broken. The Platform can implement this method if it is able to detect whether OpenGL compositing broke (e.g. triggered a crash in a previous run).
Default implementation returns false
.
Reimplemented from KWin::Compositor.
Definition at line 496 of file compositor_x11.cpp.
|
overridevirtual |
Re-initializes the Compositor completely. Connected to the D-Bus signal org.kde.KWin /KWin reinitCompositing
Reimplemented from KWin::Compositor.
Definition at line 131 of file compositor_x11.cpp.
void KWin::X11Compositor::resume | ( | X11Compositor::SuspendReason | reason | ) |
Resumes the Compositor if it is currently suspended.
Note: it is possible that the Compositor cannot be resumed, that is there might be Clients blocking the usage of Compositing or the Scene might be broken. Use isActive to check whether the Compositor has been resumed. Also check isCompositingPossible and isOpenGLBroken.
Note: The starting of the Compositor can require some time and is partially done threaded. After this method returns the setup may not have been completed.
Definition at line 146 of file compositor_x11.cpp.
|
static |
Definition at line 491 of file compositor_x11.cpp.
|
overrideprotectedvirtual |
Implements KWin::Compositor.
Definition at line 240 of file compositor_x11.cpp.
|
overrideprotectedvirtual |
Implements KWin::Compositor.
Definition at line 359 of file compositor_x11.cpp.
void KWin::X11Compositor::suspend | ( | X11Compositor::SuspendReason | reason | ) |
Suspends the Compositor if it is currently active.
Note: it is possible that the Compositor is not able to suspend. Use isActive to check whether the Compositor has been suspended.
Definition at line 139 of file compositor_x11.cpp.
X11SyncManager * KWin::X11Compositor::syncManager | ( | ) | const |
Definition at line 115 of file compositor_x11.cpp.
void KWin::X11Compositor::toggle | ( | ) |
Toggles compositing, that is if the Compositor is suspended it will be resumed and if the Compositor is active it will be suspended. Invoked by keybinding (shortcut default: Shift + Alt + F12).
Definition at line 120 of file compositor_x11.cpp.
|
overridevirtual |
Reimplemented from KWin::Compositor.
Definition at line 474 of file compositor_x11.cpp.