Make opengl context current in context2d's toImage if necessary
authorUlf Hermann <ulf.hermann@theqtcompany.com>
Mon, 17 Nov 2014 13:43:27 +0000 (14:43 +0100)
committerUlf Hermann <ulf.hermann@theqtcompany.com>
Mon, 12 Jan 2015 10:37:53 +0000 (11:37 +0100)
commit8b3643dd8b492f7754846e7371686db61bcfef69
tree3c4605d2c2f0fb2761c51bf40a9d5f370d3befd7
parente339c279e0241cd132e068f929c303fabde509ee
Make opengl context current in context2d's toImage if necessary

With the basic render loop the scene graph thread is the render thread
and thus we don't get a different opengl context for context2d in
immediate/fbo mode. We have to make sure the opengl context is current
when we call flush() from functions exposed to JS.

Change-Id: Idd91cf1ce9c299a7645cf3b78d4498652376b17e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
src/quick/items/context2d/qquickcontext2d.cpp