5#ifndef QIOSURFACEGRAPHICSBUFFER_H
6#define QIOSURFACEGRAPHICSBUFFER_H
8#include <qpa/qplatformgraphicsbuffer.h>
9#include <private/qcore_mac_p.h>
11#include <CoreGraphics/CGColorSpace.h>
12#include <IOSurface/IOSurface.h>
16class QIOSurfaceGraphicsBuffer :
public QPlatformGraphicsBuffer
19 QIOSurfaceGraphicsBuffer(
const QSize &size,
const QPixelFormat &format);
20 ~QIOSurfaceGraphicsBuffer();
22 void setColorSpace(QCFType<CGColorSpaceRef> colorSpace);
24 const uchar *data()
const override;
25 uchar *data() override;
26 int bytesPerLine()
const override;
28 IOSurfaceRef surface();
32 bool doLock(AccessTypes access,
const QRect &rect) override;
33 void doUnlock() override;
36 QCFType<IOSurfaceRef> m_surface;
38 friend QDebug operator<<(QDebug,
const QIOSurfaceGraphicsBuffer *);
41#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...
FlushResult rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground, qreal sourceTransformFactor) override
Flushes the given region from the specified window, and compositing it with the specified textures li...
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.
void resize(const QSize &size, const QRegion &staticContents) override
#define USE_LAZY_BUFFER_ALLOCATION_DURING_LIVE_WINDOW_RESIZE
QDebug operator<<(QDebug debug, const QIOSurfaceGraphicsBuffer *graphicsBuffer)
QT_BEGIN_NAMESPACE void qt_scrollRectInImage(QImage &, const QRect &, const QPoint &)