Merge lp://qastaging/~smspillaz/unity/unity.fix_864784_868120_872625v2 into lp://qastaging/unity

Proposed by Sam Spilsbury
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 1816
Proposed branch: lp://qastaging/~smspillaz/unity/unity.fix_864784_868120_872625v2
Merge into: lp://qastaging/unity
Diff against target: 1729 lines (+1188/-297)
11 files modified
plugins/unityshell/src/BackgroundEffectHelper.cpp (+13/-0)
plugins/unityshell/src/BackgroundEffectHelper.h (+1/-1)
plugins/unityshell/src/PanelView.cpp (+1/-2)
plugins/unityshell/src/ScreenEffectFramebufferObject.cpp (+234/-0)
plugins/unityshell/src/ScreenEffectFramebufferObject.h (+87/-0)
plugins/unityshell/src/unityshell.cpp (+75/-257)
plugins/unityshell/src/unityshell.h (+7/-35)
standalone-clients/CMakeLists.txt (+16/-2)
standalone-clients/GLFuncLoader.cpp (+51/-0)
standalone-clients/GLFuncLoader.h (+33/-0)
standalone-clients/TestScreenEffectFramebufferObject.cpp (+670/-0)
To merge this branch: bzr merge lp://qastaging/~smspillaz/unity/unity.fix_864784_868120_872625v2
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Mirco Müller Pending
Neil J. Patel Pending
Review via email: mp+86064@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2011-11-14.

Description of the change

Fix bug 868120 and bug 872625

We should use one framebuffer object per screen rather than one per monitor. Using one per monitor leads to all kinds of interesting rendering glitches because the plugins expect that paint is clipped to the entire backbuffer rather than paint being contained in one buffer.

This should also fix crashes on changing resolutions, as we don't have the race condition where a monitor paints and an fbo hasn't been created for it yet.

Also adds a testcase now, its in standalone-tests/TestScreenEffectFramebufferObject.cpp .

The testcase is a little quirky because we're trying to simulate what's going on when unity is actually running embedded in another opengl application, which means that we have to use nux's embedded mode rather than testing BackgroundEffectHelper directly. The testcase shows what happens in cases where parts of the scene are blurred and other parts aren't as well as what happens when some parts need updating and others don't (eg, the framebuffer should unbind). There's no automated test yet, but I imagine we could make one.

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote : Posted in a previous version of this proposal

This branch does break the repaint-cycle. While it compiles/works/runs screen-updates only happen when a window is moved. From the diff I currently don't see what you're missing.

review: Needs Fixing
Revision history for this message
Mirco Müller (macslow) wrote : Posted in a previous version of this proposal

I tried this on my laptop (intel graphics, mesa) and it worked ok. So something odd is happening with nvidia (binary driver). Might need to see how ATI/fglrx behaves with this.

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Nvidia here and I can confirm MacSlow's findings.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> Nvidia here and I can confirm MacSlow's findings.

Damn, ok. Their driver is broken :( I will have to work around it.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Noted: the driver is not carrying over attributes when set using glPushAttrib (GL_CURRENT_BIT), Jay says that they should be, and this is what the mesa drivers do, so NVIDIA should know about this.

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

I can confirm that it properly repaints now, can't test multiple monitors though.

Revision history for this message
Jason Smith (jassmith) wrote : Posted in a previous version of this proposal

+1

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Can someone with fglrx test this ?

Revision history for this message
Gord Allott (gordallott) wrote : Posted in a previous version of this proposal

On 11/10/11 12:18, Sam Spilsbury wrote:
> Noted: the driver is not carrying over attributes when set using glPushAttrib (GL_CURRENT_BIT), Jay says that they should be, and this is what the mesa drivers do, so NVIDIA should know about this.

merge approved

--
Gordon Allott
Canonical Ltd.
27 Floor, Millbank Tower
London SW1P 4QP
www.canonical.com

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Testcase is to make sure that the screen actually redraws the way you'd expect it to. Bonus points if you can

 1) Test with multiple monitors to make sure the blur is correct on both
 2) No blur offsets
 3) No "flickering" when switching workspaces using expo
 4) No crashes when you hotplug a monitor on intel.

There is no unit test.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

*cough* *cough* someone test this on fglrx *cough*

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

Instead of
  uScreen->_fbo = UnityFBO::Ptr (new UnityFBO (geometry));
you can go
  uScreen->_fbo.reset(new UnityFBO(geometry));

Saves a little typing (and it is more efficient in behaviour),

  UnityFBO::UnityFBO (CompRect geometry)
should be
  UnityFBO::UnityFBO(CompRect const& geometry)

Avoids an extra copy.

Revision history for this message
Jason Smith (jassmith) wrote : Posted in a previous version of this proposal

This requires testing for merge

review: Needs Fixing
Revision history for this message
Mirco Müller (macslow) wrote :

I checked this again. It works on nvidia (binary driver) now. Still unable to test it on any ATI-gfx-card, due to lack of hardware.

Regarding the missing unit-test... you could at least add a manual-test derived from your bullet-point list you posted in the comments. Than I'd be ok to give it a +1 when we found someone to test it successfully in a ATI-gfx-card.

Revision history for this message
Jason Smith (jassmith) wrote :

Works like the other oem branch afaict, no merge conflicts after time. I say approve :)

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

standalone-clients/TestScreenEffectFramebufferObject is a unit test in this case. It isn't automated, but it should how how the code works and you can test every possible case it hits.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

For the record, this proposal also contains the fixes for bug 861061 and bug 880707. This is because Sam's branches copied the fix from lp:~vanvugt/unity/fix-861061-trunk

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.