Merge lp:~unity-team/unity/x-sru6 into lp:unity/7.4

Proposed by Marco Trevisan (Treviño) on 2018-02-19
Status: Merged
Approved by: Andrea Azzarone on 2018-02-19
Approved revision: 4117
Merged at revision: 4117
Proposed branch: lp:~unity-team/unity/x-sru6
Merge into: lp:unity/7.4
Diff against target: 233 lines (+50/-51)
8 files modified
debian/changelog (+10/-0)
decorations/DecoratedWindow.cpp (+3/-1)
hud/HudController.cpp (+1/-1)
launcher/CairoBaseWindow.cpp (+8/-3)
launcher/EdgeBarrierController.cpp (+21/-36)
launcher/EdgeBarrierControllerPrivate.h (+1/-4)
plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp (+1/-1)
plugins/unityshell/src/unityshell.cpp (+5/-5)
To merge this branch: bzr merge lp:~unity-team/unity/x-sru6
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) 2018-02-19 Approve on 2018-02-19
Review via email: mp+337956@code.launchpad.net

This proposal supersedes a proposal from 2018-02-19.

Commit message

Unity Xenial SRU6

To post a comment you must log in.
Andrea Azzarone (azzar1) wrote :

LGTM

review: Approve
lp:~unity-team/unity/x-sru6 updated on 2018-02-21
4118. By Marco Trevisan (Treviño) on 2018-02-19

CairoBaseWindow: don't try to compute the blur of an invalid texture

Nux isn't smart enough to protect us.

4119. By Marco Trevisan (Treviño) on 2018-02-21

