aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgcanvas_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-09-30 14:26:56 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-30 10:37:05 +0200
commitf07805ff56f9a2236f22ed7614aa8c4fc0dfdb46 (patch)
tree2a9b6937cec6b97e9074aba0199c61ef54f27b17 /src/declarative/items/qsgcanvas_p.h
parentf32a83bfcf5a667a81fdd2020f119cdeec79a9f1 (diff)
Add a QSGCanvas incubation controller
Change-Id: I0324c32240746b013eeefaae2dfaa390d6e777e5 Task-number: QTBUG-21151 Reviewed-on: http://codereview.qt-project.org/5828 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/items/qsgcanvas_p.h')
-rw-r--r--src/declarative/items/qsgcanvas_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/items/qsgcanvas_p.h b/src/declarative/items/qsgcanvas_p.h
index 6a8e0a0ce0..4a53e6bb1b 100644
--- a/src/declarative/items/qsgcanvas_p.h
+++ b/src/declarative/items/qsgcanvas_p.h
@@ -84,6 +84,7 @@ class QSGCanvasPrivate;
class QTouchEvent;
class QSGCanvasRenderLoop;
+class QSGCanvasIncubationController;
class QSGCanvasPrivate : public QWindowPrivate
{
@@ -167,6 +168,8 @@ public:
QOpenGLFramebufferObject *renderTarget;
QHash<int, QSGItem *> itemForTouchPointId;
+
+ mutable QSGCanvasIncubationController *incubationController;
};
class QSGCanvasRenderLoop
@@ -196,6 +199,7 @@ public:
virtual void animationStarted() = 0;
virtual void animationStopped() = 0;
virtual void moveContextToThread(QSGContext *) { }
+ virtual bool *allowMainThreadProcessing() { return 0; }
protected:
void initializeSceneGraph() { d->initializeSceneGraph(); }
@@ -226,6 +230,7 @@ class QSGCanvasRenderThread : public QThread, public QSGCanvasRenderLoop
public:
QSGCanvasRenderThread()
: mutex(QMutex::NonRecursive)
+ , allowMainThreadProcessingFlag(true)
, animationRunning(false)
, isGuiBlocked(0)
, isPaintCompleted(false)
@@ -258,6 +263,7 @@ public:
void setWindowSize(const QSize &size) { windowSize = size; }
void maybeUpdate();
void moveContextToThread(QSGContext *c) { c->moveToThread(this); }
+ bool *allowMainThreadProcessing() { return &allowMainThreadProcessingFlag; }
bool event(QEvent *);
@@ -271,6 +277,8 @@ public:
QMutex mutex;
QWaitCondition condition;
+ bool allowMainThreadProcessingFlag;
+
QSize windowSize;
QSize renderedSize;