Merge lp://qastaging/~smspillaz/compiz/merge.fix771875-screenshot-overlay-on-screenshots-with-enabled-fbos.read_draw_buffer into lp://qastaging/~mc-return/compiz/compiz.merge-fix771875-screenshot-overlay-on-screenshots-with-enabled-fbos

Proposed by Sam Spilsbury
Status: Merged
Approved by: MC Return
Approved revision: 3669
Merged at revision: 3669
Proposed branch: lp://qastaging/~smspillaz/compiz/merge.fix771875-screenshot-overlay-on-screenshots-with-enabled-fbos.read_draw_buffer
Merge into: lp://qastaging/~mc-return/compiz/compiz.merge-fix771875-screenshot-overlay-on-screenshots-with-enabled-fbos
Diff against target: 542 lines (+318/-151)
2 files modified
plugins/opengl/include/opengl/opengl.h (+4/-0)
plugins/screenshot/src/screenshot.cpp (+314/-151)
To merge this branch: bzr merge lp://qastaging/~smspillaz/compiz/merge.fix771875-screenshot-overlay-on-screenshots-with-enabled-fbos.read_draw_buffer
Reviewer Review Type Date Requested Status
MC Return Approve
Review via email: mp+161278@code.qastaging.launchpad.net

Commit message

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.

Description of the change

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.

To post a comment you must log in.
Revision history for this message
MC Return (mc-return) wrote :

\o/

+1

Happy to report that this one works perfectly.
Tested with and without FBOs. :)

Finally we can close this nasty bug.

review: Approve
Revision history for this message
MC Return (mc-return) wrote :

(The code also LGTM)

review: Approve
Revision history for this message
MC Return (mc-return) wrote :

Ah, I had to approve it globally first... :)

Revision history for this message
MC Return (mc-return) wrote :

Let's see what happens next :)

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

You will need to merge this manually. CI does not apply to non trunk
branches
On 27/04/2013 7:07 PM, "MC Return" <email address hidden> wrote:

> Let's see what happens next :)
> --
>
> https://code.launchpad.net/~smspillaz/compiz/merge.fix771875-screenshot-overlay-on-screenshots-with-enabled-fbos.read_draw_buffer/+merge/161278
> You are the owner of
> lp:~smspillaz/compiz/merge.fix771875-screenshot-overlay-on-screenshots-with-enabled-fbos.read_draw_buffer.
>

Revision history for this message
MC Return (mc-return) wrote :

> You will need to merge this manually. CI does not apply to non trunk
> branches

Thanks 4 the info. Doing that version now :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: