45 #include <private/qt_x11_p.h> 46 #include <private/qimagepixmapcleanuphooks_p.h> 54 :
QWindowSurface(window), m_windowGC(0), m_pixmapGC(0), m_window(window)
80 qDebug(
"QX11GLWindowSurface::flush() - backBuffer is null, not flushing anything");
98 attribs.graphics_exposures = False;
103 XRectangle *rects = (XRectangle *)
qt_getClipRects(widgetRegion, rectCount);
107 XSetClipRectangles(
X11->display,
m_windowGC, 0, 0, rects, rectCount, YXBanded);
111 dirtyRect.
x(), dirtyRect.
y(), dirtyRect.
width(), dirtyRect.
height(),
112 dirtyRect.
x(), dirtyRect.
y());
117 eglWaitNative(EGL_CORE_NATIVE_ENGINE);
157 rect.
x()+dx, rect.
y()+dy);
161 eglWaitNative(EGL_CORE_NATIVE_ENGINE);
176 srcRect = rect & widget->
rect();
178 srcRect = widget->
rect();
202 XSetGraphicsExposures(
X11->display, tmpGc, False);
204 srcRect.
x(), srcRect.
y(), srcRect.
width(), srcRect.
height(), 0, 0);
205 XFreeGC(
X11->display, tmpGc);
208 eglWaitNative(EGL_CORE_NATIVE_ENGINE);
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
QX11GLWindowSurface(QWidget *window)
QSize size() const
Returns the size of the pixmap.
QRect rect(const QWidget *widget) const
Returns the rectangle for widget in the coordinates of this window surface.
void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset)
Flushes the given region from the specified widget onto the screen.
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
virtual void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
int width() const
Returns the width of the rectangle.
virtual QPoint offset(const QWidget *widget) const
Returns the offset of widget in the coordinates of this window surface.
Qt::HANDLE handle() const
Returns the pixmap's handle to the device context.
QRect boundingRect() const
Returns the bounding rectangle of this region.
void resize(int width, int height)
int height() const
Returns the height of the rectangle.
virtual ~QX11GLWindowSurface()
void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
static const QGLContext * currentContext()
Returns the current context, i.e.
Q_CORE_EXPORT void qDebug(const char *,...)
int width() const
Returns the width.
T * data() const
Returns a pointer to the shared data object.
void * qt_getClipRects(const QRegion &r, int &num)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QGLContext class encapsulates an OpenGL rendering context.
QSize size() const
Returns the size of the rectangle.
The QRegion class specifies a clip region for a painter.
bool scroll(const QRegion &area, int dx, int dy)
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative...
The QWindowSurface class provides the drawing area for top-level windows.
void fill(const QColor &fillColor=Qt::white)
Fills the pixmap with the given color.
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
bool isValid() const
Returns true if a GL rendering context has been successfully created; otherwise returns false...
int y() const
Returns the y-coordinate of the rectangle's top edge.
int x() const
Returns the x-coordinate of the rectangle's left edge.
The QPoint class defines a point in the plane using integer precision.
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
int height() const
Returns the height.
The QRect class defines a rectangle in the plane using integer precision.
QPaintDevice * paintDevice()
Implement this function to return the appropriate paint device.
The QPixmap class is an off-screen image representation that can be used as a paint device...
QPixmap grabWidget(const QWidget *widget, const QRect &rectangle=QRect()) const
Returns a QPixmap generated from the part of the backing store corresponding to widget.
The QSize class defines the size of a two-dimensional object using integer point precision.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
void translate(int dx, int dy)
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QWidget * window() const
Returns a pointer to the top-level window associated with this surface.
int screen() const
Returns the number of the screen currently in use.
static int area(const QSize &s)
QPixmapData * pixmapData() const