diff options
Diffstat (limited to 'softwarecontext/context.h')
-rw-r--r-- | softwarecontext/context.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/softwarecontext/context.h b/softwarecontext/context.h index 6ab405c890..75cf02d767 100644 --- a/softwarecontext/context.h +++ b/softwarecontext/context.h @@ -44,12 +44,29 @@ #define CONTEXT_H #include <private/qsgcontext_p.h> +#include <private/qsgrenderer_p.h> #include <QtCore/QElapsedTimer> #include <QtGui/QOpenGLShaderProgram> +#include <QtGui/QBackingStore> namespace SoftwareContext { +class Renderer : public QSGRenderer +{ +public: + Renderer(QSGRenderContext *context); + + virtual void renderScene(GLuint fboId = 0); + + virtual void render(); + +private: + void renderNode(QPainter *painter, QSGNode *node); + + QScopedPointer<QBackingStore> backingStore; +}; + class RenderContext : public QSGRenderContext { public: @@ -60,6 +77,8 @@ public: QSGTexture *createTexture(const QImage &image) const; QSGTexture *createTextureNoAtlas(const QImage &image) const; QSGRenderer *createRenderer(); + + QWindow *currentWindow; }; class Context : public QSGContext @@ -70,6 +89,9 @@ public: QSGRenderContext *createRenderContext() { return new RenderContext(this); } + virtual QSGRectangleNode *createRectangleNode(); + virtual QSGImageNode *createImageNode(); + private: }; |