52 QSGDefaultPainterNode(QQuickPaintedItem *item);
53 virtual ~QSGDefaultPainterNode();
55 void setPreferredRenderTarget(QQuickPaintedItem::RenderTarget target) override;
57 void setSize(
const QSize &size) override;
58 QSize size()
const {
return m_size; }
60 void setDirty(
const QRect &dirtyRect = QRect()) override;
62 void setOpaquePainting(
bool opaque) override;
63 bool opaquePainting()
const {
return m_opaquePainting; }
65 void setLinearFiltering(
bool linearFiltering) override;
66 bool linearFiltering()
const {
return m_linear_filtering; }
68 void setMipmapping(
bool mipmapping) override;
69 bool mipmapping()
const {
return m_mipmapping; }
71 void setSmoothPainting(
bool s) override;
72 bool smoothPainting()
const {
return m_smoothPainting; }
74 void setFillColor(
const QColor &c) override;
75 QColor fillColor()
const {
return m_fillColor; }
77 void setContentsScale(qreal s) override;
78 qreal contentsScale()
const {
return m_contentsScale; }
80 void setFastFBOResizing(
bool fastResizing) override;
81 bool fastFBOResizing()
const {
return m_fastFBOResizing; }
83 void setTextureSize(
const QSize &textureSize) override;
84 QSize textureSize()
const {
return m_textureSize; }
86 QImage toImage()
const override;
87 void update() override;
91 QSGTexture *texture()
const override {
return m_texture; }
95 void updateGeometry();
96 void updateRenderTarget();
102 QSGDefaultRenderContext *m_context;
104 QQuickPaintedItem::RenderTarget m_preferredRenderTarget;
105 QQuickPaintedItem::RenderTarget m_actualRenderTarget;
107 QQuickPaintedItem *m_item;
111 QSGOpaqueTextureMaterial m_material;
112 QSGTextureMaterial m_materialO;
113 QSGGeometry m_geometry;
114 QSGPainterTexture *m_texture;
117 QOpenGLFramebufferObject *m_fbo;
118 QOpenGLFramebufferObject *m_multisampledFbo;
119 QOpenGLPaintDevice *m_gl_device;
120 QRhiTexture *m_wrapperTexture;
128 qreal m_contentsScale;
130 bool m_dirtyContents : 1;
131 bool m_opaquePainting : 1;
132 bool m_linear_filtering : 1;
133 bool m_mipmapping : 1;
134 bool m_smoothPainting : 1;
136 bool m_extensionsChecked : 1;
137 bool m_multisamplingSupported : 1;
139 bool m_fastFBOResizing : 1;
140 bool m_dirtyGeometry : 1;
141 bool m_dirtyRenderTarget : 1;
142 bool m_dirtyTexture : 1;