diff options
author | Charles Yin <charles.yin@nokia.com> | 2012-05-28 10:48:37 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 01:59:58 +0200 |
commit | 41a9f34461e34c171ce7ecc4b3e9bc64948ffbde (patch) | |
tree | 64272e64e1fb99758810a039cee38ea7333084e5 /src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp | |
parent | 3747f1972db869853a593f869154debf174c9cf2 (diff) |
Fix canvas item drawImage bug with FBO render target
If canvas' render target is FramebufferObject, only the first drawImage() call
was successful, it could be fixed by adding beginNativePainting() and endNativePainting(),
but this could be unexpected behavior with OpenGL paint engine.
task-number: QTBUG-23595
Change-Id: Iff70fc88f6d39655dd283fa5dde3365887910460
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp index f6b9a1afeb..6f20b699c9 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp @@ -409,7 +409,11 @@ void QQuickContext2DCommandBuffer::replay(QPainter* p, QQuickContext2D::State& s qreal shadow_dy = dy + (state.shadowOffsetX < 0? state.shadowOffsetY:0); p->drawImage(shadow_dx, shadow_dy, shadow); } + + //Strange OpenGL painting behavior here, without beginNativePainting/endNativePainting, only the first image is painted. + p->beginNativePainting(); p->drawImage(dx, dy, image); + p->endNativePainting(); } break; } |