Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qiosurfacegraphicsbuffer.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QIOSURFACEGRAPHICSBUFFER_H
5#define QIOSURFACEGRAPHICSBUFFER_H
6
7#include <qpa/qplatformgraphicsbuffer.h>
8#include <private/qcore_mac_p.h>
9
10#include <CoreGraphics/CGColorSpace.h>
11#include <IOSurface/IOSurface.h>
12
14
16{
17public:
20
21 void setColorSpace(QCFType<CGColorSpaceRef> colorSpace);
22
23 const uchar *data() const override;
24 uchar *data() override;
25 int bytesPerLine() const override;
26
27 IOSurfaceRef surface();
28 bool isInUse() const;
29
30protected:
31 bool doLock(AccessTypes access, const QRect &rect) override;
32 void doUnlock() override;
33
34private:
35 QCFType<IOSurfaceRef> m_surface;
36
38};
39
40#ifndef QT_NO_DEBUG_STREAM
42#endif
43
45
46#endif // QIOSURFACEGRAPHICSBUFFER_H
\inmodule QtCore
void setColorSpace(QCFType< CGColorSpaceRef > colorSpace)
QIOSurfaceGraphicsBuffer(const QSize &size, const QPixelFormat &format)
bool doLock(AccessTypes access, const QRect &rect) override
This function should be reimplemented by subclasses.
int bytesPerLine() const override
Accessor for bytes per line in the graphics buffer.
const uchar * data() const override
Accessor for the bytes of the buffer.
void doUnlock() override
This function should remove all locks set on the buffer.
friend QDebug operator<<(QDebug, const QIOSurfaceGraphicsBuffer *)
\inmodule QtGui
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
rect
[4]
Combined button and popup list for selecting options.
QDebug operator<<(QDebug, const QIOSurfaceGraphicsBuffer *)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum access
GLint GLsizei GLsizei GLenum format
unsigned char uchar
Definition qtypes.h:32