aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-09-08 12:36:53 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-09-08 13:38:31 +0200
commit01f94b710bd66f3289f545e3ac97433ce8419043 (patch)
treea747e55c6bffb73dab9d227a9950b350e9bee898 /src
parentd970bcfa0498ad5277d9fcfe92059c3647e82d97 (diff)
make sure we polishItems also in plain render loop
Change-Id: Ife8ab271c77a8daeaca9463e72296714aba17df9 Reviewed-on: http://codereview.qt-project.org/4430 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qsgcanvas.cpp9
-rw-r--r--src/declarative/items/qsgcanvas_p.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index 6c11e121c8..d84f3229b2 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -70,9 +70,10 @@ DEFINE_BOOL_CONFIG_OPTION(qmlNoThreadedRenderer, QML_BAD_GUI_RENDER_LOOP)
extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha);
-void QSGCanvasRenderLoop::updateFocusItemTransform()
+void QSGCanvasPrivate::updateFocusItemTransform()
{
- QSGItem *focus = renderer->activeFocusItem();
+ Q_Q(QSGCanvas);
+ QSGItem *focus = q->activeFocusItem();
if (focus && qApp->inputPanel()->inputItem() == focus)
qApp->inputPanel()->setInputItemTransform(QSGItemPrivate::get(focus)->itemToCanvasTransform());
}
@@ -92,7 +93,7 @@ public:
virtual void paint() {
if (animationRunning && animationDriver())
animationDriver()->advance();
- updateFocusItemTransform();
+ polishItems();
syncSceneGraph();
makeCurrent();
glViewport(0, 0, size.width(), size.height());
@@ -387,6 +388,7 @@ void QSGCanvasPrivate::polishItems()
QSGItemPrivate::get(item)->polishScheduled = false;
item->updatePolish();
}
+ updateFocusItemTransform();
}
@@ -2037,7 +2039,6 @@ void QSGCanvasRenderThread::sync(bool guiAlreadyLocked)
renderThreadAwakened = false;
polishItems();
- updateFocusItemTransform();
wake();
wait();
diff --git a/src/declarative/items/qsgcanvas_p.h b/src/declarative/items/qsgcanvas_p.h
index b0c63f0d01..d73c57d456 100644
--- a/src/declarative/items/qsgcanvas_p.h
+++ b/src/declarative/items/qsgcanvas_p.h
@@ -131,6 +131,7 @@ public:
void notifyFocusChangesRecur(QSGItem **item, int remaining);
void updateInputMethodData();
+ void updateFocusItemTransform();
void dirtyItem(QSGItem *);
void cleanup(QSGNode *);
@@ -205,7 +206,6 @@ protected:
void renderSceneGraph(const QSize &size) { d->renderSceneGraph(size); }
void polishItems() { d->polishItems(); }
QAnimationDriver *animationDriver() const { return d->animationDriver; }
- void updateFocusItemTransform();
inline QOpenGLContext *glContext() const { return gl; }
void createGLContext();