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
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MC Return | Approve | ||
Review via email:
|
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.
\o/
+1
Happy to report that this one works perfectly.
Tested with and without FBOs. :)
Finally we can close this nasty bug.