Qt 4.8
Public Functions | Properties | List of all members
QWaylandReadbackEglIntegration Class Reference

#include <qwaylandreadbackeglintegration.h>

Inheritance diagram for QWaylandReadbackEglIntegration:
QWaylandGLIntegration

Public Functions

QWaylandWindowcreateEglWindow (QWidget *widget)
 
int depth () const
 
EGLDisplay eglDisplay ()
 
void initialize ()
 
 QWaylandReadbackEglIntegration (QWaylandDisplay *display)
 
Window rootWindow () const
 
QWaylandDisplaywaylandDisplay () const
 
DisplayxDisplay () const
 
 ~QWaylandReadbackEglIntegration ()
 
- Public Functions inherited from QWaylandGLIntegration
 QWaylandGLIntegration ()
 
virtual ~QWaylandGLIntegration ()
 

Properties

DisplaymDisplay
 
EGLDisplay mEglDisplay
 
Window mRootWindow
 
int mScreen
 
QWaylandDisplaymWaylandDisplay
 

Additional Inherited Members

- Static Public Functions inherited from QWaylandGLIntegration
static QWaylandGLIntegrationcreateGLIntegration (QWaylandDisplay *waylandDisplay)
 

Detailed Description

Definition at line 57 of file qwaylandreadbackeglintegration.h.

Constructors and Destructors

◆ QWaylandReadbackEglIntegration()

QWaylandReadbackEglIntegration::QWaylandReadbackEglIntegration ( QWaylandDisplay display)

Definition at line 48 of file qwaylandreadbackeglintegration.cpp.

Referenced by QWaylandGLIntegration::createGLIntegration().

50  , mWaylandDisplay(display)
51 {
52  qDebug() << "Using Readback-EGL";
53  char *display_name = getenv("DISPLAY");
54  mDisplay = XOpenDisplay(display_name);
55  mScreen = XDefaultScreen(mDisplay);
56  mRootWindow = XDefaultRootWindow(mDisplay);
57  XSync(mDisplay, False);
58 }
Q_CORE_EXPORT void qDebug(const char *,...)

◆ ~QWaylandReadbackEglIntegration()

QWaylandReadbackEglIntegration::~QWaylandReadbackEglIntegration ( )

Definition at line 60 of file qwaylandreadbackeglintegration.cpp.

61 {
62  XCloseDisplay(mDisplay);
63 }

Functions

◆ createEglWindow()

QWaylandWindow * QWaylandReadbackEglIntegration::createEglWindow ( QWidget widget)
virtual

Implements QWaylandGLIntegration.

Definition at line 84 of file qwaylandreadbackeglintegration.cpp.

85 {
86  return new QWaylandReadbackEglWindow(widget,this);
87 }

◆ depth()

int QWaylandReadbackEglIntegration::depth ( ) const

◆ eglDisplay()

EGLDisplay QWaylandReadbackEglIntegration::eglDisplay ( )

◆ initialize()

void QWaylandReadbackEglIntegration::initialize ( )
virtual

Implements QWaylandGLIntegration.

Definition at line 71 of file qwaylandreadbackeglintegration.cpp.

72 {
73  eglBindAPI(EGL_OPENGL_ES_API);
74  mEglDisplay = eglGetDisplay(mDisplay);
75  EGLint major, minor;
76  EGLBoolean initialized = eglInitialize(mEglDisplay,&major,&minor);
77  if (initialized) {
78  qDebug() << "EGL initialized successfully" << major << "," << minor;
79  } else {
80  qDebug() << "EGL could not initialized. All EGL and GL operations will fail";
81  }
82 }
Q_CORE_EXPORT void qDebug(const char *,...)

◆ rootWindow()

Window QWaylandReadbackEglIntegration::rootWindow ( ) const

◆ waylandDisplay()

QWaylandDisplay * QWaylandReadbackEglIntegration::waylandDisplay ( ) const

Definition at line 109 of file qwaylandreadbackeglintegration.cpp.

Referenced by QWaylandReadbackEglContext::geometryChanged().

110 {
111  return mWaylandDisplay;
112 }

◆ xDisplay()

Display * QWaylandReadbackEglIntegration::xDisplay ( ) const

Properties

◆ mDisplay

Display* QWaylandReadbackEglIntegration::mDisplay
private

◆ mEglDisplay

EGLDisplay QWaylandReadbackEglIntegration::mEglDisplay
private

Definition at line 78 of file qwaylandreadbackeglintegration.h.

Referenced by eglDisplay(), and initialize().

◆ mRootWindow

Window QWaylandReadbackEglIntegration::mRootWindow
private

Definition at line 77 of file qwaylandreadbackeglintegration.h.

Referenced by QWaylandReadbackEglIntegration(), and rootWindow().

◆ mScreen

int QWaylandReadbackEglIntegration::mScreen
private

Definition at line 76 of file qwaylandreadbackeglintegration.h.

Referenced by depth(), and QWaylandReadbackEglIntegration().

◆ mWaylandDisplay

QWaylandDisplay* QWaylandReadbackEglIntegration::mWaylandDisplay
private

Definition at line 74 of file qwaylandreadbackeglintegration.h.

Referenced by waylandDisplay().


The documentation for this class was generated from the following files: