diff options
Diffstat (limited to 'softwarecontext/context.cpp')
-rw-r--r-- | softwarecontext/context.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/softwarecontext/context.cpp b/softwarecontext/context.cpp index 69e05951c9..de0e644a80 100644 --- a/softwarecontext/context.cpp +++ b/softwarecontext/context.cpp @@ -47,6 +47,7 @@ #include "glyphnode.h" #include "ninepatchnode.h" #include "renderingvisitor.h" +#include "softwarelayer.h" #include <QtCore/QCoreApplication> #include <QtCore/QElapsedTimer> @@ -107,6 +108,38 @@ void Renderer::render() backingStore->flush(rect); } +void Renderer::nodeChanged(QSGNode *node, QSGNode::DirtyState state) +{ + + QSGRenderer::nodeChanged(node, state); +} + +PixmapRenderer::PixmapRenderer(QSGRenderContext *context) + : QSGRenderer(context) +{ + +} + +void PixmapRenderer::renderScene(GLuint) +{ + Q_UNREACHABLE(); +} + +void PixmapRenderer::render() +{ + Q_UNREACHABLE(); +} + +void PixmapRenderer::render(QPixmap *target) +{ + const QRect rect(0, 0, target->width(), target->height()); + target->fill(clearColor()); + QPainter painter(target); + painter.setRenderHint(QPainter::Antialiasing); + + RenderingVisitor(&painter).visitChildren(rootNode()); +} + RenderContext::RenderContext(QSGContext *ctx) : QSGRenderContext(ctx) , currentWindow(0) @@ -143,6 +176,11 @@ QSGNinePatchNode *Context::createQStyleNode() return new NinePatchNode(); } +QSGLayer *Context::createLayer(QSGRenderContext *renderContext) +{ + return new SoftwareLayer(renderContext); +} + void RenderContext::initialize(QOpenGLContext *context) { QSGRenderContext::initialize(context); |