summaryrefslogtreecommitdiffstats
path: root/src/core/delegated_frame_node.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-10-31 12:39:52 +0100
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-11-25 16:27:08 +0100
commitdb3d2a61ec427254323809970b4c5880e7727d61 (patch)
tree810d0467c00846fb063eab58bb1f1ab23c18f4b4 /src/core/delegated_frame_node.cpp
parentbca667dfa3a12162d550762870fe831065f88c05 (diff)
Use the new QSGSimpleTextureNode::sourceRect
This is cleaner than hacking the QSGGeometry data ourselves. Change-Id: Id2009ac8c6237472e56a11d6daa589e94bf10945 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'src/core/delegated_frame_node.cpp')
-rw-r--r--src/core/delegated_frame_node.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index ee2b1b5d7..375a10713 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -635,12 +635,9 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData,
QSGSimpleTextureNode *textureNode = new QSGSimpleTextureNode;
textureNode->setRect(toQt(quad->rect));
+ textureNode->setSourceRect(toQt(tquad->tex_coord_rect));
textureNode->setFiltering(texture->resource().filter == GL_LINEAR ? QSGTexture::Linear : QSGTexture::Nearest);
textureNode->setTexture(texture.data());
-
- // FIXME: Find out if we can implement a QSGSimpleTextureNode::setSourceRect instead of this hack.
- // This has to be done at the end since many QSGSimpleTextureNode methods would overwrite this.
- QSGGeometry::updateTexturedRectGeometry(textureNode->geometry(), textureNode->rect(), textureNode->texture()->convertToNormalizedSourceRect(toQt(tquad->tex_coord_rect)));
currentLayerChain->appendChildNode(textureNode);
break;
} case cc::DrawQuad::YUV_VIDEO_CONTENT: {