diff options
Diffstat (limited to 'src/core/delegated_frame_node.cpp')
-rw-r--r-- | src/core/delegated_frame_node.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index 31b64a277..9a64d2bb8 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -124,13 +124,14 @@ class MailboxTexture : public QSGTexture, protected QOpenGLFunctions { public: MailboxTexture(const gpu::MailboxHolder &mailboxHolder, const QSize textureSize); ~MailboxTexture(); - virtual int textureId() const Q_DECL_OVERRIDE { return m_textureId; } - virtual QSize textureSize() const Q_DECL_OVERRIDE { return m_textureSize; } - virtual bool hasAlphaChannel() const Q_DECL_OVERRIDE { return m_hasAlpha; } - void setHasAlphaChannel(bool hasAlpha) { m_hasAlpha = hasAlpha; } - virtual bool hasMipmaps() const Q_DECL_OVERRIDE { return false; } - virtual void bind() Q_DECL_OVERRIDE; + // QSGTexture: + int textureId() const override { return m_textureId; } + QSize textureSize() const override { return m_textureSize; } + bool hasAlphaChannel() const override { return m_hasAlpha; } + bool hasMipmaps() const override { return false; } + void bind() override; + void setHasAlphaChannel(bool hasAlpha) { m_hasAlpha = hasAlpha; } gpu::MailboxHolder &mailboxHolder() { return m_mailboxHolder; } void fetchTexture(gpu::gles2::MailboxManager *mailboxManager); void setTarget(GLenum target); @@ -217,7 +218,7 @@ public: { } - void setupRenderPassNode(QSGTexture *layer, const QRect &rect, QSGNode *) Q_DECL_OVERRIDE + void setupRenderPassNode(QSGTexture *layer, const QRect &rect, QSGNode *) override { QSGInternalImageNode *imageNode = static_cast<QSGInternalImageNode*>(*m_nodeIterator++); // In case of a missing render pass, set the target rects to be empty and return early. @@ -236,7 +237,7 @@ public: void setupTextureContentNode(QSGTexture *texture, const QRect &rect, const QRectF &sourceRect, QSGTexture::Filtering filtering, QSGTextureNode::TextureCoordinatesTransformMode texCoordTransForm, - QSGNode *) Q_DECL_OVERRIDE + QSGNode *) override { QSGTextureNode *textureNode = static_cast<QSGTextureNode*>(*m_nodeIterator++); if (textureNode->texture() != texture) @@ -251,7 +252,7 @@ public: textureNode->setFiltering(filtering); } void setupTiledContentNode(QSGTexture *texture, const QRect &rect, const QRectF &sourceRect, - QSGTexture::Filtering filtering, QSGNode *) Q_DECL_OVERRIDE + QSGTexture::Filtering filtering, QSGNode *) override { QSGTextureNode *textureNode = static_cast<QSGTextureNode*>(*m_nodeIterator++); @@ -264,7 +265,7 @@ public: if (textureNode->texture() != texture) textureNode->setTexture(texture); } - void setupSolidColorNode(const QRect &rect, const QColor &color, QSGNode *) Q_DECL_OVERRIDE + void setupSolidColorNode(const QRect &rect, const QColor &color, QSGNode *) override { QSGRectangleNode *rectangleNode = static_cast<QSGRectangleNode*>(*m_nodeIterator++); @@ -275,7 +276,7 @@ public: } void setupDebugBorderNode(QSGGeometry *geometry, QSGFlatColorMaterial *material, - QSGNode *) Q_DECL_OVERRIDE + QSGNode *) override { QSGGeometryNode *geometryNode = static_cast<QSGGeometryNode*>(*m_nodeIterator++); @@ -286,13 +287,13 @@ public: void setupYUVVideoNode(QSGTexture *, QSGTexture *, QSGTexture *, QSGTexture *, const QRectF &, const QRectF &, const QSizeF &, const QSizeF &, YUVVideoMaterial::ColorSpace, float, float, const QRectF &, - QSGNode *) Q_DECL_OVERRIDE + QSGNode *) override { Q_UNREACHABLE(); } #ifdef GL_OES_EGL_image_external void setupStreamVideoNode(MailboxTexture *, const QRectF &, - const QMatrix4x4 &, QSGNode *) Q_DECL_OVERRIDE + const QMatrix4x4 &, QSGNode *) override { Q_UNREACHABLE(); } @@ -314,7 +315,7 @@ public: } void setupRenderPassNode(QSGTexture *layer, const QRect &rect, - QSGNode *layerChain) Q_DECL_OVERRIDE + QSGNode *layerChain) override { // Only QSGInternalImageNode currently supports QSGLayer textures. QSGInternalImageNode *imageNode = m_apiDelegate->createImageNode(); @@ -338,7 +339,7 @@ public: void setupTextureContentNode(QSGTexture *texture, const QRect &rect, const QRectF &sourceRect, QSGTexture::Filtering filtering, QSGTextureNode::TextureCoordinatesTransformMode texCoordTransForm, - QSGNode *layerChain) Q_DECL_OVERRIDE + QSGNode *layerChain) override { QSGTextureNode *textureNode = m_apiDelegate->createTextureNode(); textureNode->setTextureCoordinatesTransform(texCoordTransForm); @@ -353,7 +354,7 @@ public: void setupTiledContentNode(QSGTexture *texture, const QRect &rect, const QRectF &sourceRect, QSGTexture::Filtering filtering, - QSGNode *layerChain) Q_DECL_OVERRIDE + QSGNode *layerChain) override { QSGTextureNode *textureNode = m_apiDelegate->createTextureNode(); textureNode->setRect(rect); @@ -366,7 +367,7 @@ public: } void setupSolidColorNode(const QRect &rect, const QColor &color, - QSGNode *layerChain) Q_DECL_OVERRIDE + QSGNode *layerChain) override { QSGRectangleNode *rectangleNode = m_apiDelegate->createRectangleNode(); rectangleNode->setRect(rect); @@ -377,7 +378,7 @@ public: } void setupDebugBorderNode(QSGGeometry *geometry, QSGFlatColorMaterial *material, - QSGNode *layerChain) Q_DECL_OVERRIDE + QSGNode *layerChain) override { QSGGeometryNode *geometryNode = new QSGGeometryNode; geometryNode->setFlags(QSGNode::OwnsGeometry | QSGNode::OwnsMaterial); @@ -395,7 +396,7 @@ public: const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize, YUVVideoMaterial::ColorSpace colorspace, float rMul, float rOff, const QRectF &rect, - QSGNode *layerChain) Q_DECL_OVERRIDE + QSGNode *layerChain) override { YUVVideoNode *videoNode = new YUVVideoNode( yTexture, @@ -416,7 +417,7 @@ public: } #ifdef GL_OES_EGL_image_external void setupStreamVideoNode(MailboxTexture *texture, const QRectF &rect, - const QMatrix4x4 &textureMatrix, QSGNode *layerChain) Q_DECL_OVERRIDE + const QMatrix4x4 &textureMatrix, QSGNode *layerChain) override { StreamVideoNode *svideoNode = new StreamVideoNode(texture, false, ExternalTarget); svideoNode->setRect(rect); |