4#ifndef QIOSURFACEGRAPHICSBUFFER_H
5#define QIOSURFACEGRAPHICSBUFFER_H
7#include <qpa/qplatformgraphicsbuffer.h>
8#include <private/qcore_mac_p.h>
10#include <CoreGraphics/CGColorSpace.h>
11#include <IOSurface/IOSurface.h>
15class QIOSurfaceGraphicsBuffer :
public QPlatformGraphicsBuffer
18 QIOSurfaceGraphicsBuffer(
const QSize &size,
const QPixelFormat &format);
19 ~QIOSurfaceGraphicsBuffer();
21 void setColorSpace(QCFType<CGColorSpaceRef> colorSpace);
23 const uchar *data()
const override;
24 uchar *data() override;
25 int bytesPerLine()
const override;
27 IOSurfaceRef surface();
31 bool doLock(AccessTypes access,
const QRect &rect) override;
32 void doUnlock() override;
35 QCFType<IOSurfaceRef> m_surface;
37 friend QDebug operator<<(QDebug,
const QIOSurfaceGraphicsBuffer *);
40#ifndef QT_NO_DEBUG_STREAM
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
bool scroll(const QRegion ®ion, int dx, int dy) override
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
void endPaint() override
This function is called after painting onto the surface has ended.
void flush(QWindow *, const QRegion &, const QPoint &) override
Flushes the given region from the specified window.
void beginPaint(const QRegion ®ion) override
This function is called before painting onto the surface begins, with the region in which the paintin...
QPlatformGraphicsBuffer * graphicsBuffer() const override
Accessor for a backingstores graphics buffer abstraction.
bool eventFilter(QObject *watched, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
FlushResult rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground) override
Flushes the given region from the specified window, and compositing it with the specified textures li...
void resize(const QSize &size, const QRegion &staticContents) override
Combined button and popup list for selecting options.
#define USE_LAZY_BUFFER_ALLOCATION_DURING_LIVE_WINDOW_RESIZE
QDebug operator<<(QDebug debug, const QIOSurfaceGraphicsBuffer *graphicsBuffer)