~mc-return/compiz/compiz.merge-fix1173684-shift-switcher-broken-and-hardcoded-text-placement

Viewing all changes in revision 3679.

Refactor screenshot code to make it clearer and also to allow us to take
screenshots in glPaintOutput as opposed to paint ().

Taking screenshots in paint () was probably correct pre-GLES, but isn't
really correct now - we want to be able to read off of the currently
bound scratch framebuffer where we last painted the frame. Reading off
the frontbuffer is an imprecise operation because the contents of both
buffers are really undefined after a swap. In the case where we are
not painting to a scratch framebuffer object, we'll just end up reading
from the backbuffer anyways, which would be correct to do mid-frame.

Also added the new static const GLenums
DRAW_FRAMEBUFFER_BINDING and
READ_FRAMEBUFFER_BINDING to opengl.h.

(LP: #771875). Fixes: https://bugs.launchpad.net/bugs/771875.

Approved by PS Jenkins bot, Sam Spilsbury.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: