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
qsgopenvglayer.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QSGOPENVGLAYER_H
5#define QSGOPENVGLAYER_H
6
7#include <private/qsgadaptationlayer_p.h>
8#include <private/qsgcontext_p.h>
9#include <private/qsgtexture_p.h>
10
11#include "qopenvgcontext_p.h"
13
15
18class QSGOpenVGLayerPrivate;
19
21{
22 Q_DECLARE_PRIVATE(QSGOpenVGLayer)
23public:
24 QSGOpenVGLayer(QSGRenderContext *renderContext);
26
27 // QSGTexture interface
28public:
29 QSize textureSize() const override;
30 bool hasAlphaChannel() const override;
31 bool hasMipmaps() const override;
32 qint64 comparisonKey() const override;
33
34 // QSGDynamicTexture interface
35public:
36 bool updateTexture() override;
37
38 // QSGLayer interface
39public:
40 void setItem(QSGNode *item) override;
41 void setRect(const QRectF &rect) override;
42 void setSize(const QSize &size) override;
43 void scheduleUpdate() override;
44 QImage toImage() const override;
45 void setLive(bool live) override;
46 void setRecursive(bool recursive) override;
47 void setFormat(uint format) override;
48 void setHasMipmaps(bool mipmap) override;
49 void setDevicePixelRatio(qreal ratio) override;
50 void setMirrorHorizontal(bool mirror) override;
51 void setMirrorVertical(bool mirror) override;
52 void setSamples(int) override { }
53
54public Q_SLOTS:
55 void markDirtyTexture() override;
56 void invalidated() override;
57
58private:
59 void grab();
60
61 QSGNode *m_item;
62 QSGOpenVGRenderContext *m_context;
63 QSGOpenVGRenderer *m_renderer;
64 QRectF m_rect;
65 QSize m_size;
66 qreal m_device_pixel_ratio;
67 bool m_mirrorHorizontal;
68 bool m_mirrorVertical;
69 bool m_live;
70 bool m_grab;
71 bool m_recursive;
72 bool m_dirtyTexture;
73
74 QOpenVGOffscreenSurface *m_offscreenSurface;
75 QOpenVGOffscreenSurface *m_secondaryOffscreenSurface;
76};
77
79
80#endif // QSGOPENVGLAYER_H
\inmodule QtGui
Definition qimage.h:37
\inmodule QtCore\reentrant
Definition qrect.h:484
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
void setDevicePixelRatio(qreal ratio) override
void setLive(bool live) override
bool hasMipmaps() const override
Returns true if the texture data contains mipmap levels.
void markDirtyTexture() override
QImage toImage() const override
void setMirrorVertical(bool mirror) override
bool updateTexture() override
Call this function to explicitly update the dynamic texture.
void invalidated() override
QSGOpenVGLayer(QSGRenderContext *renderContext)
void setRecursive(bool recursive) override
void setFormat(uint format) override
void setRect(const QRectF &rect) override
QSize textureSize() const override
Returns the size of the texture in pixels.
void scheduleUpdate() override
void setMirrorHorizontal(bool mirror) override
void setItem(QSGNode *item) override
bool hasAlphaChannel() const override
Returns true if the texture data contains an alpha channel.
void setHasMipmaps(bool mipmap) override
qint64 comparisonKey() const override
Returns a key suitable for comparing textures.
void setSize(const QSize &size) override
void setSamples(int) override
\inmodule QtCore
Definition qsize.h:25
rect
[4]
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
#define Q_SLOTS
unsigned int uint
Definition qtypes.h:34
long long qint64
Definition qtypes.h:60
double qreal
Definition qtypes.h:187
QGraphicsItem * item