diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-07-19 14:12:54 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-09-11 17:25:32 +0000 |
commit | 7282fb4fb4861320539f2b7288f63e1d4f48749d (patch) | |
tree | 3fb62ed4d45875be975410b08c776888803748ec /src/core/delegated_frame_node.cpp | |
parent | 82499104972d24027044acaff1136ea7d758efe2 (diff) |
Adaptations for Chromium 60
Change-Id: I536258e22c2ec143f2fd3f1cbda229e0611b6af4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/core/delegated_frame_node.cpp')
-rw-r--r-- | src/core/delegated_frame_node.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index 0384d1ce4..dba25d679 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -69,7 +69,7 @@ #include "cc/quads/yuv_video_draw_quad.h" #include "cc/resources/returned_resource.h" #include "cc/resources/transferable_resource.h" -#include "components/display_compositor/host_shared_bitmap_manager.h" +#include "components/viz/display_compositor/host_shared_bitmap_manager.h" #include "gpu/command_buffer/service/mailbox_manager.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_fence.h" @@ -236,8 +236,11 @@ public: QSGNode *) override { QSGTextureNode *textureNode = static_cast<QSGTextureNode*>(*m_nodeIterator++); - if (textureNode->texture() != texture) + if (textureNode->texture() != texture) { textureNode->setTexture(texture); + // @TODO: This is a workaround for funky rendering, figure out why this is needed. + textureNode->markDirty(QSGTextureNode::DirtyGeometry); + } if (textureNode->textureCoordinatesTransform() != texCoordTransForm) textureNode->setTextureCoordinatesTransform(texCoordTransForm); if (textureNode->rect() != rect) @@ -251,15 +254,17 @@ public: QSGTexture::Filtering filtering, QSGNode *) override { QSGTextureNode *textureNode = static_cast<QSGTextureNode*>(*m_nodeIterator++); - + if (textureNode->texture() != texture) { + textureNode->setTexture(texture); + // @TODO: This is a workaround for funky rendering, figure out why this is needed. + textureNode->markDirty(QSGTextureNode::DirtyGeometry); + } if (textureNode->rect() != rect) textureNode->setRect(rect); if (textureNode->sourceRect() != sourceRect) textureNode->setSourceRect(sourceRect); if (textureNode->filtering() != filtering) textureNode->setFiltering(filtering); - if (textureNode->texture() != texture) - textureNode->setTexture(texture); } void setupSolidColorNode(const QRect &rect, const QColor &color, QSGNode *) override { @@ -652,7 +657,7 @@ QSharedPointer<QSGTexture> ResourceHolder::initTexture(bool quadNeedsBlending, R if (!texture) { if (m_resource.is_software) { Q_ASSERT(apiDelegate); - std::unique_ptr<cc::SharedBitmap> sharedBitmap = display_compositor::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox); + std::unique_ptr<cc::SharedBitmap> sharedBitmap = viz::HostSharedBitmapManager::current()->GetSharedBitmapFromId(m_resource.size, m_resource.mailbox_holder.mailbox); // QSG interprets QImage::hasAlphaChannel meaning that a node should enable blending // to draw it but Chromium keeps this information in the quads. // The input format is currently always Format_ARGB32_Premultiplied, so assume that all |