33 QSGRhiLayer(QSGRenderContext *context);
36 bool updateTexture() override;
38 bool hasAlphaChannel()
const override;
39 bool hasMipmaps()
const override;
40 QSize textureSize()
const override {
return m_pixelSize; }
42 qint64 comparisonKey()
const override;
43 QRhiTexture *rhiTexture()
const override;
44 void commitTextureOperations(QRhi *rhi, QRhiResourceUpdateBatch *resourceUpdates) override;
46 void setItem(QSGNode *item) override;
47 void setRect(
const QRectF &logicalRect) override;
48 void setSize(
const QSize &pixelSize) override;
49 void setHasMipmaps(
bool mipmap) override;
50 void setFormat(Format format) override;
51 void setLive(
bool live) override;
52 void setRecursive(
bool recursive) override;
53 void setDevicePixelRatio(qreal ratio) override { m_dpr = ratio; }
54 void setMirrorHorizontal(
bool mirror) override;
55 void setMirrorVertical(
bool mirror) override;
56 QRectF normalizedTextureSubRect()
const override;
57 void setSamples(
int samples) override { m_samples = samples; }
59 void scheduleUpdate() override;
60 QImage toImage()
const override;
63 void markDirtyTexture() override;
64 void invalidated() override;
68 void releaseResources();
69 void clearMainTexture();
71 QSGNode *m_item =
nullptr;
75 QRhiTexture::Format m_format = QRhiTexture::RGBA8;
77 QSGRenderer *m_renderer =
nullptr;
78 QRhiTexture *m_texture =
nullptr;
79 QRhiTexture *m_prevTexture =
nullptr;
80 QSharedPointer<QSGDepthStencilBuffer> m_ds;
81 QRhiRenderBuffer *m_msaaColorBuffer =
nullptr;
82 QRhiTexture *m_secondaryTexture =
nullptr;
83 QRhiTextureRenderTarget *m_rt =
nullptr;
84 QRhiRenderPassDescriptor *m_rtRp =
nullptr;
86 QSGDefaultRenderContext *m_context =
nullptr;
87 QRhi *m_rhi =
nullptr;
93 uint m_dirtyTexture : 1;
94 uint m_multisampling : 1;
96 uint m_mirrorHorizontal : 1;
97 uint m_mirrorVertical : 1;