aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-08-07 21:34:58 +0200
committerLars Knoll <lars.knoll@digia.com>2014-08-08 15:57:35 +0300
commitd6ceb224da997b9afad3d899a6af62c54e5a443f (patch)
tree36603faa9c4311fe449f903c177a0d579474c2ac
parentf2919208964f32efd5d5d9a83bd856d069d070ad (diff)
Add support for opacity nodes
Change-Id: Ia72204a9fb8ff09070efd85deabf70ca52d621a8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--softwarecontext/context.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/softwarecontext/context.cpp b/softwarecontext/context.cpp
index c0c4720c81..9d0b7a3097 100644
--- a/softwarecontext/context.cpp
+++ b/softwarecontext/context.cpp
@@ -119,6 +119,11 @@ void Renderer::renderNode(QPainter *painter, QSGNode *node)
painter->save();
restore = true;
painter->setClipRect(cn->clipRect(), Qt::IntersectClip);
+ } else if (node->type() == QSGNode::OpacityNodeType) {
+ QSGOpacityNode *on = static_cast<QSGOpacityNode*>(node);
+ painter->save();
+ restore = true;
+ painter->setOpacity(on->opacity());
}
node->paint(painter);