Bug Hunting Session
Bug 94252 - Gratuitous GL context switching.
Summary: Gratuitous GL context switching.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.0.2.1 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.0.2
Keywords:
Depends on:
Blocks: 94213
  Show dependency treegraph
 
Reported: 2015-09-16 02:13 UTC by Michael Meeks
Modified: 2016-10-25 19:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2015-09-16 02:13:38 UTC
Switching OpenGLContext's is an expensive hobby and implies a glFlush (I think) -which tends to show the partial construction of what we're rendering before its ready (ie. creates flicker).

Currently we tend to re-use the OGL context that was previously associated with a VirtualDevice's SalGraphics; however since we un-bind our framebuffers from that each time we clearCurrent - then if we have a new context - we shouldn't try to restore the old context if we have another in-place, but instead just jump on the new context.
Comment 1 Commit Notification 2015-09-16 02:16:36 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dd0fa60f6c289d7f290577cc240deb7b6e83fc8f

tdf#94252 - avoid switching contexts un-necessarily to reduce flicker.

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 2 Michael Meeks 2015-09-16 10:59:38 UTC
Fixed in master; back-porting to 5.0.x in progress.
Comment 3 Commit Notification 2015-09-16 12:32:01 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3891bd40f6cf513a020ac6c87acfd0af7fc5ffd8&h=libreoffice-5-0

tdf#94252 - avoid switching contexts un-necessarily to reduce flicker.

It will be available in 5.0.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2015-09-16 16:28:25 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-5-0-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9617d1c6a299901b79618d657e31635e59eda007&h=libreoffice-5-0-2

tdf#94252 - avoid switching contexts un-necessarily to reduce flicker.

It will be available in 5.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.