diff options
author | Charles Yin <charles.yin@nokia.com> | 2012-06-04 16:34:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 12:32:58 +0200 |
commit | 1dcfa8aa2ae6460f26d9843c197532024447e43b (patch) | |
tree | 10b5243607d603443a4abe9f89e2a453757ffaeb /src/quick/items/context2d/qquickcontext2d_p.h | |
parent | 332fe582d1bd590b59618cc7b732be9bf7f9f475 (diff) |
Introduce QQuickCanvasPixmap
1. QQuickPixmap now only store textures instead of QImage data, however
context2d still need to access the QImage in some places, so cache the
loaded images to avoid the expensive GL readback operations.
2. Use texture directly if the render target is FBO.
Change-Id: I6228011e5698fa00f2e3420a3a4a305995b8a238
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2d_p.h')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index 22addf33a8..e2952ca580 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -109,6 +109,7 @@ public: FillText, StrokeText, DrawImage, + DrawPixmap, GetImageData }; @@ -223,7 +224,7 @@ public: bool isPointInPath(qreal x, qreal y) const; QPainterPath createTextGlyphs(qreal x, qreal y, const QString& text); - QImage createImage(const QUrl& url); + QQmlRefPointer<QQuickCanvasPixmap> createPixmap(const QUrl& url); QOpenGLContext *glContext() { return m_glContext; } QSurface *surface() { return m_surface; } |