aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d/qquickcontext2d_p.h
diff options
context:
space:
mode:
authorCharles Yin <charles.yin@nokia.com>2012-05-18 09:58:09 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-31 02:23:02 +0200
commitfdbb1f1b4f43a961d66998a1125f5e11618ed025 (patch)
tree1f8db88458bd6f837492bc9ddc26fbc9278c3c48 /src/quick/items/context2d/qquickcontext2d_p.h
parent447e5acb880ebda498891623dc4009984cb73bc6 (diff)
Enable threaded/immediate rendering for FBO(step 1)
1. Create a new gl context if the scenegraph render thread is different with context2d render thread 2. Expose the gl context and window surface from context2d 3. Get the right current gl context before painting Change-Id: I5e252a8142d760442f9dfb53ed8a8ce289379af9 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2d_p.h')
-rw-r--r--src/quick/items/context2d/qquickcontext2d_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h
index 409c165b79..22addf33a8 100644
--- a/src/quick/items/context2d/qquickcontext2d_p.h
+++ b/src/quick/items/context2d/qquickcontext2d_p.h
@@ -70,7 +70,9 @@ class QQuickContext2DCommandBuffer;
class QQuickContext2DTexture;
class QQuickPixmap;
class QSGTexture;
-
+class QQuickWindowManager;
+class QSurface;
+class QOpenGLContext;
class QQuickContext2D : public QQuickCanvasContext
{
@@ -223,6 +225,9 @@ public:
QPainterPath createTextGlyphs(qreal x, qreal y, const QString& text);
QImage createImage(const QUrl& url);
+ QOpenGLContext *glContext() { return m_glContext; }
+ QSurface *surface() { return m_surface; }
+
State state;
QStack<QQuickContext2D::State> m_stateStack;
QQuickCanvasItem* m_canvas;
@@ -232,6 +237,9 @@ public:
v8::Local<v8::Value> m_strokeStyle;
v8::Handle<v8::Value> m_v8path;
QV8Engine *m_v8engine;
+ QQuickWindowManager *m_windowManager;
+ QSurface *m_surface;
+ QOpenGLContext *m_glContext;
v8::Persistent<v8::Object> m_v8value;
QQuickContext2DTexture *m_texture;
QQuickCanvasItem::RenderTarget m_renderTarget;