Merge lp:~smspillaz/unity/unity.fix_1080947.2 into lp:unity
- unity.fix_1080947.2
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~smspillaz/unity/unity.fix_1080947.2 |
Merge into: | lp:unity |
Diff against target: |
682 lines (+303/-140) 5 files modified
dash/DashView.cpp (+0/-2) launcher/XdndCollectionWindowImp.cpp (+4/-0) plugins/unityshell/src/unityshell.cpp (+270/-136) plugins/unityshell/src/unityshell.h (+25/-2) unity-shared/OverlayWindowButtons.cpp (+4/-0) |
To merge this branch: | bzr merge lp:~smspillaz/unity/unity.fix_1080947.2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sam Spilsbury (community) | Needs Fixing | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Esokrates (community) | testing | Approve | |
Alfred E. Neumayer (community) | Approve | ||
Andrea Azzarone (community) | Approve | ||
Review via email: mp+154847@code.launchpad.net |
This proposal supersedes a proposal from 2013-02-10.
This proposal has been superseded by a proposal from 2013-05-13.
Commit message
Don't re-present all of our windows on every frame. Only do that if damage intersects it.
Use the new APIs exposed by compiz and nux to intelligently determine which windows need to be presented per-frame and only register damage for those windows. This fixes two things:
1. BaseWindows being redrawn from scratch every time damage was registered over them. That was incorrect and should only be done in the case of background blurs.
2. BaseWindows being drawn to the screen on every frame, regardless of whether or not they needed to be. Now they will only be drawn if some damage intersects beneath them. Note that unity will expand the damage region to accomadate the base window since nux does not support geometry clipping. So if there is a partial intersection of the launcher for example, the area of the screen which contains the launcher will be re-painted (but the launcher itself won't be redrawn, just its texture)
(LP: #1080947)
Description of the change
Don't re-present all of our windows on every frame. Only do that if damage intersects it.
Use the new APIs exposed by compiz and nux to intelligently determine which windows need to be presented per-frame and only register damage for those windows. This fixes two things:
1. BaseWindows being redrawn from scratch every time damage was registered over them. That was incorrect and should only be done in the case of background blurs.
2. BaseWindows being drawn to the screen on every frame, regardless of whether or not they needed to be. Now they will only be drawn if some damage intersects beneath them. Note that unity will expand the damage region to accomadate the base window since nux does not support geometry clipping. So if there is a partial intersection of the launcher for example, the area of the screen which contains the launcher will be re-painted (but the launcher itself won't be redrawn, just its texture).
This also uses the framebuffer blitting API from compiz to quickly copy the non-blurred regions of the screen back to the backbuffer.
(LP: #1080947)
This branch depends on two others:
1. https:/
2. https:/
Update: test results here: http://
I was careful to modify phoronix-test-suite to run tests in windowed mode only, and those were the only three tests I was able to get to run in windowed mode. Of particular interest was the fact that the unigine demos had a 5x performance improvement, probably because the driver was spending less time filling redundant pixels from the compositor. In other areas we had a roughly 5FPS boost.
Compiz framerate graph:
http://
You'll see that especially on the last test, it drops off quite a bit on the non buffer_age case, and is generally speaking lower across the board.
Andrea Azzarone (azzar1) wrote : | # |
Andrea Azzarone (azzar1) wrote : | # |
*crashes
Sam Spilsbury (smspillaz) wrote : | # |
Hey Andrea, thanks for testing. I'll look into those two as soon as possible.
I suspect the latter was a crash that existed upstream already, or at least, it happened in an area of the code I didn't touch.
Sam Spilsbury (smspillaz) wrote : | # |
Hey Again,
So the trails issue was really because nux wasn't keeping track of both the old and new geometries when posting the damage region. I've fixed it to do that now, so you should pull from the nux branch.
Worryingly - trying to drag any launcher icon on nvidia results in the paint loop simply ceasing to work. We still paint everything and call glXSwapBuffers, but nothing ends up on-screen. Not sure why it does that - can someone double check with trunk on an nvidia machine?
As for the crash - I can't reproduce that. Can you grab a stracktrace?
Andrea Azzarone (azzar1) wrote : | # |
8 - ShowWindow(true);
9 + // We are not calling ShowWindow () as this window
10 + // isn't really visible
Reverting this change seems to fix the issue. Btw the dnd issue with launcher icons is gone! :)
Sam Spilsbury (smspillaz) wrote : | # |
Hmm. Okay. I'll have a brief look into that, the input window needs to be
"hidden" otherwise it gets damaged on every from (eg fullscreen damage)
On 26/03/2013 3:13 AM, "Andrea Azzarone" <email address hidden> wrote:
> 8 - ShowWindow(true);
> 9 + // We are not calling ShowWindow () as this window
> 10 + // isn't really visible
>
> Reverting this change seems to fix the issue. Btw the dnd issue with
> launcher icons is gone! :)
> --
>
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
>
Andrea Azzarone (azzar1) wrote : | # |
> Hmm. Okay. I'll have a brief look into that, the input window needs to be
> "hidden" otherwise it gets damaged on every from (eg fullscreen damage)
What about:
ShowWindow(true);
ShowWindow(false);
just to force the creation of the X window?
> On 26/03/2013 3:13 AM, "Andrea Azzarone" <email address hidden> wrote:
>
> > 8 - ShowWindow(true);
> > 9 + // We are not calling ShowWindow () as this window
> > 10 + // isn't really visible
> >
> > Reverting this change seems to fix the issue. Btw the dnd issue with
> > launcher icons is gone! :)
> > --
> >
> >
> https:/
> > You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
> >
Sam Spilsbury (smspillaz) wrote : | # |
On Tue, Mar 26, 2013 at 8:08 AM, Andrea Azzarone <email address hidden> wrote:
>> Hmm. Okay. I'll have a brief look into that, the input window needs to be
>> "hidden" otherwise it gets damaged on every from (eg fullscreen damage)
>
> What about:
>
> ShowWindow(true);
> ShowWindow(false);
>
> just to force the creation of the X window?
That could work - does the X window need to be mapped ?
>
>> On 26/03/2013 3:13 AM, "Andrea Azzarone" <email address hidden> wrote:
>>
>> > 8 - ShowWindow(true);
>> > 9 + // We are not calling ShowWindow () as this window
>> > 10 + // isn't really visible
>> >
>> > Reverting this change seems to fix the issue. Btw the dnd issue with
>> > launcher icons is gone! :)
>> > --
>> >
>> >
>> https:/
>> > You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
>> >
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Andrea Azzarone (azzar1) wrote : | # |
59 + //directly_
60 + // gScreen));
Remove these lines please if you don't need them ;)
83 + for (CompOutput &output : screen-
84 + {
85 + FillShadowRectF
86 + cScreen-
87 + }
What about CompOutput const&? You will need to make this change too: from
+void UnityScreen:
113 + CompOutput *output)
to
CompOutput const& output.
+ nux::Geometry geometry(
Just do: nux::Geometry const& geometry = bw->...
100 +void UnityScreen:
101 +{
102 +}
Do we really need it?
Sam Spilsbury (smspillaz) wrote : | # |
Agree on all points. I was going to keep the commented out code as I'd like
to push through the new framebuffer object api, keeping then there would
just ease some of the later porting work but I can remove then if need be.
On 26/03/2013 9:06 AM, "Andrea Azzarone" <email address hidden> wrote:
> 59 + //directly_
> (cgl::createBli
> 60 + //
> gScreen));
>
> Remove these lines please if you don't need them ;)
>
> 83 + for (CompOutput &output : screen-
> 84 + {
> 85 + FillShadowRectF
> 86 + cScreen-
> 87 + }
>
> What about CompOutput const&? You will need to make this change too: from
>
> +void UnityScreen:
> 113 + CompOutput *output)
>
> to
>
> CompOutput const& output.
>
> + nux::Geometry geometry(
>
> Just do: nux::Geometry const& geometry = bw->...
>
> 100 +void UnityScreen:
> 101 +{
> 102 +}
>
> Do we really need it?
>
>
>
>
> --
>
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
>
Sam Spilsbury (smspillaz) wrote : | # |
Okay, all updated as requested.
Andrea Azzarone (azzar1) wrote : | # |
> Okay, all updated as requested.
I'll try again tomorrow.
Andrea Azzarone (azzar1) wrote : | # |
Looks good now. Please remove this line too:
164 + printf ("rebind!\n");
Any progress on "jerky" dash (during the scrolling)?
Sam Spilsbury (smspillaz) wrote : | # |
So there are two reasons why dash scrolling could be slow:
1) Maybe glCopyTexSubImage2D really is faster than bind -> paint -> unbind -> paint
2) The extra rebinds we have to do as a result of not having the new fbo api available are slowing us down.
For now I'll see if we can just move back to using CopyTexSubImage2D
Sam Spilsbury (smspillaz) wrote : | # |
Okay, I've gone back to the old glCopyTexSubImage2D method. I suspect that's faster anyways and it works on both nouveau and nvidia. We can easily speed it up by doing partial copies of the backbuffer, but that's work for another branch.
Andrea Azzarone (azzar1) wrote : | # |
/home/andrea/
Sam Spilsbury (smspillaz) wrote : | # |
Ah, sorry about that, must have missed a file in the commit -.-
Why do we not have CI runs on lp:unity?
On Fri, Mar 29, 2013 at 4:52 AM, Andrea Azzarone <email address hidden> wrote:
> /home/andrea/
>
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Sam Spilsbury (smspillaz) wrote : | # |
Okay, should be all fixed.
Andrea Azzarone (azzar1) wrote : | # |
Builds now but the dash is still slow. How can I help you debugging it?
Sam Spilsbury (smspillaz) wrote : | # |
Hmm. That's odd. Is it actually slower compared to trunk? There nothing in
this code which will cause it to paint more.
On 29/03/2013 5:25 PM, "Andrea Azzarone" <email address hidden> wrote:
> Builds now but the dash is still slow. How can I help you debugging it?
> --
>
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
>
Alfred E. Neumayer (beidl) wrote : | # |
Performance wise, it feels a better with games in windowed mode, but what I've noticed:
1) Scrolling through the dash per touchpad appears to be a tiny bit choppier than previously (Intel HD 4000).
2) Also, when switching from the window spread/scale to the dash, everything outside the dash blur is animating quite smoothly, but the blur seems to update its content properly only near the end of the spread animation.
It could well be a problem with the dash/lenses doing IO and blocking the blur redraw until IO is done.
OR it's always been this way and i just did not notice it because the dash used to fade in slower.
Visually the dash appears to fade in instantly, but the blur has to catch up.
Sam Spilsbury (smspillaz) wrote : | # |
Hey Alfred
On Sat, Mar 30, 2013 at 9:52 AM, Alfred Neumayer <email address hidden> wrote:
> Performance wise, it feels a better with games in windowed mode, but what I've noticed:
> 1) Scrolling through the dash per touchpad appears to be a tiny bit choppier than previously (Intel HD 4000).
>
So I'm not sure about this. What it might be worth doing is checking
to see if you still get this choppiness with the blurs turned off. I
did some work yesterday to make sure we're not updating the blur on
unity-only damages, however there could be a case where they are being
updated where they should not be.
> 2) Also, when switching from the window spread/scale to the dash, everything outside the dash blur is animating quite smoothly, but the blur seems to update its content properly only near the end of the spread animation.
Right, there is code inside the dash to only update blurs when we were
not updating the dash content already. If there is a spinner or
something running we won't update them. So it will be out of sync a
little bit. That code has always been there.
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Alfred E. Neumayer (beidl) wrote : | # |
> So I'm not sure about this. What it might be worth doing is checking
> to see if you still get this choppiness with the blurs turned off. I
> did some work yesterday to make sure we're not updating the blur on
> unity-only damages, however there could be a case where they are being
> updated where they should not be.
Tested with blur turned off and scrolling behaviour is back to normal.
I mean it's really not a deal breaker but it's still a noticable difference, at least for me.
>
> > 2) Also, when switching from the window spread/scale to the dash, everything
> outside the dash blur is animating quite smoothly, but the blur seems to
> update its content properly only near the end of the spread animation.
>
> Right, there is code inside the dash to only update blurs when we were
> not updating the dash content already. If there is a spinner or
> something running we won't update them. So it will be out of sync a
> little bit. That code has always been there.
Makes sense.
Sam Spilsbury (smspillaz) wrote : | # |
On Sat, Mar 30, 2013 at 10:13 AM, Alfred Neumayer <email address hidden> wrote:
>> So I'm not sure about this. What it might be worth doing is checking
>> to see if you still get this choppiness with the blurs turned off. I
>> did some work yesterday to make sure we're not updating the blur on
>> unity-only damages, however there could be a case where they are being
>> updated where they should not be.
>
> Tested with blur turned off and scrolling behaviour is back to normal.
> I mean it's really not a deal breaker but it's still a noticable difference, at least for me.
Andrea - this could be those QueueDraw calls within the ScrollView
acting up. I didn't catch blur updates happening just on scrolling
alone, but that could be a cause. Could you check if the blurs are
updating in this case?
--
Sam Spilsbury
Andrea Azzarone (azzar1) wrote : | # |
> On Sat, Mar 30, 2013 at 10:13 AM, Alfred Neumayer <email address hidden> wrote:
> >> So I'm not sure about this. What it might be worth doing is checking
> >> to see if you still get this choppiness with the blurs turned off. I
> >> did some work yesterday to make sure we're not updating the blur on
> >> unity-only damages, however there could be a case where they are being
> >> updated where they should not be.
> >
> > Tested with blur turned off and scrolling behaviour is back to normal.
> > I mean it's really not a deal breaker but it's still a noticable difference,
> at least for me.
>
> Andrea - this could be those QueueDraw calls within the ScrollView
> acting up. I didn't catch blur updates happening just on scrolling
> alone, but that could be a cause. Could you check if the blurs are
> updating in this case?
>
> --
> Sam Spilsbury
Nope, I think he's testing my PPA that does not have the fix for the dash scroll issue. :)
Sam Spilsbury (smspillaz) wrote : | # |
On Sat, Mar 30, 2013 at 5:07 PM, Andrea Azzarone <email address hidden> wrote:
>> On Sat, Mar 30, 2013 at 10:13 AM, Alfred Neumayer <email address hidden> wrote:
>> >> So I'm not sure about this. What it might be worth doing is checking
>> >> to see if you still get this choppiness with the blurs turned off. I
>> >> did some work yesterday to make sure we're not updating the blur on
>> >> unity-only damages, however there could be a case where they are being
>> >> updated where they should not be.
>> >
>> > Tested with blur turned off and scrolling behaviour is back to normal.
>> > I mean it's really not a deal breaker but it's still a noticable difference,
>> at least for me.
>>
>> Andrea - this could be those QueueDraw calls within the ScrollView
>> acting up. I didn't catch blur updates happening just on scrolling
>> alone, but that could be a cause. Could you check if the blurs are
>> updating in this case?
Ah okay.
In any case, I've been doing some work to reduce the amount of pixels
we need to copy around every time the blurs are updated, would it make
sense to have that work in here too? Its somewhat unrelated but
probably useful.
>>
>> --
>> Sam Spilsbury
>
> Nope, I think he's testing my PPA that does not have the fix for the dash scroll issue. :)
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Andrea Azzarone (azzar1) wrote : | # |
Ok the PPA should be fine now. Alfred, can you check? Thanks!
@Sam, how many lines of code?
Sam Spilsbury (smspillaz) wrote : | # |
On Sat, Mar 30, 2013 at 6:03 PM, Andrea Azzarone <email address hidden> wrote:
> Ok the PPA should be fine now. Alfred, can you check? Thanks!
>
> @Sam, how many lines of code?
Dunno, still working on it, could be fairly substantial.
I might just split it out.
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Alfred E. Neumayer (beidl) wrote : | # |
Yup, I should have told you guys that I'm using the PPA. Don't have enough time for compiling it from scratch atm.
And yes, updated the packages and scrolling is niiiice.
Andrea Azzarone (azzar1) wrote : | # |
@Alfred, nice! :) Can I ask you what graphic card are you using?
Andrea Azzarone (azzar1) : | # |
Sam Spilsbury (smspillaz) wrote : | # |
Cool.
We'll need to make sure to merge the other ones in order, otherwise
things will break.
On Sat, Mar 30, 2013 at 8:25 PM, Andrea Azzarone <email address hidden> wrote:
> Review: Approve
>
>
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
MC Return (mc-return) wrote : | # |
> review: Approve
Hurra \o/
> @Alfred, nice! :) Can I ask you what graphic card are you using?
I think he mentioned Intel HD 4000 above ^^
Sam Spilsbury (smspillaz) wrote : | # |
I've put the partial back-buffer-copy work into this branch: https:/
If you want me to merge it back into this one, just say so.
Alfred E. Neumayer (beidl) wrote : | # |
> > review: Approve
>
> Hurra \o/
>
> > @Alfred, nice! :) Can I ask you what graphic card are you using?
>
> I think he mentioned Intel HD 4000 above ^^
Intel HD 4000 as well as NVidia 640M LE through Bumblebee (those PRIME helper merges in one of the latest kernel revisions leave me wondering if we're going to see some nice Optimus action soon...)
Also, approve before it's too late :)
Andrea Azzarone (azzar1) wrote : | # |
Due to the imminent release we're going to merge this branch as soon as after the release.
MC Return (mc-return) wrote : | # |
> Due to the imminent release we're going to merge this branch as soon as after
> the release.
Andrea, will Compiz still be the default window manager for Unity in 13.10 ?
Sam Spilsbury (smspillaz) wrote : | # |
On Wed, Apr 3, 2013 at 7:36 PM, Andrea Azzarone <email address hidden> wrote:
> Due to the imminent release we're going to merge this branch as soon as after the release.
Hmm, by release do you mean beta freeze, the current unity release or 13.04?
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Sam Spilsbury (smspillaz) wrote : | # |
Okay, by "release" Andrea meant 13.04.
That's a real shame, considering that we had plenty of chances to get
this in before feature freeze. It was ready for review in December,
and resources were only allocated to doing so in March after feature
freeze.
I think product-strategy and distro need to have a serious talk about
how they handle these things, because the status of whether or not it
was actually going in has changed about 4 times now. I sense that the
communication lines have broken down somewhere, and the policy that is
being applied is not transparent at all.
If compiz and unity-legacy will not be the default shell in 13.10,
then this has resulted in a huge waste of a contributors time.
On Wed, Apr 3, 2013 at 8:20 PM, Sam Spilsbury <email address hidden> wrote:
> On Wed, Apr 3, 2013 at 7:36 PM, Andrea Azzarone <email address hidden> wrote:
>> Due to the imminent release we're going to merge this branch as soon as after the release.
>
> Hmm, by release do you mean beta freeze, the current unity release or 13.04?
>
>> --
>> https:/
>> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
>
>
>
> --
> Sam Spilsbury
>
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Andrea Azzarone (azzar1) wrote : | # |
> > Due to the imminent release we're going to merge this branch as soon as
> after
> > the release.
>
> Andrea, will Compiz still be the default window manager for Unity in 13.10 ?
We are not sure of the Unity Next state for 13.10.
Alfred E. Neumayer (beidl) wrote : | # |
> Okay, by "release" Andrea meant 13.04.
>
> That's a real shame, considering that we had plenty of chances to get
> this in before feature freeze. It was ready for review in December,
> and resources were only allocated to doing so in March after feature
> freeze.
>
> I think product-strategy and distro need to have a serious talk about
> how they handle these things, because the status of whether or not it
> was actually going in has changed about 4 times now. I sense that the
> communication lines have broken down somewhere, and the policy that is
> being applied is not transparent at all.
>
> If compiz and unity-legacy will not be the default shell in 13.10,
> then this has resulted in a huge waste of a contributors time.
>
> On Wed, Apr 3, 2013 at 8:20 PM, Sam Spilsbury <email address hidden> wrote:
> > On Wed, Apr 3, 2013 at 7:36 PM, Andrea Azzarone <email address hidden> wrote:
> >> Due to the imminent release we're going to merge this branch as soon as
> after the release.
> >
> > Hmm, by release do you mean beta freeze, the current unity release or 13.04?
> >
> >> --
> >>
> https:/
> >> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
> >
> >
> >
> > --
> > Sam Spilsbury
> >
> > --
> >
> https:/
> > You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
>
>
>
> --
> Sam Spilsbury
I couldn't agree more.
In the meantime, some really questionable changes have been made, literally days ago, which cause trouble in usability, and nobody even cares to look at my bug report.
Something is going wrong here.
Andrea Azzarone (azzar1) wrote : | # |
> > Okay, by "release" Andrea meant 13.04.
> >
> > That's a real shame, considering that we had plenty of chances to get
> > this in before feature freeze. It was ready for review in December,
> > and resources were only allocated to doing so in March after feature
> > freeze.
> >
> > I think product-strategy and distro need to have a serious talk about
> > how they handle these things, because the status of whether or not it
> > was actually going in has changed about 4 times now. I sense that the
> > communication lines have broken down somewhere, and the policy that is
> > being applied is not transparent at all.
> >
> > If compiz and unity-legacy will not be the default shell in 13.10,
> > then this has resulted in a huge waste of a contributors time.
> >
> > On Wed, Apr 3, 2013 at 8:20 PM, Sam Spilsbury <email address hidden> wrote:
> > > On Wed, Apr 3, 2013 at 7:36 PM, Andrea Azzarone <email address hidden>
> wrote:
> > >> Due to the imminent release we're going to merge this branch as soon as
> > after the release.
> > >
> > > Hmm, by release do you mean beta freeze, the current unity release or
> 13.04?
> > >
> > >> --
> > >>
> >
> https:/
> > >> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
> > >
> > >
> > >
> > > --
> > > Sam Spilsbury
> > >
> > > --
> > >
> >
> https:/
> > > You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
> >
> >
> >
> > --
> > Sam Spilsbury
>
> I couldn't agree more.
> In the meantime, some really questionable changes have been made, literally
> days ago, which cause trouble in usability, and nobody even cares to look at
> my bug report.
> Something is going wrong here.
What changes? Link to bug report?
Alfred E. Neumayer (beidl) wrote : | # |
> > > Okay, by "release" Andrea meant 13.04.
> > >
> > > That's a real shame, considering that we had plenty of chances to get
> > > this in before feature freeze. It was ready for review in December,
> > > and resources were only allocated to doing so in March after feature
> > > freeze.
> > >
> > > I think product-strategy and distro need to have a serious talk about
> > > how they handle these things, because the status of whether or not it
> > > was actually going in has changed about 4 times now. I sense that the
> > > communication lines have broken down somewhere, and the policy that is
> > > being applied is not transparent at all.
> > >
> > > If compiz and unity-legacy will not be the default shell in 13.10,
> > > then this has resulted in a huge waste of a contributors time.
> > >
> > > On Wed, Apr 3, 2013 at 8:20 PM, Sam Spilsbury <email address hidden> wrote:
> > > > On Wed, Apr 3, 2013 at 7:36 PM, Andrea Azzarone <email address hidden>
> > wrote:
> > > >> Due to the imminent release we're going to merge this branch as soon as
> > > after the release.
> > > >
> > > > Hmm, by release do you mean beta freeze, the current unity release or
> > 13.04?
> > > >
> > > >> --
> > > >>
> > >
> >
> https:/
> > > >> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
> > > >
> > > >
> > > >
> > > > --
> > > > Sam Spilsbury
> > > >
> > > > --
> > > >
> > >
> >
> https:/
> > > > You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
> > >
> > >
> > >
> > > --
> > > Sam Spilsbury
> >
> > I couldn't agree more.
> > In the meantime, some really questionable changes have been made, literally
> > days ago, which cause trouble in usability, and nobody even cares to look at
> > my bug report.
> > Something is going wrong here.
>
> What changes? Link to bug report?
Link to the bug report: https:/
The change was specific to the Unity plugin itself, but my point is,
there is this half-done (even though it's a good start) feature that got merged in,
but then these much needed performance improvements get postponed.
It's little confusing to me, a passionate user and promoter of Ubuntu.
(I wished I had enough time digging into C++ and compositors to little more to help out, but I'm just a stupid managed code developer ^^)
But as i can see, Andrea already took care of that bug. :)
MC Return (mc-return) wrote : | # |
> Okay, by "release" Andrea meant 13.04.
>
> That's a real shame, considering that we had plenty of chances to get
> this in before feature freeze. It was ready for review in December,
> and resources were only allocated to doing so in March after feature
> freeze.
>
Something is definitely wrong if MPs of core components do not get looked
at, tested and reviewed in time.
This just tells the contributor: Go away, we have enough work to do without
you - do not try to fix bugs, you are just creating more work for us.
But maybe this is exactly the message someone wants to get across ?
> I think product-strategy and distro need to have a serious talk about
> how they handle these things, because the status of whether or not it
> was actually going in has changed about 4 times now. I sense that the
> communication lines have broken down somewhere, and the policy that is
> being applied is not transparent at all.
>
Well that is definitely true also, but has been that way for some time:
Take a look at Compiz product strategy. First, main priority was to get it
compatible to GLES in 12.10, no matter how finished this port is and no
matter how much core functionality and plugins get broken by that.
Now main priority seems to be to deprecate X/Compiz and replace it with
Mir/Unity-QML, which is another thing that can only come with a ton of
regressions attached and the desktop will be severely hurt with this
move - but hey - we get a cellphone system for the desktop instead ;(
The problem seems to be that people making technical decisions do not
seem to have any idea about the technology they try to decide on...
But I guess all other big companies must be crazy to make different
systems for cell phones and desktop PCs...
> If compiz and unity-legacy will not be the default shell in 13.10,
> then this has resulted in a huge waste of a contributors time.
>
One contributor's time ?
Sam Spilsbury (smspillaz) wrote : | # |
Oops, I didn't mean to turn this into a debate.
The conversation needs to be had between product-strategy and distro
as to how they are going to handle communication better, but this is a
very specific topic.
On Thu, Apr 4, 2013 at 12:44 PM, MC Return <email address hidden> wrote:
>> Okay, by "release" Andrea meant 13.04.
>>
>> That's a real shame, considering that we had plenty of chances to get
>> this in before feature freeze. It was ready for review in December,
>> and resources were only allocated to doing so in March after feature
>> freeze.
>>
> Something is definitely wrong if MPs of core components do not get looked
> at, tested and reviewed in time.
> This just tells the contributor: Go away, we have enough work to do without
> you - do not try to fix bugs, you are just creating more work for us.
>
> But maybe this is exactly the message someone wants to get across ?
>
>> I think product-strategy and distro need to have a serious talk about
>> how they handle these things, because the status of whether or not it
>> was actually going in has changed about 4 times now. I sense that the
>> communication lines have broken down somewhere, and the policy that is
>> being applied is not transparent at all.
>>
> Well that is definitely true also, but has been that way for some time:
> Take a look at Compiz product strategy. First, main priority was to get it
> compatible to GLES in 12.10, no matter how finished this port is and no
> matter how much core functionality and plugins get broken by that.
>
> Now main priority seems to be to deprecate X/Compiz and replace it with
> Mir/Unity-QML, which is another thing that can only come with a ton of
> regressions attached and the desktop will be severely hurt with this
> move - but hey - we get a cellphone system for the desktop instead ;(
>
> The problem seems to be that people making technical decisions do not
> seem to have any idea about the technology they try to decide on...
>
> But I guess all other big companies must be crazy to make different
> systems for cell phones and desktop PCs...
>
>> If compiz and unity-legacy will not be the default shell in 13.10,
>> then this has resulted in a huge waste of a contributors time.
>>
> One contributor's time ?
>
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Esokrates (esokrarkose) wrote : | # |
This problem only happens using this branch together with the compiz branch and nvidia drivers (all tested versions):
Logging in one of the tty’s (e.g.: Ctrl + Alt + F1) run a command so that the screen gets filled up (for example find) and switch back (e.g. Ctrl + Alt + F7) then the panel and launcher look like this:
http://
http://
(Sometimes it is not even necessary to log in or run a command)
Sam Spilsbury (smspillaz) wrote : | # |
> This problem only happens using this branch together with the compiz branch
> and nvidia drivers (all tested versions):
> Logging in one of the tty’s (e.g.: Ctrl + Alt + F1) run a command so that the
> screen gets filled up (for example find) and switch back (e.g. Ctrl + Alt +
> F7) then the panel and launcher look like this:
> http://
> http://
> (Sometimes it is not even necessary to log in or run a command)
Hi,
The nvidia drivers are known to trash framebuffer objects upon VT switches. Sometimes we run into this condition, sometimes we don't. There's not much we can do about it.
Sam Spilsbury (smspillaz) wrote : | # |
Okay, so I've talked to Didier about this and we've come up with a small plan of action. We'll need to give this a week solid of QA at the beginning of the S cycle and then make sure that we don't have any AP regressions. That'll happen in about two weeks.
MC Return (mc-return) wrote : | # |
> Okay, so I've talked to Didier about this and we've come up with a small plan
> of action. We'll need to give this a week solid of QA at the beginning of the
> S cycle and then make sure that we don't have any AP regressions. That'll
> happen in about two weeks.
\o/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3259
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3260
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> This problem only happens using this branch together with the compiz branch
> and nvidia drivers (all tested versions):
> Logging in one of the tty’s (e.g.: Ctrl + Alt + F1) run a command so that the
> screen gets filled up (for example find) and switch back (e.g. Ctrl + Alt +
> F7) then the panel and launcher look like this:
> http://
> http://
> (Sometimes it is not even necessary to log in or run a command)
Mh, this is something we need to fix or workaround this in any way, or we'll get a regression for bug #915265, and we don't want that at all! :/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3261
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Sam Spilsbury (smspillaz) wrote : | # |
Is there a udev event that happens on VT switching?
On Mon, Apr 15, 2013 at 9:10 PM, Marco Trevisan (Treviño)
<mail@3v1n0.net> wrote:
>> This problem only happens using this branch together with the compiz branch
>> and nvidia drivers (all tested versions):
>> Logging in one of the tty’s (e.g.: Ctrl + Alt + F1) run a command so that the
>> screen gets filled up (for example find) and switch back (e.g. Ctrl + Alt +
>> F7) then the panel and launcher look like this:
>> http://
>> http://
>> (Sometimes it is not even necessary to log in or run a command)
>
> Mh, this is something we need to fix or workaround this in any way, or we'll get a regression for bug #915265, and we don't want that at all! :/
> --
> https:/
> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
--
Sam Spilsbury
Sam Spilsbury (smspillaz) wrote : | # |
Actually, nevermind. I can see why this would happen.
We'll just need to QueueDraw () everything on a VT switch - we used to
QueueDraw () a little overzealously before which would effectively
mask the presence of this problem. Easy enough to do, I'll see if I
can do it tonight.
On Mon, Apr 15, 2013 at 10:30 PM, Sam Spilsbury <email address hidden> wrote:
> Is there a udev event that happens on VT switching?
>
> On Mon, Apr 15, 2013 at 9:10 PM, Marco Trevisan (Treviño)
> <mail@3v1n0.net> wrote:
>>> This problem only happens using this branch together with the compiz branch
>>> and nvidia drivers (all tested versions):
>>> Logging in one of the tty’s (e.g.: Ctrl + Alt + F1) run a command so that the
>>> screen gets filled up (for example find) and switch back (e.g. Ctrl + Alt +
>>> F7) then the panel and launcher look like this:
>>> http://
>>> http://
>>> (Sometimes it is not even necessary to log in or run a command)
>>
>> Mh, this is something we need to fix or workaround this in any way, or we'll get a regression for bug #915265, and we don't want that at all! :/
>> --
>> https:/
>> You are the owner of lp:~smspillaz/unity/unity.fix_1080947.2.
>
>
>
> --
> Sam Spilsbury
--
Sam Spilsbury
Sam Spilsbury (smspillaz) wrote : | # |
I've noticed that there's a slight race condition that can happen where override redirect windows don't seem to get added to past damage buffers.
Also I think there is a little bit of scope to get some of this code into unit tests, so its worth trying.
Preview Diff
1 | === modified file 'dash/DashView.cpp' | |||
2 | --- dash/DashView.cpp 2013-04-12 16:01:19 +0000 | |||
3 | +++ dash/DashView.cpp 2013-05-03 22:55:31 +0000 | |||
4 | @@ -754,8 +754,6 @@ | |||
5 | 754 | nux::GetPainter().PopBackgroundStack(); | 754 | nux::GetPainter().PopBackgroundStack(); |
6 | 755 | } | 755 | } |
7 | 756 | 756 | ||
8 | 757 | overlay_window_buttons_->QueueDraw(); | ||
9 | 758 | |||
10 | 759 | graphics_engine.PopClippingRectangle(); | 757 | graphics_engine.PopClippingRectangle(); |
11 | 760 | 758 | ||
12 | 761 | renderer_.DrawInnerCleanup(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo); | 759 | renderer_.DrawInnerCleanup(graphics_engine, content_geo_, renderer_geo_abs, renderer_geo); |
13 | 762 | 760 | ||
14 | === modified file 'launcher/XdndCollectionWindowImp.cpp' | |||
15 | --- launcher/XdndCollectionWindowImp.cpp 2013-04-11 05:15:36 +0000 | |||
16 | +++ launcher/XdndCollectionWindowImp.cpp 2013-05-03 22:55:31 +0000 | |||
17 | @@ -38,6 +38,10 @@ | |||
18 | 38 | auto uscreen = UScreen::GetDefault(); | 38 | auto uscreen = UScreen::GetDefault(); |
19 | 39 | SetGeometry(uscreen->GetScreenGeometry()); | 39 | SetGeometry(uscreen->GetScreenGeometry()); |
20 | 40 | 40 | ||
21 | 41 | // We are not calling ShowWindow () as this window | ||
22 | 42 | // isn't really visible | ||
23 | 43 | PushToBack(); | ||
24 | 44 | |||
25 | 41 | if (nux::GetWindowThread()->IsEmbeddedWindow()) | 45 | if (nux::GetWindowThread()->IsEmbeddedWindow()) |
26 | 42 | { | 46 | { |
27 | 43 | // Hack to create the X Window as soon as possible. | 47 | // Hack to create the X Window as soon as possible. |
28 | 44 | 48 | ||
29 | === modified file 'plugins/unityshell/src/unityshell.cpp' | |||
30 | --- plugins/unityshell/src/unityshell.cpp 2013-04-23 16:59:52 +0000 | |||
31 | +++ plugins/unityshell/src/unityshell.cpp 2013-05-03 22:55:31 +0000 | |||
32 | @@ -79,6 +79,8 @@ | |||
33 | 79 | /* Set up vtable symbols */ | 79 | /* Set up vtable symbols */ |
34 | 80 | COMPIZ_PLUGIN_20090315(unityshell, unity::UnityPluginVTable); | 80 | COMPIZ_PLUGIN_20090315(unityshell, unity::UnityPluginVTable); |
35 | 81 | 81 | ||
36 | 82 | namespace cgl = compiz::opengl; | ||
37 | 83 | |||
38 | 82 | namespace unity | 84 | namespace unity |
39 | 83 | { | 85 | { |
40 | 84 | using namespace launcher; | 86 | using namespace launcher; |
41 | @@ -140,6 +142,7 @@ | |||
42 | 140 | , allowWindowPaint(false) | 142 | , allowWindowPaint(false) |
43 | 141 | , _key_nav_mode_requested(false) | 143 | , _key_nav_mode_requested(false) |
44 | 142 | , _last_output(nullptr) | 144 | , _last_output(nullptr) |
45 | 145 | , force_draw_countdown_ (0) | ||
46 | 143 | , grab_index_ (0) | 146 | , grab_index_ (0) |
47 | 144 | , painting_tray_ (false) | 147 | , painting_tray_ (false) |
48 | 145 | , last_scroll_event_(0) | 148 | , last_scroll_event_(0) |
49 | @@ -149,6 +152,9 @@ | |||
50 | 149 | , scale_just_activated_(false) | 152 | , scale_just_activated_(false) |
51 | 150 | , big_tick_(0) | 153 | , big_tick_(0) |
52 | 151 | , screen_introspection_(screen) | 154 | , screen_introspection_(screen) |
53 | 155 | , ignore_redraw_request_(false) | ||
54 | 156 | , dirty_helpers_on_this_frame_(false) | ||
55 | 157 | , back_buffer_age_(0) | ||
56 | 152 | { | 158 | { |
57 | 153 | Timer timer; | 159 | Timer timer; |
58 | 154 | #ifndef USE_GLES | 160 | #ifndef USE_GLES |
59 | @@ -403,6 +409,11 @@ | |||
60 | 403 | XSelectInput(display, GDK_ROOT_WINDOW(), PropertyChangeMask); | 409 | XSelectInput(display, GDK_ROOT_WINDOW(), PropertyChangeMask); |
61 | 404 | LOG_INFO(logger) << "UnityScreen constructed: " << timer.ElapsedSeconds() << "s"; | 410 | LOG_INFO(logger) << "UnityScreen constructed: " << timer.ElapsedSeconds() << "s"; |
62 | 405 | 411 | ||
63 | 412 | UScreen::GetDefault()->resuming.connect([this]() { | ||
64 | 413 | /* Force paint 10 frames on resume */ | ||
65 | 414 | this->force_draw_countdown_ += 10; | ||
66 | 415 | }); | ||
67 | 416 | |||
68 | 406 | panel::Style::Instance().changed.connect(sigc::mem_fun(this, &UnityScreen::OnPanelStyleChanged)); | 417 | panel::Style::Instance().changed.connect(sigc::mem_fun(this, &UnityScreen::OnPanelStyleChanged)); |
69 | 407 | 418 | ||
70 | 408 | minimize_speed_controller_.DurationChanged.connect( | 419 | minimize_speed_controller_.DurationChanged.connect( |
71 | @@ -412,8 +423,13 @@ | |||
72 | 412 | WindowManager& wm = WindowManager::Default(); | 423 | WindowManager& wm = WindowManager::Default(); |
73 | 413 | wm.initiate_spread.connect(sigc::mem_fun(this, &UnityScreen::OnInitiateSpread)); | 424 | wm.initiate_spread.connect(sigc::mem_fun(this, &UnityScreen::OnInitiateSpread)); |
74 | 414 | wm.terminate_spread.connect(sigc::mem_fun(this, &UnityScreen::OnTerminateSpread)); | 425 | wm.terminate_spread.connect(sigc::mem_fun(this, &UnityScreen::OnTerminateSpread)); |
75 | 426 | wm.initiate_expo.connect(sigc::mem_fun(this, &UnityScreen::DamagePanelShadow)); | ||
76 | 427 | wm.terminate_expo.connect(sigc::mem_fun(this, &UnityScreen::DamagePanelShadow)); | ||
77 | 415 | 428 | ||
78 | 416 | AddChild(&screen_introspection_); | 429 | AddChild(&screen_introspection_); |
79 | 430 | |||
80 | 431 | /* Track whole damage on the very first frame */ | ||
81 | 432 | cScreen->damageScreen(); | ||
82 | 417 | } | 433 | } |
83 | 418 | } | 434 | } |
84 | 419 | 435 | ||
85 | @@ -488,6 +504,27 @@ | |||
86 | 488 | UnityWindow::CleanupSharedTextures(); | 504 | UnityWindow::CleanupSharedTextures(); |
87 | 489 | } | 505 | } |
88 | 490 | 506 | ||
89 | 507 | void UnityScreen::DamagePanelShadow() | ||
90 | 508 | { | ||
91 | 509 | CompRect panelShadow; | ||
92 | 510 | |||
93 | 511 | for (CompOutput const& output : screen->outputDevs()) | ||
94 | 512 | { | ||
95 | 513 | FillShadowRectForOutput(panelShadow, output); | ||
96 | 514 | cScreen->damageRegion(CompRegion(panelShadow)); | ||
97 | 515 | } | ||
98 | 516 | } | ||
99 | 517 | |||
100 | 518 | void UnityScreen::OnViewHidden(nux::BaseWindow *bw) | ||
101 | 519 | { | ||
102 | 520 | /* Count this as regular damage */ | ||
103 | 521 | nux::Geometry geometry(bw->GetAbsoluteGeometry()); | ||
104 | 522 | cScreen->damageRegion(CompRegion (geometry.x, | ||
105 | 523 | geometry.y, | ||
106 | 524 | geometry.width, | ||
107 | 525 | geometry.height)); | ||
108 | 526 | } | ||
109 | 527 | |||
110 | 491 | void UnityScreen::EnsureSuperKeybindings() | 528 | void UnityScreen::EnsureSuperKeybindings() |
111 | 492 | { | 529 | { |
112 | 493 | for (auto action : _shortcut_actions) | 530 | for (auto action : _shortcut_actions) |
113 | @@ -579,6 +616,20 @@ | |||
114 | 579 | panel_shadow_matrix_ = matrix; | 616 | panel_shadow_matrix_ = matrix; |
115 | 580 | } | 617 | } |
116 | 581 | 618 | ||
117 | 619 | void UnityScreen::FillShadowRectForOutput(CompRect &shadowRect, | ||
118 | 620 | CompOutput const &output) | ||
119 | 621 | { | ||
120 | 622 | if (_shadow_texture.empty ()) | ||
121 | 623 | return; | ||
122 | 624 | |||
123 | 625 | float panel_h = static_cast<float>(panel_style_.panel_height); | ||
124 | 626 | float shadowX = output.x(); | ||
125 | 627 | float shadowY = output.y() + panel_h; | ||
126 | 628 | float shadowWidth = output.width(); | ||
127 | 629 | float shadowHeight = _shadow_texture[0]->height(); | ||
128 | 630 | shadowRect.setGeometry(shadowX, shadowY, shadowWidth, shadowHeight); | ||
129 | 631 | } | ||
130 | 632 | |||
131 | 582 | void UnityScreen::paintPanelShadow(CompRegion const& clip) | 633 | void UnityScreen::paintPanelShadow(CompRegion const& clip) |
132 | 583 | { | 634 | { |
133 | 584 | // You have no shadow texture. But how? | 635 | // You have no shadow texture. But how? |
134 | @@ -606,11 +657,8 @@ | |||
135 | 606 | return; | 657 | return; |
136 | 607 | } | 658 | } |
137 | 608 | 659 | ||
143 | 609 | int shadowX = output->x(); | 660 | CompRect shadowRect; |
144 | 610 | int shadowY = output->y() + panel_style_.panel_height; | 661 | FillShadowRectForOutput(shadowRect, *output); |
140 | 611 | int shadowWidth = output->width(); | ||
141 | 612 | int shadowHeight = _shadow_texture[0]->height(); | ||
142 | 613 | CompRect shadowRect(shadowX, shadowY, shadowWidth, shadowHeight); | ||
145 | 614 | 662 | ||
146 | 615 | CompRegion redraw(clip); | 663 | CompRegion redraw(clip); |
147 | 616 | redraw &= shadowRect; | 664 | redraw &= shadowRect; |
148 | @@ -650,10 +698,10 @@ | |||
149 | 650 | float y2 = r.y2(); | 698 | float y2 = r.y2(); |
150 | 651 | 699 | ||
151 | 652 | // Texture coordinates of the above rectangle: | 700 | // Texture coordinates of the above rectangle: |
156 | 653 | float tx1 = (x1 - shadowX) / shadowWidth; | 701 | float tx1 = (x1 - shadowRect.x()) / shadowRect.width(); |
157 | 654 | float ty1 = (y1 - shadowY) / shadowHeight; | 702 | float ty1 = (y1 - shadowRect.y()) / shadowRect.height(); |
158 | 655 | float tx2 = (x2 - shadowX) / shadowWidth; | 703 | float tx2 = (x2 - shadowRect.x()) / shadowRect.width(); |
159 | 656 | float ty2 = (y2 - shadowY) / shadowHeight; | 704 | float ty2 = (y2 - shadowRect.y()) / shadowRect.height(); |
160 | 657 | 705 | ||
161 | 658 | vertexData = { | 706 | vertexData = { |
162 | 659 | x1, y1, 0, | 707 | x1, y1, 0, |
163 | @@ -717,25 +765,37 @@ | |||
164 | 717 | 765 | ||
165 | 718 | DrawPanelUnderDash(); | 766 | DrawPanelUnderDash(); |
166 | 719 | 767 | ||
168 | 720 | if (BackgroundEffectHelper::HasDirtyHelpers()) | 768 | /* Bind the currently bound draw framebuffer to the read framebuffer binding. |
169 | 769 | * The reason being that we want to use the results of nux images being | ||
170 | 770 | * drawn to this framebuffer in glCopyTexSubImage2D operations */ | ||
171 | 771 | GLint current_draw_binding, old_read_binding; | ||
172 | 772 | #ifndef USE_GLES | ||
173 | 773 | glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING_EXT, &old_read_binding); | ||
174 | 774 | glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING_EXT, ¤t_draw_binding); | ||
175 | 775 | if (old_read_binding != current_draw_binding) | ||
176 | 776 | (*GL::bindFramebuffer) (GL_READ_FRAMEBUFFER_BINDING_EXT, current_draw_binding); | ||
177 | 777 | #endif | ||
178 | 778 | |||
179 | 779 | /* If we have dirty helpers re-copy the backbuffer | ||
180 | 780 | * into a texture | ||
181 | 781 | * | ||
182 | 782 | * TODO: Make this faster by only copying the bits we | ||
183 | 783 | * need as opposed to the whole readbuffer */ | ||
184 | 784 | if (dirty_helpers_on_this_frame_) | ||
185 | 721 | { | 785 | { |
186 | 722 | auto gpu_device = nux::GetGraphicsDisplay()->GetGpuDevice(); | 786 | auto gpu_device = nux::GetGraphicsDisplay()->GetGpuDevice(); |
187 | 723 | auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); | 787 | auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine(); |
194 | 724 | 788 | gpu_device->backup_texture0_ = | |
195 | 725 | nux::ObjectPtr<nux::IOpenGLTexture2D> bg_texture = | 789 | graphics_engine->CreateTextureFromBackBuffer(0, 0, screen->width(), screen->height()); |
196 | 726 | graphics_engine->CreateTextureFromBackBuffer(0, 0, | 790 | back_buffer_age_ = 0; |
191 | 727 | screen->width(), | ||
192 | 728 | screen->height()); | ||
193 | 729 | gpu_device->backup_texture0_ = bg_texture; | ||
197 | 730 | } | 791 | } |
198 | 731 | 792 | ||
199 | 732 | nux::Geometry outputGeo(output->x (), output->y (), output->width (), output->height ()); | 793 | nux::Geometry outputGeo(output->x (), output->y (), output->width (), output->height ()); |
200 | 733 | BackgroundEffectHelper::monitor_rect_.Set(0, 0, screen->width(), screen->height()); | 794 | BackgroundEffectHelper::monitor_rect_.Set(0, 0, screen->width(), screen->height()); |
201 | 734 | 795 | ||
206 | 735 | GLint fboID; | 796 | wt->GetWindowCompositor().SetReferenceFramebuffer(current_draw_binding, |
207 | 736 | // Nux renders to the referenceFramebuffer when it's embedded. | 797 | old_read_binding, |
208 | 737 | glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fboID); | 798 | outputGeo); |
205 | 738 | wt->GetWindowCompositor().SetReferenceFramebuffer(fboID, outputGeo); | ||
209 | 739 | 799 | ||
210 | 740 | nuxPrologue(); | 800 | nuxPrologue(); |
211 | 741 | wt->RenderInterfaceFromForeignCmd (&outputGeo); | 801 | wt->RenderInterfaceFromForeignCmd (&outputGeo); |
212 | @@ -1223,6 +1283,7 @@ | |||
213 | 1223 | doShellRepaint = force || | 1283 | doShellRepaint = force || |
214 | 1224 | ( !region.isEmpty() && | 1284 | ( !region.isEmpty() && |
215 | 1225 | ( !wt->GetDrawList().empty() || | 1285 | ( !wt->GetDrawList().empty() || |
216 | 1286 | !wt->GetPresentationListGeometries().empty() || | ||
217 | 1226 | (mask & PAINT_SCREEN_FULL_MASK) | 1287 | (mask & PAINT_SCREEN_FULL_MASK) |
218 | 1227 | ) | 1288 | ) |
219 | 1228 | ); | 1289 | ); |
220 | @@ -1258,10 +1319,143 @@ | |||
221 | 1258 | unsigned int mask) | 1319 | unsigned int mask) |
222 | 1259 | { | 1320 | { |
223 | 1260 | allowWindowPaint = false; | 1321 | allowWindowPaint = false; |
224 | 1322 | |||
225 | 1323 | /* PAINT_SCREEN_FULL_MASK means that we are ignoring the damage | ||
226 | 1324 | * region and redrawing the whole screen, so we should make all | ||
227 | 1325 | * nux windows be added to the presentation list that intersect | ||
228 | 1326 | * this output. | ||
229 | 1327 | * | ||
230 | 1328 | * However, damaging nux has a side effect of notifying compiz | ||
231 | 1329 | * through onRedrawRequested that we need to queue another frame. | ||
232 | 1330 | * In most cases that would be desirable, and in the case where | ||
233 | 1331 | * we did that in damageCutoff, it would not be a problem as compiz | ||
234 | 1332 | * does not queue up new frames for damage that can be processed | ||
235 | 1333 | * on the current frame. However, we're now past damage cutoff, but | ||
236 | 1334 | * a change in circumstances has required that we redraw all the nux | ||
237 | 1335 | * windows on this frame. As such, we need to ensure that damagePending | ||
238 | 1336 | * is not called as a result of queuing windows for redraw, as that | ||
239 | 1337 | * would effectively result in a damage feedback loop in plugins that | ||
240 | 1338 | * require screen transformations (eg, new frame -> plugin redraws full | ||
241 | 1339 | * screen -> we reach this point and request another redraw implicitly) | ||
242 | 1340 | */ | ||
243 | 1341 | if (mask & PAINT_SCREEN_FULL_MASK) | ||
244 | 1342 | { | ||
245 | 1343 | ignore_redraw_request_ = true; | ||
246 | 1344 | compizDamageNux(CompRegionRef(output->region())); | ||
247 | 1345 | ignore_redraw_request_ = false; | ||
248 | 1346 | |||
249 | 1347 | /* Fetch all the presentation list geometries - this will have the side | ||
250 | 1348 | * effect of clearing any built-up damage state */ | ||
251 | 1349 | std::vector<nux::Geometry> dirty = wt->GetPresentationListGeometries(); | ||
252 | 1350 | } | ||
253 | 1351 | |||
254 | 1261 | gScreen->glPaintTransformedOutput(attrib, transform, region, output, mask); | 1352 | gScreen->glPaintTransformedOutput(attrib, transform, region, output, mask); |
255 | 1262 | paintPanelShadow(region); | 1353 | paintPanelShadow(region); |
256 | 1263 | } | 1354 | } |
257 | 1264 | 1355 | ||
258 | 1356 | void UnityScreen::updateBlurDamage() | ||
259 | 1357 | { | ||
260 | 1358 | /* If there are enabled helpers, we want to apply damage | ||
261 | 1359 | * based on how old our tracking fbo is since we may need | ||
262 | 1360 | * to redraw some of the blur regions if there has been | ||
263 | 1361 | * damage since we last bound it | ||
264 | 1362 | * | ||
265 | 1363 | * XXX: Unfortunately there's a nasty feedback loop here, and not | ||
266 | 1364 | * a whole lot we can do about it. If part of the damage from any frame | ||
267 | 1365 | * intersects a nux window, we have to mark the entire region that the | ||
268 | 1366 | * nux window covers as damaged, because nux does not have any concept | ||
269 | 1367 | * of geometry clipping. That damage will feed back to us on the next frame. | ||
270 | 1368 | */ | ||
271 | 1369 | if (BackgroundEffectHelper::HasEnabledHelpers()) | ||
272 | 1370 | { | ||
273 | 1371 | cScreen->applyDamageForFrameAge (back_buffer_age_); | ||
274 | 1372 | |||
275 | 1373 | /* | ||
276 | 1374 | * Prioritise user interaction over active blur updates. So the general | ||
277 | 1375 | * slowness of the active blur doesn't affect the UI interaction performance. | ||
278 | 1376 | * | ||
279 | 1377 | * Also, BackgroundEffectHelper::ProcessDamage() is causing a feedback loop | ||
280 | 1378 | * while the dash is open. Calling it results in the NEXT frame (and the | ||
281 | 1379 | * current one?) to get some damage. This GetDrawList().empty() check avoids | ||
282 | 1380 | * that feedback loop and allows us to idle correctly. | ||
283 | 1381 | * | ||
284 | 1382 | * We are doing damage processing for the blurs here, as this represents | ||
285 | 1383 | * the most up to date compiz damage under the nux windows. | ||
286 | 1384 | */ | ||
287 | 1385 | if (wt->GetDrawList().empty()) | ||
288 | 1386 | { | ||
289 | 1387 | CompRect::vector const& rects(buffered_compiz_damage_this_frame_.rects()); | ||
290 | 1388 | for (CompRect const& r : rects) | ||
291 | 1389 | { | ||
292 | 1390 | nux::Geometry geo(r.x(), r.y(), r.width(), r.height()); | ||
293 | 1391 | BackgroundEffectHelper::ProcessDamage(geo); | ||
294 | 1392 | } | ||
295 | 1393 | } | ||
296 | 1394 | } | ||
297 | 1395 | } | ||
298 | 1396 | |||
299 | 1397 | void UnityScreen::damageCutoff() | ||
300 | 1398 | { | ||
301 | 1399 | if (force_draw_countdown_) | ||
302 | 1400 | { | ||
303 | 1401 | typedef nux::WindowCompositor::WeakBaseWindowPtr WeakBaseWindowPtr; | ||
304 | 1402 | |||
305 | 1403 | /* We have to force-redraw the whole scene because | ||
306 | 1404 | * if a bug in the nvidia driver that causes framebuffers | ||
307 | 1405 | * to be trashed on resume for a few swaps */ | ||
308 | 1406 | wt->GetWindowCompositor () | ||
309 | 1407 | .OnAllBaseWindows ([](WeakBaseWindowPtr const &w) { | ||
310 | 1408 | w->QueueDraw (); | ||
311 | 1409 | }); | ||
312 | 1410 | |||
313 | 1411 | force_draw_countdown_--; | ||
314 | 1412 | } | ||
315 | 1413 | |||
316 | 1414 | /* At this point we want to take all of the compiz damage | ||
317 | 1415 | * for this frame and use it to determine which blur regions | ||
318 | 1416 | * need to be redrawn. We don't want to do this any later because | ||
319 | 1417 | * the nux damage is logically on top of the blurs and doesn't | ||
320 | 1418 | * affect them */ | ||
321 | 1419 | updateBlurDamage(); | ||
322 | 1420 | |||
323 | 1421 | /* Determine nux region damage last */ | ||
324 | 1422 | cScreen->damageCutoff(); | ||
325 | 1423 | |||
326 | 1424 | CompRegion damage_buffer, last_damage_buffer; | ||
327 | 1425 | |||
328 | 1426 | do | ||
329 | 1427 | { | ||
330 | 1428 | last_damage_buffer = damage_buffer; | ||
331 | 1429 | |||
332 | 1430 | /* First apply any damage accumulated to nux to see | ||
333 | 1431 | * what windows need to be redrawn there */ | ||
334 | 1432 | compizDamageNux(buffered_compiz_damage_this_frame_); | ||
335 | 1433 | |||
336 | 1434 | /* Apply the redraw regions to compiz so that we can | ||
337 | 1435 | * draw this frame with that region included */ | ||
338 | 1436 | determineNuxDamage(damage_buffer); | ||
339 | 1437 | |||
340 | 1438 | /* We want to track the nux damage here as we will use it to | ||
341 | 1439 | * determine if we need to present other nux windows too */ | ||
342 | 1440 | cScreen->damageRegion(damage_buffer); | ||
343 | 1441 | |||
344 | 1442 | /* If we had to put more damage into the damage buffer then | ||
345 | 1443 | * damage compiz with it and keep going */ | ||
346 | 1444 | } while (last_damage_buffer != damage_buffer); | ||
347 | 1445 | |||
348 | 1446 | /* Clear damage buffer */ | ||
349 | 1447 | buffered_compiz_damage_last_frame_ = buffered_compiz_damage_this_frame_; | ||
350 | 1448 | buffered_compiz_damage_this_frame_ = CompRegion(); | ||
351 | 1449 | |||
352 | 1450 | /* Tell nux that any damaged windows should be redrawn on the next | ||
353 | 1451 | * frame and not this one */ | ||
354 | 1452 | wt->ForeignFrameCutoff(); | ||
355 | 1453 | |||
356 | 1454 | /* We need to track this per-frame to figure out whether or not | ||
357 | 1455 | * to bind the contents fbo on each monitor pass */ | ||
358 | 1456 | dirty_helpers_on_this_frame_ = BackgroundEffectHelper::HasDirtyHelpers(); | ||
359 | 1457 | } | ||
360 | 1458 | |||
361 | 1265 | void UnityScreen::preparePaint(int ms) | 1459 | void UnityScreen::preparePaint(int ms) |
362 | 1266 | { | 1460 | { |
363 | 1267 | cScreen->preparePaint(ms); | 1461 | cScreen->preparePaint(ms); |
364 | @@ -1275,8 +1469,6 @@ | |||
365 | 1275 | didShellRepaint = false; | 1469 | didShellRepaint = false; |
366 | 1276 | panelShadowPainted = CompRegion(); | 1470 | panelShadowPainted = CompRegion(); |
367 | 1277 | firstWindowAboveShell = NULL; | 1471 | firstWindowAboveShell = NULL; |
368 | 1278 | |||
369 | 1279 | compizDamageNux(cScreen->currentDamage()); | ||
370 | 1280 | } | 1472 | } |
371 | 1281 | 1473 | ||
372 | 1282 | void UnityScreen::donePaint() | 1474 | void UnityScreen::donePaint() |
373 | @@ -1290,11 +1482,22 @@ | |||
374 | 1290 | * I think this is a Nux bug. ClearDrawList should ideally also mark all | 1482 | * I think this is a Nux bug. ClearDrawList should ideally also mark all |
375 | 1291 | * the queued views as draw_cmd_queued_=false. | 1483 | * the queued views as draw_cmd_queued_=false. |
376 | 1292 | */ | 1484 | */ |
377 | 1485 | |||
378 | 1486 | /* To prevent any potential overflow problems, we are assuming here | ||
379 | 1487 | * that compiz caps the maximum number of frames tracked at 10, so | ||
380 | 1488 | * don't increment the age any more than 11 */ | ||
381 | 1489 | if (back_buffer_age_ < 11) | ||
382 | 1490 | ++back_buffer_age_; | ||
383 | 1491 | |||
384 | 1293 | if (didShellRepaint) | 1492 | if (didShellRepaint) |
385 | 1294 | wt->ClearDrawList(); | 1493 | wt->ClearDrawList(); |
386 | 1295 | 1494 | ||
387 | 1495 | /* Tell nux that a new frame is now beginning and any damaged windows should | ||
388 | 1496 | * now be painted on this frame */ | ||
389 | 1497 | wt->ForeignFrameEnded(); | ||
390 | 1498 | |||
391 | 1296 | if (animation_controller_->HasRunningAnimations()) | 1499 | if (animation_controller_->HasRunningAnimations()) |
393 | 1297 | nuxDamageCompiz(); | 1500 | onRedrawRequested(); |
394 | 1298 | 1501 | ||
395 | 1299 | std::list <ShowdesktopHandlerWindowInterface *> remove_windows; | 1502 | std::list <ShowdesktopHandlerWindowInterface *> remove_windows; |
396 | 1300 | 1503 | ||
397 | @@ -1318,124 +1521,50 @@ | |||
398 | 1318 | 1521 | ||
399 | 1319 | void UnityScreen::compizDamageNux(CompRegion const& damage) | 1522 | void UnityScreen::compizDamageNux(CompRegion const& damage) |
400 | 1320 | { | 1523 | { |
412 | 1321 | if (!launcher_controller_) | 1524 | /* Ask nux to present anything in our damage region |
413 | 1322 | return; | 1525 | * |
414 | 1323 | 1526 | * Note: This is using a new nux API, to "present" windows | |
415 | 1324 | /* | 1527 | * to the screen, as opposed to drawing them. The difference is |
416 | 1325 | * Prioritise user interaction over active blur updates. So the general | 1528 | * important. The former will just draw the window backing texture |
417 | 1326 | * slowness of the active blur doesn't affect the UI interaction performance. | 1529 | * directly to the screen, the latter will re-draw the entire window. |
418 | 1327 | * | 1530 | * |
419 | 1328 | * Also, BackgroundEffectHelper::ProcessDamage() is causing a feedback loop | 1531 | * The former is a lot faster, do not use QueueDraw unless the contents |
420 | 1329 | * while the dash is open. Calling it results in the NEXT frame (and the | 1532 | * of the window need to be re-drawn. |
410 | 1330 | * current one?) to get some damage. This GetDrawList().empty() check avoids | ||
411 | 1331 | * that feedback loop and allows us to idle correctly. | ||
421 | 1332 | */ | 1533 | */ |
505 | 1333 | if (wt->GetDrawList().empty() && BackgroundEffectHelper::HasDamageableHelpers()) | 1534 | CompRect::vector rects (damage.rects()); |
506 | 1334 | { | 1535 | for (const CompRect &r : rects) |
507 | 1335 | CompRect::vector const& rects(damage.rects()); | 1536 | { |
508 | 1336 | for (CompRect const& r : rects) | 1537 | nux::Geometry g (r.x(), r.y(), r.width(), r.height()); |
509 | 1337 | { | 1538 | wt->PresentWindowsIntersectingGeometryOnThisFrame(g); |
427 | 1338 | nux::Geometry geo(r.x(), r.y(), r.width(), r.height()); | ||
428 | 1339 | BackgroundEffectHelper::ProcessDamage(geo); | ||
429 | 1340 | } | ||
430 | 1341 | } | ||
431 | 1342 | |||
432 | 1343 | auto const& launchers = launcher_controller_->launchers(); | ||
433 | 1344 | for (auto const& launcher : launchers) | ||
434 | 1345 | { | ||
435 | 1346 | if (!launcher->Hidden()) | ||
436 | 1347 | { | ||
437 | 1348 | nux::Geometry const& geo = launcher->GetAbsoluteGeometry(); | ||
438 | 1349 | CompRegion launcher_region(geo.x, geo.y, geo.width, geo.height); | ||
439 | 1350 | |||
440 | 1351 | if (damage.intersects(launcher_region)) | ||
441 | 1352 | launcher->QueueDraw(); | ||
442 | 1353 | |||
443 | 1354 | nux::ObjectPtr<nux::View> const& tooltip = launcher->GetActiveTooltip(); | ||
444 | 1355 | |||
445 | 1356 | if (tooltip) | ||
446 | 1357 | { | ||
447 | 1358 | nux::Geometry const& g = tooltip->GetAbsoluteGeometry(); | ||
448 | 1359 | CompRegion tip_region(g.x, g.y, g.width, g.height); | ||
449 | 1360 | |||
450 | 1361 | if (damage.intersects(tip_region)) | ||
451 | 1362 | tooltip->QueueDraw(); | ||
452 | 1363 | } | ||
453 | 1364 | |||
454 | 1365 | nux::ObjectPtr<LauncherDragWindow> const& dragged_icon = launcher->GetDraggedIcon(); | ||
455 | 1366 | |||
456 | 1367 | if (dragged_icon) | ||
457 | 1368 | { | ||
458 | 1369 | nux::Geometry const& g = dragged_icon->GetAbsoluteGeometry(); | ||
459 | 1370 | CompRegion icon_region(g.x, g.y, g.width, g.height); | ||
460 | 1371 | |||
461 | 1372 | if (damage.intersects(icon_region)) | ||
462 | 1373 | dragged_icon->QueueDraw(); | ||
463 | 1374 | } | ||
464 | 1375 | } | ||
465 | 1376 | } | ||
466 | 1377 | |||
467 | 1378 | std::vector<nux::View*> const& panels(panel_controller_->GetPanelViews()); | ||
468 | 1379 | for (nux::View* view : panels) | ||
469 | 1380 | { | ||
470 | 1381 | nux::Geometry const& geo = view->GetAbsoluteGeometry(); | ||
471 | 1382 | |||
472 | 1383 | CompRegion panel_region(geo.x, geo.y, geo.width, geo.height); | ||
473 | 1384 | |||
474 | 1385 | if (damage.intersects(panel_region)) | ||
475 | 1386 | view->QueueDraw(); | ||
476 | 1387 | } | ||
477 | 1388 | |||
478 | 1389 | QuicklistManager* qm = QuicklistManager::Default(); | ||
479 | 1390 | if (qm) | ||
480 | 1391 | { | ||
481 | 1392 | auto const& view = qm->Current(); | ||
482 | 1393 | |||
483 | 1394 | if (view) | ||
484 | 1395 | { | ||
485 | 1396 | nux::Geometry const& geo = view->GetAbsoluteGeometry(); | ||
486 | 1397 | CompRegion quicklist_region(geo.x, geo.y, geo.width, geo.height); | ||
487 | 1398 | |||
488 | 1399 | if (damage.intersects(quicklist_region)) | ||
489 | 1400 | view->QueueDraw(); | ||
490 | 1401 | } | ||
491 | 1402 | } | ||
492 | 1403 | |||
493 | 1404 | if (switcher_controller_ && switcher_controller_->Visible()) | ||
494 | 1405 | { | ||
495 | 1406 | auto const& view = switcher_controller_->GetView(); | ||
496 | 1407 | |||
497 | 1408 | if (G_LIKELY(view)) | ||
498 | 1409 | { | ||
499 | 1410 | nux::Geometry const& geo = view->GetAbsoluteGeometry(); | ||
500 | 1411 | CompRegion switcher_region(geo.x, geo.y, geo.width, geo.height); | ||
501 | 1412 | |||
502 | 1413 | if (damage.intersects(switcher_region)) | ||
503 | 1414 | view->QueueDraw(); | ||
504 | 1415 | } | ||
510 | 1416 | } | 1539 | } |
511 | 1417 | } | 1540 | } |
512 | 1418 | 1541 | ||
513 | 1419 | /* Grab changed nux regions and add damage rects for them */ | 1542 | /* Grab changed nux regions and add damage rects for them */ |
515 | 1420 | void UnityScreen::nuxDamageCompiz() | 1543 | void UnityScreen::determineNuxDamage(CompRegion &nux_damage) |
516 | 1421 | { | 1544 | { |
530 | 1422 | /* | 1545 | /* Fetch all the dirty geometry from nux and aggregate it */ |
531 | 1423 | * If Nux is going to redraw anything then we have to tell Compiz to | 1546 | std::vector<nux::Geometry> dirty = wt->GetPresentationListGeometries(); |
532 | 1424 | * redraw everything. This is because Nux has a bad habit (bug??) of drawing | 1547 | |
533 | 1425 | * more than just the regions of its DrawList. (LP: #1036519) | 1548 | for (auto const& geo : dirty) |
534 | 1426 | * | 1549 | nux_damage += CompRegion(geo.x, geo.y, geo.width, geo.height); |
535 | 1427 | * Forunately, this does not happen on most frames. Only when the Unity | 1550 | |
536 | 1428 | * Shell needs to redraw something. | 1551 | /* Special case, we need to redraw the panel shadow on panel updates */ |
537 | 1429 | * | 1552 | for (auto const& panel_geo : panel_controller_->GetGeometries()) |
525 | 1430 | * TODO: Try to figure out why redrawing the panel makes the launcher also | ||
526 | 1431 | * redraw even though the launcher's geometry is not in DrawList, and | ||
527 | 1432 | * stop it. Then maybe we can revert back to the old code below #else. | ||
528 | 1433 | */ | ||
529 | 1434 | if (!wt->GetDrawList().empty() || animation_controller_->HasRunningAnimations()) | ||
538 | 1435 | { | 1553 | { |
542 | 1436 | cScreen->damageRegionSetEnabled(this, false); | 1554 | CompRect panel_rect (panel_geo.x, |
543 | 1437 | cScreen->damageScreen(); | 1555 | panel_geo.y, |
544 | 1438 | cScreen->damageRegionSetEnabled(this, true); | 1556 | panel_geo.width, |
545 | 1557 | panel_geo.height); | ||
546 | 1558 | |||
547 | 1559 | if (nux_damage.intersects(panel_rect)) | ||
548 | 1560 | { | ||
549 | 1561 | foreach (CompOutput const& o, screen->outputDevs()) | ||
550 | 1562 | { | ||
551 | 1563 | CompRect shadowRect; | ||
552 | 1564 | FillShadowRectForOutput(shadowRect, o); | ||
553 | 1565 | nux_damage += shadowRect; | ||
554 | 1566 | } | ||
555 | 1567 | } | ||
556 | 1439 | } | 1568 | } |
557 | 1440 | } | 1569 | } |
558 | 1441 | 1570 | ||
559 | @@ -1675,7 +1804,7 @@ | |||
560 | 1675 | 1804 | ||
561 | 1676 | void UnityScreen::damageRegion(const CompRegion ®ion) | 1805 | void UnityScreen::damageRegion(const CompRegion ®ion) |
562 | 1677 | { | 1806 | { |
564 | 1678 | compizDamageNux(region); | 1807 | buffered_compiz_damage_this_frame_ += region; |
565 | 1679 | cScreen->damageRegion(region); | 1808 | cScreen->damageRegion(region); |
566 | 1680 | } | 1809 | } |
567 | 1681 | 1810 | ||
568 | @@ -2965,11 +3094,14 @@ | |||
569 | 2965 | nux::ColorLayer background(nux::color::Transparent); | 3094 | nux::ColorLayer background(nux::color::Transparent); |
570 | 2966 | static_cast<nux::WindowThread*>(thread)->SetWindowBackgroundPaintLayer(&background); | 3095 | static_cast<nux::WindowThread*>(thread)->SetWindowBackgroundPaintLayer(&background); |
571 | 2967 | LOG_INFO(logger) << "UnityScreen::initUnity: " << timer.ElapsedSeconds() << "s"; | 3096 | LOG_INFO(logger) << "UnityScreen::initUnity: " << timer.ElapsedSeconds() << "s"; |
572 | 3097 | |||
573 | 3098 | nux::GetWindowCompositor().sigHiddenViewWindow.connect (sigc::mem_fun(self, &UnityScreen::OnViewHidden)); | ||
574 | 2968 | } | 3099 | } |
575 | 2969 | 3100 | ||
576 | 2970 | void UnityScreen::onRedrawRequested() | 3101 | void UnityScreen::onRedrawRequested() |
577 | 2971 | { | 3102 | { |
579 | 2972 | nuxDamageCompiz(); | 3103 | if (!ignore_redraw_request_) |
580 | 3104 | cScreen->damagePending(); | ||
581 | 2973 | } | 3105 | } |
582 | 2974 | 3106 | ||
583 | 2975 | /* Handle option changes and plug that into nux windows */ | 3107 | /* Handle option changes and plug that into nux windows */ |
584 | @@ -3159,6 +3291,8 @@ | |||
585 | 3159 | << " h=" << primary_monitor_().height; | 3291 | << " h=" << primary_monitor_().height; |
586 | 3160 | 3292 | ||
587 | 3161 | needsRelayout = false; | 3293 | needsRelayout = false; |
588 | 3294 | |||
589 | 3295 | DamagePanelShadow (); | ||
590 | 3162 | } | 3296 | } |
591 | 3163 | 3297 | ||
592 | 3164 | /* Handle changes in the number of workspaces by showing the switcher | 3298 | /* Handle changes in the number of workspaces by showing the switcher |
593 | 3165 | 3299 | ||
594 | === modified file 'plugins/unityshell/src/unityshell.h' | |||
595 | --- plugins/unityshell/src/unityshell.h 2013-04-11 05:53:30 +0000 | |||
596 | +++ plugins/unityshell/src/unityshell.h 2013-05-03 22:55:31 +0000 | |||
597 | @@ -97,9 +97,11 @@ | |||
598 | 97 | 97 | ||
599 | 98 | /* nux draw wrapper */ | 98 | /* nux draw wrapper */ |
600 | 99 | void paintDisplay(); | 99 | void paintDisplay(); |
602 | 100 | void paintPanelShadow(const CompRegion& clip); | 100 | void paintPanelShadow(CompRegion const& clip); |
603 | 101 | void setPanelShadowMatrix(const GLMatrix& matrix); | 101 | void setPanelShadowMatrix(const GLMatrix& matrix); |
604 | 102 | 102 | ||
605 | 103 | void updateBlurDamage(); | ||
606 | 104 | void damageCutoff(); | ||
607 | 103 | void preparePaint (int ms); | 105 | void preparePaint (int ms); |
608 | 104 | void paintFboForOutput (CompOutput *output); | 106 | void paintFboForOutput (CompOutput *output); |
609 | 105 | void donePaint (); | 107 | void donePaint (); |
610 | @@ -215,7 +217,7 @@ | |||
611 | 215 | void initLauncher(); | 217 | void initLauncher(); |
612 | 216 | 218 | ||
613 | 217 | void compizDamageNux(CompRegion const& region); | 219 | void compizDamageNux(CompRegion const& region); |
615 | 218 | void nuxDamageCompiz(); | 220 | void determineNuxDamage(CompRegion &nux_damage); |
616 | 219 | 221 | ||
617 | 220 | void onRedrawRequested(); | 222 | void onRedrawRequested(); |
618 | 221 | void Relayout(); | 223 | void Relayout(); |
619 | @@ -237,6 +239,12 @@ | |||
620 | 237 | void OnInitiateSpread(); | 239 | void OnInitiateSpread(); |
621 | 238 | void OnTerminateSpread(); | 240 | void OnTerminateSpread(); |
622 | 239 | 241 | ||
623 | 242 | void DamagePanelShadow(); | ||
624 | 243 | |||
625 | 244 | void OnViewHidden(nux::BaseWindow *bw); | ||
626 | 245 | |||
627 | 246 | void RestoreWindow(GVariant* data); | ||
628 | 247 | |||
629 | 240 | bool SaveInputThenFocus(const guint xid); | 248 | bool SaveInputThenFocus(const guint xid); |
630 | 241 | 249 | ||
631 | 242 | void OnPanelStyleChanged(); | 250 | void OnPanelStyleChanged(); |
632 | @@ -245,6 +253,8 @@ | |||
633 | 245 | 253 | ||
634 | 246 | void DrawPanelUnderDash(); | 254 | void DrawPanelUnderDash(); |
635 | 247 | 255 | ||
636 | 256 | void FillShadowRectForOutput(CompRect &shadowRect, | ||
637 | 257 | CompOutput const &output); | ||
638 | 248 | unsigned CompizModifiersToNux(unsigned input) const; | 258 | unsigned CompizModifiersToNux(unsigned input) const; |
639 | 249 | unsigned XModifiersToNux(unsigned input) const; | 259 | unsigned XModifiersToNux(unsigned input) const; |
640 | 250 | 260 | ||
641 | @@ -304,6 +314,12 @@ | |||
642 | 304 | bool _key_nav_mode_requested; | 314 | bool _key_nav_mode_requested; |
643 | 305 | CompOutput* _last_output; | 315 | CompOutput* _last_output; |
644 | 306 | 316 | ||
645 | 317 | /* a small count-down work-a-around | ||
646 | 318 | * to force full redraws of the shell | ||
647 | 319 | * a certain number of frames after a | ||
648 | 320 | * suspend / resume cycle */ | ||
649 | 321 | unsigned int force_draw_countdown_; | ||
650 | 322 | |||
651 | 307 | CompRegion panelShadowPainted; | 323 | CompRegion panelShadowPainted; |
652 | 308 | CompRegion nuxRegion; | 324 | CompRegion nuxRegion; |
653 | 309 | CompRegion fullscreenRegion; | 325 | CompRegion fullscreenRegion; |
654 | @@ -341,6 +357,13 @@ | |||
655 | 341 | UBusManager ubus_manager_; | 357 | UBusManager ubus_manager_; |
656 | 342 | glib::SourceManager sources_; | 358 | glib::SourceManager sources_; |
657 | 343 | 359 | ||
658 | 360 | CompRegion buffered_compiz_damage_this_frame_; | ||
659 | 361 | CompRegion buffered_compiz_damage_last_frame_; | ||
660 | 362 | bool ignore_redraw_request_; | ||
661 | 363 | bool dirty_helpers_on_this_frame_; | ||
662 | 364 | |||
663 | 365 | unsigned int back_buffer_age_; | ||
664 | 366 | |||
665 | 344 | friend class UnityWindow; | 367 | friend class UnityWindow; |
666 | 345 | }; | 368 | }; |
667 | 346 | 369 | ||
668 | 347 | 370 | ||
669 | === modified file 'unity-shared/OverlayWindowButtons.cpp' | |||
670 | --- unity-shared/OverlayWindowButtons.cpp 2013-04-08 20:27:29 +0000 | |||
671 | +++ unity-shared/OverlayWindowButtons.cpp 2013-05-03 22:55:31 +0000 | |||
672 | @@ -39,6 +39,10 @@ | |||
673 | 39 | AddChild(window_buttons_.GetPointer()); | 39 | AddChild(window_buttons_.GetPointer()); |
674 | 40 | UpdateGeometry(); | 40 | UpdateGeometry(); |
675 | 41 | SetBackgroundColor(nux::color::Transparent); | 41 | SetBackgroundColor(nux::color::Transparent); |
676 | 42 | |||
677 | 43 | window_buttons_->queue_draw.connect([&] (nux::Layout* /*layout*/) { | ||
678 | 44 | QueueDraw(); | ||
679 | 45 | }); | ||
680 | 42 | } | 46 | } |
681 | 43 | 47 | ||
682 | 44 | void OverlayWindowButtons::UpdateGeometry() | 48 | void OverlayWindowButtons::UpdateGeometry() |
Ok it builds here. But I get two main regressions here:
#. Dragging launcher icons creates artifacts on the screen
#. Unity crash dragging files (e.g. nautilus files).
Can you reproduce there?