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