KWin
|
The OpenGLBackend creates and holds the OpenGL context and is responsible for Texture from Pixmap. More...
#include <openglbackend.h>
Public Member Functions | |
OpenGLBackend () | |
virtual | ~OpenGLBackend () |
virtual void | init ()=0 |
CompositingType | compositingType () const override final |
bool | checkGraphicsReset () override final |
virtual bool | makeCurrent ()=0 |
virtual void | doneCurrent ()=0 |
bool | isFailed () const |
Whether the creation of the Backend failed. | |
bool | supportsBufferAge () const |
bool | supportsNativeFence () const |
QList< QByteArray > | extensions () const |
bool | hasExtension (const QByteArray &extension) const |
void | copyPixels (const QRegion ®ion, const QSize &screenSize) |
virtual std::pair< std::shared_ptr< GLTexture >, ColorDescription > | textureForOutput (Output *output) const |
![]() | |
RenderBackend (QObject *parent=nullptr) | |
virtual OverlayWindow * | overlayWindow () const |
virtual OutputLayer * | primaryLayer (Output *output)=0 |
virtual OutputLayer * | cursorLayer (Output *output) |
virtual void | present (Output *output, const std::shared_ptr< OutputFrame > &frame)=0 |
virtual GraphicsBufferAllocator * | graphicsBufferAllocator () const |
virtual bool | testImportBuffer (GraphicsBuffer *buffer) |
virtual QHash< uint32_t, QList< uint64_t > > | supportedFormats () const |
virtual std::unique_ptr< SurfaceTexture > | createSurfaceTextureX11 (SurfacePixmapX11 *pixmap) |
virtual std::unique_ptr< SurfaceTexture > | createSurfaceTextureWayland (SurfacePixmap *pixmap) |
Protected Member Functions | |
void | setFailed (const QString &reason) |
Sets the backend initialization to failed. | |
void | setSupportsBufferAge (bool value) |
void | setSupportsNativeFence (bool value) |
void | setExtensions (const QList< QByteArray > &extensions) |
The OpenGLBackend creates and holds the OpenGL context and is responsible for Texture from Pixmap.
The OpenGLBackend is an abstract base class used by the SceneOpenGL to abstract away the differences between various OpenGL windowing systems such as GLX and EGL.
A concrete implementation has to create and release the OpenGL context in a way so that the SceneOpenGL does not have to care about it.
In addition a major task for this class is to generate the SceneOpenGLTexturePrivate which is able to perform the texture from pixmap operation in the given backend.
Definition at line 37 of file openglbackend.h.
KWin::OpenGLBackend::OpenGLBackend | ( | ) |
Definition at line 22 of file openglbackend.cpp.
|
virtual |
Definition at line 28 of file openglbackend.cpp.
|
finaloverridevirtual |
Reimplemented from KWin::RenderBackend.
Definition at line 61 of file openglbackend.cpp.
|
finaloverridevirtual |
Implements KWin::RenderBackend.
Definition at line 32 of file openglbackend.cpp.
void KWin::OpenGLBackend::copyPixels | ( | const QRegion & | region, |
const QSize & | screenSize ) |
Copy a region of pixels from the current read to the current draw buffer
Definition at line 43 of file openglbackend.cpp.
|
pure virtual |
Implemented in KWin::GlxBackend, and KWin::AbstractEglBackend.
|
inline |
The backend specific extensions (e.g. EGL/GLX extensions).
Not the OpenGL (ES) extension!
Definition at line 80 of file openglbackend.h.
|
inline |
extension
. Definition at line 88 of file openglbackend.h.
|
pure virtual |
|
inline |
Whether the creation of the Backend failed.
The SceneOpenGL should test whether the Backend got constructed correctly. If this method returns true
, the SceneOpenGL should not try to start the rendering.
true
if the creation of the Backend failed, false
otherwise. Definition at line 60 of file openglbackend.h.
|
pure virtual |
Implemented in KWin::GlxBackend, and KWin::AbstractEglBackend.
|
inlineprotected |
Sets the platform-specific extensions
.
These are the EGL/GLX extensions, not the OpenGL extensions
Definition at line 126 of file openglbackend.h.
|
protected |
Sets the backend initialization to failed.
This method should be called by the concrete subclass in case the initialization failed. The given reason
is logged as a warning.
reason | The reason why the initialization failed. |
Definition at line 37 of file openglbackend.cpp.
|
inlineprotected |
Definition at line 111 of file openglbackend.h.
|
inlineprotected |
Definition at line 116 of file openglbackend.h.
|
inline |
Definition at line 65 of file openglbackend.h.
|
inline |
Definition at line 70 of file openglbackend.h.
|
virtual |
Reimplemented in KWin::Wayland::WaylandEglBackend, KWin::VirtualEglBackend, KWin::X11WindowedEglBackend, and KWin::EglGbmBackend.
Definition at line 56 of file openglbackend.cpp.