diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-11 13:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-23 07:56:30 +0200 |
commit | 15ee12508ec8663ae09ebfc61cc4f0725311bdec (patch) | |
tree | 7f788285afbde14f0d1eaab9065b21410c277ac5 /src/quick/items/qquickitemgrabresult.cpp | |
parent | 253e9257e1f586d1c1dfa585aa6f862d310cdec3 (diff) |
Cleanup: Separate the sub-tree layering out of QtQuick into the scene graph
This basically renames QQuickShaderEffectTexture to QSGDefaultLayer and
introduces QSGLayer as interface to be used. QQuickShaderEffectTexture is
generic for the scene graph and has no QtQuick dependencies. The interface
separation allows scene graph backends to customize layers.
Change-Id: I9a7f37addaa4b80a34ff9a1456b0cb9b16d4e9f3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/items/qquickitemgrabresult.cpp')
-rw-r--r-- | src/quick/items/qquickitemgrabresult.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickitemgrabresult.cpp b/src/quick/items/qquickitemgrabresult.cpp index 93b9261c44..f5d72bbd3a 100644 --- a/src/quick/items/qquickitemgrabresult.cpp +++ b/src/quick/items/qquickitemgrabresult.cpp @@ -91,7 +91,7 @@ public: QPointer<QQuickItem> item; QPointer<QQuickWindow> window; - QQuickShaderEffectTexture *texture; + QSGLayer *texture; QSizeF itemSize; QSize textureSize; }; @@ -228,7 +228,8 @@ void QQuickItemGrabResult::setup() return; } - d->texture = new QQuickShaderEffectTexture(d->item); + QSGRenderContext *rc = QQuickWindowPrivate::get(d->window.data())->context; + d->texture = rc->sceneGraphContext()->createLayer(rc); d->texture->setItem(QQuickItemPrivate::get(d->item)->itemNode()); d->itemSize = QSizeF(d->item->width(), d->item->height()); } |