Unity: use new definition of infinite CompRegion's

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-12-01 18:46:01 +0000
3+++ debian/changelog 2018-02-21 19:31:24 +0000
4@@ -1,3 +1,13 @@
5+unity (7.4.5+16.04.20171201.3ubuntu1) UNRELEASED; urgency=medium
6+
7+ * Unity use track_obj to safely connect to UScreen and Settings
8+ signals (LP: #1748330) (LP: #1748330)
9+ * CairoBaseWindow: don't try to compute the blur of an invalid texture
10+ (LP: #1290056)
11+ * Unity: use new definition of infinite CompRegion's
12+
13+ -- Marco Trevisan (Treviño) <mail@3v1n0.net> Mon, 19 Feb 2018 15:41:34 +0100
14+
15 unity (7.4.5+16.04.20171201.3) xenial; urgency=medium
16
17 [ Marco Trevisan (Treviño) ]
18
19=== modified file 'decorations/DecoratedWindow.cpp'
20--- decorations/DecoratedWindow.cpp 2016-09-01 23:57:13 +0000
21+++ decorations/DecoratedWindow.cpp 2018-02-21 19:31:24 +0000
22@@ -816,7 +816,9 @@
23 return;
24 }
25
26- auto const& clip_region = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ? infiniteRegion : region;
27+ auto const& clip_region = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
28+ CompRegion::infinite() : region;
29+
30 mask |= PAINT_WINDOW_BLEND_MASK;
31
32 if (win_->alpha() || attrib.opacity != OPAQUE)
33
34=== modified file 'hud/HudController.cpp'
35--- hud/HudController.cpp 2016-07-05 10:22:42 +0000
36+++ hud/HudController.cpp 2018-02-21 19:31:24 +0000
37@@ -83,7 +83,7 @@
38 }
39
40 SetupWindow();
41- UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry> const&) { Relayout(true); });
42+ UScreen::GetDefault()->changed.connect(sigc::track_obj([this] (int, std::vector<nux::Geometry> const&) { Relayout(true); }, *this));
43
44 ubus.RegisterInterest(UBUS_HUD_CLOSE_REQUEST, sigc::mem_fun(this, &Controller::OnExternalHideHud));
45
46
47=== modified file 'launcher/CairoBaseWindow.cpp'
48--- launcher/CairoBaseWindow.cpp 2016-07-05 10:22:42 +0000
49+++ launcher/CairoBaseWindow.cpp 2018-02-21 19:31:24 +0000
50@@ -110,8 +110,14 @@
51
52 nux::ObjectPtr <nux::IOpenGLBaseTexture> bkg_texture = gfxContext.CreateTextureFromBackBuffer(base.x, base.y, base.width, base.height);
53
54- nux::TexCoordXForm texxform_bkg;
55- bg_blur_texture_ = gfxContext.QRP_GetBlurTexture(0, 0, base.width, base.height, bkg_texture, texxform_bkg, nux::color::White, 1.0f, 3);
56+ if (bkg_texture.IsValid())
57+ {
58+ nux::TexCoordXForm texxform_bkg;
59+ bg_blur_texture_ = gfxContext.QRP_GetBlurTexture(0, 0, base.width, base.height, bkg_texture, texxform_bkg, nux::color::White, 1.0f, 3);
60+
61+ if (bg_blur_texture_)
62+ compute_blur_bkg_ = false;
63+ }
64
65 if (current_fbo.IsValid())
66 {
67@@ -124,7 +130,6 @@
68 gfxContext.Push2DWindow(gfxContext.GetWindowWidth(), gfxContext.GetWindowHeight());
69 gfxContext.ApplyClippingRectangle();
70 }
71- compute_blur_bkg_ = false;
72 }
73
74 // the elements position inside the window are referenced to top-left window
75
76=== modified file 'launcher/EdgeBarrierController.cpp'
77--- launcher/EdgeBarrierController.cpp 2016-09-01 23:56:32 +0000
78+++ launcher/EdgeBarrierController.cpp 2018-02-21 19:31:24 +0000
79@@ -48,16 +48,17 @@
80 auto monitors = uscreen->GetMonitors();
81 ResizeBarrierList(monitors);
82
83- /* FIXME: Back to c++11 lambda once we get sigc::track_obj.
84- uscreen->changed.connect(sigc::track_obj(([this](int primary, std::vector<nux::Geometry> const& layout) {
85- ResizeBarrierList(layout);
86- SetupBarriers(layout);
87- }));*/
88-
89- uscreen->changed.connect(sigc::mem_fun(this, &EdgeBarrierController::Impl::OnUScreenChanged));
90- Settings::Instance().launcher_position.changed.connect(sigc::hide(sigc::mem_fun(this, &EdgeBarrierController::Impl::OnOptionsChanged)));
91-
92- parent_->force_disable.changed.connect(sigc::mem_fun(this, &EdgeBarrierController::Impl::OnForceDisableChanged));
93+ uscreen->changed.connect(sigc::track_obj([this] (int primary, std::vector<nux::Geometry> const& layout) {
94+ ResetBarriers();
95+ }, *this));
96+
97+ parent_->force_disable.changed.connect(sigc::track_obj([this] (bool) {
98+ ResetBarriers();
99+ }, *this));
100+
101+ Settings::Instance().launcher_position.changed.connect(sigc::track_obj([this] (LauncherPosition) {
102+ ResetBarriers();
103+ }, *this));
104
105 parent_->sticky_edges.SetGetterFunction([this] {
106 return parent_->options() ? parent_->options()->edge_resist() : false;
107@@ -73,12 +74,11 @@
108 });
109
110 parent_->options.changed.connect([this](launcher::Options::Ptr options) {
111- /* FIXME: Back to c++11 lambda once we get sigc::track_obj.
112- options->option_changed.connect([this]() {
113- SetupBarriers(UScreen::GetDefault()->GetMonitors());
114- });*/
115- options->option_changed.connect(sigc::mem_fun(this, &EdgeBarrierController::Impl::OnOptionsChanged));
116- SetupBarriers(UScreen::GetDefault()->GetMonitors());
117+ options->option_changed.connect(sigc::track_obj([this] {
118+ ResetBarriers();
119+ }, *this));
120+
121+ ResetBarriers();
122 });
123 }
124
125@@ -87,33 +87,20 @@
126 nux::GetGraphicsDisplay()->RemoveEventFilter(this);
127 }
128
129-void EdgeBarrierController::Impl::OnUScreenChanged(int primary, std::vector<nux::Geometry> const& layout)
130-{
131- ResizeBarrierList(layout);
132- SetupBarriers(layout);
133-}
134-
135-void EdgeBarrierController::Impl::OnForceDisableChanged(bool value)
136-{
137- auto monitors = UScreen::GetDefault()->GetMonitors();
138+void EdgeBarrierController::Impl::ResetBarriers()
139+{
140+ auto const& monitors = UScreen::GetDefault()->GetMonitors();
141 ResizeBarrierList(monitors);
142 SetupBarriers(monitors);
143 }
144
145-void EdgeBarrierController::Impl::OnOptionsChanged()
146-{
147- SetupBarriers(UScreen::GetDefault()->GetMonitors());
148-}
149-
150 void EdgeBarrierController::Impl::AddSubscriber(EdgeBarrierSubscriber* subscriber, unsigned int monitor, std::vector<EdgeBarrierSubscriber*>& subscribers)
151 {
152 if (monitor >= subscribers.size())
153 subscribers.resize(monitor + 1);
154
155- auto const& monitors = UScreen::GetDefault()->GetMonitors();
156 subscribers[monitor] = subscriber;
157- ResizeBarrierList(monitors);
158- SetupBarriers(monitors);
159+ ResetBarriers();
160 }
161
162 void EdgeBarrierController::Impl::RemoveSubscriber(EdgeBarrierSubscriber* subscriber, unsigned int monitor, std::vector<EdgeBarrierSubscriber*>& subscribers)
163@@ -121,10 +108,8 @@
164 if (monitor >= subscribers.size() || subscribers[monitor] != subscriber)
165 return;
166
167- auto const& monitors = UScreen::GetDefault()->GetMonitors();
168 subscribers[monitor] = nullptr;
169- ResizeBarrierList(monitors);
170- SetupBarriers(monitors);
171+ ResetBarriers();
172 }
173
174 void EdgeBarrierController::Impl::ResizeBarrierList(std::vector<nux::Geometry> const& layout)
175
176=== modified file 'launcher/EdgeBarrierControllerPrivate.h'
177--- launcher/EdgeBarrierControllerPrivate.h 2016-09-01 23:56:32 +0000
178+++ launcher/EdgeBarrierControllerPrivate.h 2018-02-21 19:31:24 +0000
179@@ -40,10 +40,7 @@
180
181 void ResizeBarrierList(std::vector<nux::Geometry> const& layout);
182 void SetupBarriers(std::vector<nux::Geometry> const& layout);
183-
184- void OnUScreenChanged(int primary, std::vector<nux::Geometry> const& layout);
185- void OnForceDisableChanged(bool value);
186- void OnOptionsChanged();
187+ void ResetBarriers();
188
189 void OnPointerBarrierEvent(PointerBarrierWrapper::Ptr const& owner, BarrierEvent::Ptr const& event);
190 void BarrierPush(PointerBarrierWrapper::Ptr const& owner, BarrierEvent::Ptr const& event);
191
192=== modified file 'plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp'
193--- plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp 2013-11-17 18:12:54 +0000
194+++ plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp 2018-02-21 19:31:24 +0000
195@@ -480,7 +480,7 @@
196 matl.push_back(mat);
197
198 if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
199- paintRegion = infiniteRegion;
200+ paintRegion = CompRegion::infinite();
201
202 /* Now allow plugins to mess with the geometry of our
203 * dim (so we get a nice render for things like
204
205=== modified file 'plugins/unityshell/src/unityshell.cpp'
206--- plugins/unityshell/src/unityshell.cpp 2017-09-25 16:04:00 +0000
207+++ plugins/unityshell/src/unityshell.cpp 2018-02-21 19:31:24 +0000
208@@ -979,7 +979,7 @@
209 /* force the use of the core functions */
210 uTrayWindow->gWindow->glDrawSetCurrentIndex (MAXSHORT);
211 uTrayWindow->gWindow->glAddGeometrySetCurrentIndex ( MAXSHORT);
212- uTrayWindow->gWindow->glDraw (oTransform, attrib, infiniteRegion,
213+ uTrayWindow->gWindow->glDraw (oTransform, attrib, CompRegion::infinite (),
214 PAINT_WINDOW_TRANSFORMED_MASK |
215 PAINT_WINDOW_BLEND_MASK |
216 PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK);
217@@ -4194,13 +4194,13 @@
218 }
219 };
220
221- UScreen::GetDefault()->changed.connect([this, check_launchers_size] (int, std::vector<nux::Geometry> const&) {
222+ UScreen::GetDefault()->changed.connect(sigc::track_obj([this, check_launchers_size] (int, std::vector<nux::Geometry> const&) {
223 check_launchers_size();
224- });
225+ }, *this));
226
227- Settings::Instance().launcher_position.changed.connect([this, check_launchers_size] (LauncherPosition const&) {
228+ Settings::Instance().launcher_position.changed.connect(sigc::track_obj([this, check_launchers_size] (LauncherPosition const&) {
229 check_launchers_size();
230- });
231+ }, *this));
232
233 check_launchers_size();
234

Subscribers

People subscribed via source and target branches

to all changes: