diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-01 12:41:59 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-01 14:10:24 +0200 |
commit | 2b3493c1b216d1d2ce1cbac974db1a9ee449e01f (patch) | |
tree | ba70524cd2d04e00fbaa250018d079f42bc87124 /src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h | |
parent | 78923902089d0a70c096e5f47f42e24fbcd4fa56 (diff) |
Support Canvas.antialiasing without multisample support.
FBO based rendering relies on framebuffer multisampling to do
antialiasing, which is often not available on OpenGL ES and even on
some desktop chips. As a high-level API, it is quite bad that Canvas
users (on embedded in particular) have to choose between quality
(Image) or performance (FBO).
This change implements super sampling, rendering the content
at twice the size and then scaling it down.
[ChangeLog][QtQuick][Canvas] Implement antialiasing on
FramebufferObject based render targets through super-sampling (SSAA)
when framebuffer multisampling is not available.
Change-Id: I373f3a645342dac157506b746c1e39b0f3f3f9f2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h index 9e79333a0c..8c7ffb0524 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h @@ -232,7 +232,8 @@ public: inline QColor takeColor() { return colors[colorIdx++]; } inline QBrush takeBrush() { return brushes[brushIdx++]; } - void replay(QPainter* painter, QQuickContext2D::State& state); + void replay(QPainter* painter, QQuickContext2D::State& state, const QVector2D &scaleFactor); + private: QPen makePen(const QQuickContext2D::State& state); void setPainterState(QPainter* painter, const QQuickContext2D::State& state, const QPen& pen); |