Merge lp:~vanvugt/mir/simplify-alpha into lp:mir
- simplify-alpha
- Merge into development-branch
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Daniel van Vugt | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1948 | ||||
Proposed branch: | lp:~vanvugt/mir/simplify-alpha | ||||
Merge into: | lp:mir | ||||
Diff against target: |
257 lines (+8/-41) 14 files modified
debian/changelog (+1/-0) include/platform/mir/graphics/renderable.h (+0/-1) platform-ABI-sha1sums (+1/-1) playground/render_overlays.cpp (+0/-5) server-ABI-sha1sums (+1/-1) src/platform/graphics/android/hwc_device.cpp (+1/-1) src/platform/graphics/android/hwc_fallback_gl_renderer.cpp (+1/-1) src/platform/graphics/android/hwc_layerlist.cpp (+2/-2) src/platform/symbols.map (+0/-1) src/server/input/touchspot_controller.cpp (+0/-5) src/server/scene/basic_surface.cpp (+0/-8) tests/include/mir_test_doubles/fake_renderable.h (+0/-5) tests/include/mir_test_doubles/mock_renderable.h (+0/-1) tests/include/mir_test_doubles/stub_renderable.h (+1/-9) |
||||
To merge this branch: | bzr merge lp:~vanvugt/mir/simplify-alpha | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Approve | ||
Kevin DuBois (community) | Approve | ||
Alberto Aguirre (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+236075@code.launchpad.net |
Commit message
Simplify alpha-related attributes, removing the recently added
alpha_enabled(). It adds no functionality that's not already
available via alpha() or shaped(). So drop it.
As a bonus, this also fixes LP: #1373698.
Description of the change
The two ABI breaks have already been bumped in the current 0.8 series. No further bump required.
Daniel van Vugt (vanvugt) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1942
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1942
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1943
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1944
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1944
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1944
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Kevin DuBois (kdub) wrote : | # |
Needs discussion:
I left my thoughts on the Renderable interface here:
https:/
Needs fixing:
95 + if (renderable-
108 + renderable-
We don't support planeAlpha blending in HWC yet, so we don't need the check of alpha() here just yet. The check in renderable_
80 + if (// renderable-
HWC can do alpha blending, so the commented out line should be removed.
62 -bool plane_alpha_
Lets not remove this. I don't think the simpler check causes any 'real' problems, but since we're translating a float to an 8bit, anything greater than (1-2^9) should translate into 0xFF for the alpha value.
Daniel van Vugt (vanvugt) wrote : | # |
Fixed.
And in case anyone's wondering, the regression test for LP: #1373698 already exists in test_gl_
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1946
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1946
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1946
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1947
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1947
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1947
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Alberto Aguirre (albaguirre) wrote : | # |
Looks good.
Kevin DuBois (kdub) wrote : | # |
okay, looks good now. I guess I'll resubmit the other branch with the name cleanup, and this branch will remove of one of the alpha functions and the bug.
Daniel van Vugt (vanvugt) : | # |
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2014-10-01 03:37:18 +0000 | |||
3 | +++ debian/changelog 2014-10-01 03:43:21 +0000 | |||
4 | @@ -82,6 +82,7 @@ | |||
5 | 82 | . demo shell: Keep colours consistent, regardless of the physical pixel | 82 | . demo shell: Keep colours consistent, regardless of the physical pixel |
6 | 83 | format of your framebuffer (LP: #1375660) | 83 | format of your framebuffer (LP: #1375660) |
7 | 84 | . tests: Fix SharedLibraryProber test runs on i386. (LP: #1375829) | 84 | . tests: Fix SharedLibraryProber test runs on i386. (LP: #1375829) |
8 | 85 | . Touchspots rendered as squares on some devices (LP: #1373698) | ||
9 | 85 | 86 | ||
10 | 86 | -- Daniel van Vugt <daniel.van.vugt@canonical.com> Tue, 30 Sep 2014 16:08:44 +0800 | 87 | -- Daniel van Vugt <daniel.van.vugt@canonical.com> Tue, 30 Sep 2014 16:08:44 +0800 |
11 | 87 | 88 | ||
12 | 88 | 89 | ||
13 | === modified file 'include/platform/mir/graphics/renderable.h' | |||
14 | --- include/platform/mir/graphics/renderable.h 2014-09-19 03:08:20 +0000 | |||
15 | +++ include/platform/mir/graphics/renderable.h 2014-10-01 03:43:21 +0000 | |||
16 | @@ -48,7 +48,6 @@ | |||
17 | 48 | */ | 48 | */ |
18 | 49 | virtual std::shared_ptr<Buffer> buffer() const = 0; | 49 | virtual std::shared_ptr<Buffer> buffer() const = 0; |
19 | 50 | 50 | ||
20 | 51 | virtual bool alpha_enabled() const = 0; | ||
21 | 52 | virtual geometry::Rectangle screen_position() const = 0; | 51 | virtual geometry::Rectangle screen_position() const = 0; |
22 | 53 | 52 | ||
23 | 54 | // These are from the old CompositingCriteria. There is a little bit | 53 | // These are from the old CompositingCriteria. There is a little bit |
24 | 55 | 54 | ||
25 | === modified file 'platform-ABI-sha1sums' | |||
26 | --- platform-ABI-sha1sums 2014-09-30 04:37:00 +0000 | |||
27 | +++ platform-ABI-sha1sums 2014-10-01 03:43:21 +0000 | |||
28 | @@ -32,7 +32,7 @@ | |||
29 | 32 | f90a35371e236a6cfec8e9a8474dbb3305c7621e include/platform/mir/graphics/internal_client.h | 32 | f90a35371e236a6cfec8e9a8474dbb3305c7621e include/platform/mir/graphics/internal_client.h |
30 | 33 | c9730cac4a3a101f9706ec6f444958abe047fd88 include/platform/mir/graphics/internal_surface.h | 33 | c9730cac4a3a101f9706ec6f444958abe047fd88 include/platform/mir/graphics/internal_surface.h |
31 | 34 | f47dac961f060eb29a44ed3c8c18a49a3d353bb1 include/platform/mir/graphics/platform.h | 34 | f47dac961f060eb29a44ed3c8c18a49a3d353bb1 include/platform/mir/graphics/platform.h |
33 | 35 | 15f201741a465de33e55ffc1ea775b507a5be950 include/platform/mir/graphics/renderable.h | 35 | 84c063346b3bd51b4624d9f940008d4c3f8be066 include/platform/mir/graphics/renderable.h |
34 | 36 | f5746dab3336266cfd410ce4e4d01333df6e5b99 include/platform/mir/options/configuration.h | 36 | f5746dab3336266cfd410ce4e4d01333df6e5b99 include/platform/mir/options/configuration.h |
35 | 37 | 47007c783c174f8e94d332c4b13c6b01358b48fb include/platform/mir/options/default_configuration.h | 37 | 47007c783c174f8e94d332c4b13c6b01358b48fb include/platform/mir/options/default_configuration.h |
36 | 38 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h | 38 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h |
37 | 39 | 39 | ||
38 | === modified file 'playground/render_overlays.cpp' | |||
39 | --- playground/render_overlays.cpp 2014-09-19 03:08:20 +0000 | |||
40 | +++ playground/render_overlays.cpp 2014-10-01 03:43:21 +0000 | |||
41 | @@ -115,11 +115,6 @@ | |||
42 | 115 | return client->last_rendered(); | 115 | return client->last_rendered(); |
43 | 116 | } | 116 | } |
44 | 117 | 117 | ||
45 | 118 | bool alpha_enabled() const override | ||
46 | 119 | { | ||
47 | 120 | return false; | ||
48 | 121 | } | ||
49 | 122 | |||
50 | 123 | geom::Rectangle screen_position() const override | 118 | geom::Rectangle screen_position() const override |
51 | 124 | { | 119 | { |
52 | 125 | return position; | 120 | return position; |
53 | 126 | 121 | ||
54 | === modified file 'server-ABI-sha1sums' | |||
55 | --- server-ABI-sha1sums 2014-09-30 04:37:00 +0000 | |||
56 | +++ server-ABI-sha1sums 2014-10-01 03:43:21 +0000 | |||
57 | @@ -32,7 +32,7 @@ | |||
58 | 32 | f90a35371e236a6cfec8e9a8474dbb3305c7621e include/platform/mir/graphics/internal_client.h | 32 | f90a35371e236a6cfec8e9a8474dbb3305c7621e include/platform/mir/graphics/internal_client.h |
59 | 33 | c9730cac4a3a101f9706ec6f444958abe047fd88 include/platform/mir/graphics/internal_surface.h | 33 | c9730cac4a3a101f9706ec6f444958abe047fd88 include/platform/mir/graphics/internal_surface.h |
60 | 34 | f47dac961f060eb29a44ed3c8c18a49a3d353bb1 include/platform/mir/graphics/platform.h | 34 | f47dac961f060eb29a44ed3c8c18a49a3d353bb1 include/platform/mir/graphics/platform.h |
62 | 35 | 15f201741a465de33e55ffc1ea775b507a5be950 include/platform/mir/graphics/renderable.h | 35 | 84c063346b3bd51b4624d9f940008d4c3f8be066 include/platform/mir/graphics/renderable.h |
63 | 36 | f5746dab3336266cfd410ce4e4d01333df6e5b99 include/platform/mir/options/configuration.h | 36 | f5746dab3336266cfd410ce4e4d01333df6e5b99 include/platform/mir/options/configuration.h |
64 | 37 | 47007c783c174f8e94d332c4b13c6b01358b48fb include/platform/mir/options/default_configuration.h | 37 | 47007c783c174f8e94d332c4b13c6b01358b48fb include/platform/mir/options/default_configuration.h |
65 | 38 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h | 38 | b45f14082c4f8b29efaa1b13de795dcb29deb738 include/platform/mir/options/option.h |
66 | 39 | 39 | ||
67 | === modified file 'src/platform/graphics/android/hwc_device.cpp' | |||
68 | --- src/platform/graphics/android/hwc_device.cpp 2014-09-30 04:37:00 +0000 | |||
69 | +++ src/platform/graphics/android/hwc_device.cpp 2014-10-01 03:43:21 +0000 | |||
70 | @@ -43,7 +43,7 @@ | |||
71 | 43 | { | 43 | { |
72 | 44 | 1.0f/(2.0 * static_cast<float>(std::numeric_limits<decltype(hwc_layer_1_t::planeAlpha)>::max())) | 44 | 1.0f/(2.0 * static_cast<float>(std::numeric_limits<decltype(hwc_layer_1_t::planeAlpha)>::max())) |
73 | 45 | }; | 45 | }; |
75 | 46 | return renderable.alpha_enabled() && (renderable.alpha() < 1.0f - tolerance); | 46 | return (renderable.alpha() < 1.0f - tolerance); |
76 | 47 | } | 47 | } |
77 | 48 | 48 | ||
78 | 49 | bool renderable_list_is_hwc_incompatible(mg::RenderableList const& list) | 49 | bool renderable_list_is_hwc_incompatible(mg::RenderableList const& list) |
79 | 50 | 50 | ||
80 | === modified file 'src/platform/graphics/android/hwc_fallback_gl_renderer.cpp' | |||
81 | --- src/platform/graphics/android/hwc_fallback_gl_renderer.cpp 2014-09-11 05:51:44 +0000 | |||
82 | +++ src/platform/graphics/android/hwc_fallback_gl_renderer.cpp 2014-10-01 03:43:21 +0000 | |||
83 | @@ -111,7 +111,7 @@ | |||
84 | 111 | 111 | ||
85 | 112 | for(auto const& renderable : renderlist) | 112 | for(auto const& renderable : renderlist) |
86 | 113 | { | 113 | { |
88 | 114 | if (renderable->alpha_enabled()) | 114 | if (renderable->shaped()) // TODO: support alpha() in future |
89 | 115 | glEnable(GL_BLEND); | 115 | glEnable(GL_BLEND); |
90 | 116 | else | 116 | else |
91 | 117 | glDisable(GL_BLEND); | 117 | glDisable(GL_BLEND); |
92 | 118 | 118 | ||
93 | === modified file 'src/platform/graphics/android/hwc_layerlist.cpp' | |||
94 | --- src/platform/graphics/android/hwc_layerlist.cpp 2014-09-11 05:51:44 +0000 | |||
95 | +++ src/platform/graphics/android/hwc_layerlist.cpp 2014-10-01 03:43:21 +0000 | |||
96 | @@ -74,7 +74,7 @@ | |||
97 | 74 | it->needs_commit = it->layer.setup_layer( | 74 | it->needs_commit = it->layer.setup_layer( |
98 | 75 | mga::LayerType::gl_rendered, | 75 | mga::LayerType::gl_rendered, |
99 | 76 | renderable->screen_position(), | 76 | renderable->screen_position(), |
101 | 77 | renderable->alpha_enabled(), | 77 | renderable->shaped(), // TODO: support alpha() in future too |
102 | 78 | *renderable->buffer()); | 78 | *renderable->buffer()); |
103 | 79 | it++; | 79 | it++; |
104 | 80 | } | 80 | } |
105 | @@ -89,7 +89,7 @@ | |||
106 | 89 | mga::HWCLayer( | 89 | mga::HWCLayer( |
107 | 90 | mga::LayerType::gl_rendered, | 90 | mga::LayerType::gl_rendered, |
108 | 91 | renderable->screen_position(), | 91 | renderable->screen_position(), |
110 | 92 | renderable->alpha_enabled(), | 92 | renderable->shaped(), // TODO: support alpha() in future |
111 | 93 | *renderable->buffer(), | 93 | *renderable->buffer(), |
112 | 94 | hwc_representation, i++), true); | 94 | hwc_representation, i++), true); |
113 | 95 | } | 95 | } |
114 | 96 | 96 | ||
115 | === modified file 'src/platform/symbols.map' | |||
116 | --- src/platform/symbols.map 2014-09-30 04:37:00 +0000 | |||
117 | +++ src/platform/symbols.map 2014-10-01 03:43:21 +0000 | |||
118 | @@ -185,7 +185,6 @@ | |||
119 | 185 | mir::graphics::Platform::Platform*; | 185 | mir::graphics::Platform::Platform*; |
120 | 186 | mir::graphics::red_channel_depth*; | 186 | mir::graphics::red_channel_depth*; |
121 | 187 | mir::graphics::Renderable::alpha*; | 187 | mir::graphics::Renderable::alpha*; |
122 | 188 | mir::graphics::Renderable::alpha_enabled*; | ||
123 | 189 | mir::graphics::Renderable::buffer*; | 188 | mir::graphics::Renderable::buffer*; |
124 | 190 | mir::graphics::Renderable::buffers_ready_for_compositor*; | 189 | mir::graphics::Renderable::buffers_ready_for_compositor*; |
125 | 191 | mir::graphics::Renderable::id*; | 190 | mir::graphics::Renderable::id*; |
126 | 192 | 191 | ||
127 | === modified file 'src/server/input/touchspot_controller.cpp' | |||
128 | --- src/server/input/touchspot_controller.cpp 2014-09-23 17:01:30 +0000 | |||
129 | +++ src/server/input/touchspot_controller.cpp 2014-10-01 03:43:21 +0000 | |||
130 | @@ -57,11 +57,6 @@ | |||
131 | 57 | return buffer_; | 57 | return buffer_; |
132 | 58 | } | 58 | } |
133 | 59 | 59 | ||
134 | 60 | bool alpha_enabled() const override | ||
135 | 61 | { | ||
136 | 62 | return false; | ||
137 | 63 | } | ||
138 | 64 | |||
139 | 65 | geom::Rectangle screen_position() const | 60 | geom::Rectangle screen_position() const |
140 | 66 | { | 61 | { |
141 | 67 | return {position, buffer_->size()}; | 62 | return {position, buffer_->size()}; |
142 | 68 | 63 | ||
143 | === modified file 'src/server/scene/basic_surface.cpp' | |||
144 | --- src/server/scene/basic_surface.cpp 2014-09-19 03:08:20 +0000 | |||
145 | +++ src/server/scene/basic_surface.cpp 2014-10-01 03:43:21 +0000 | |||
146 | @@ -616,14 +616,12 @@ | |||
147 | 616 | geom::Rectangle const& position, | 616 | geom::Rectangle const& position, |
148 | 617 | glm::mat4 const& transform, | 617 | glm::mat4 const& transform, |
149 | 618 | bool visible, | 618 | bool visible, |
150 | 619 | bool alpha_enabled, | ||
151 | 620 | float alpha, | 619 | float alpha, |
152 | 621 | bool shaped, | 620 | bool shaped, |
153 | 622 | mg::Renderable::ID id) | 621 | mg::Renderable::ID id) |
154 | 623 | : underlying_buffer_stream{stream}, | 622 | : underlying_buffer_stream{stream}, |
155 | 624 | compositor_buffer{nullptr}, | 623 | compositor_buffer{nullptr}, |
156 | 625 | compositor_id{compositor_id}, | 624 | compositor_id{compositor_id}, |
157 | 626 | alpha_enabled_{alpha_enabled}, | ||
158 | 627 | alpha_{alpha}, | 625 | alpha_{alpha}, |
159 | 628 | shaped_{shaped}, | 626 | shaped_{shaped}, |
160 | 629 | visible_{visible}, | 627 | visible_{visible}, |
161 | @@ -650,9 +648,6 @@ | |||
162 | 650 | bool visible() const override | 648 | bool visible() const override |
163 | 651 | { return visible_; } | 649 | { return visible_; } |
164 | 652 | 650 | ||
165 | 653 | bool alpha_enabled() const override | ||
166 | 654 | { return alpha_enabled_; } | ||
167 | 655 | |||
168 | 656 | geom::Rectangle screen_position() const override | 651 | geom::Rectangle screen_position() const override |
169 | 657 | { return screen_position_; } | 652 | { return screen_position_; } |
170 | 658 | 653 | ||
171 | @@ -671,7 +666,6 @@ | |||
172 | 671 | std::shared_ptr<mc::BufferStream> const underlying_buffer_stream; | 666 | std::shared_ptr<mc::BufferStream> const underlying_buffer_stream; |
173 | 672 | std::shared_ptr<mg::Buffer> mutable compositor_buffer; | 667 | std::shared_ptr<mg::Buffer> mutable compositor_buffer; |
174 | 673 | void const*const compositor_id; | 668 | void const*const compositor_id; |
175 | 674 | bool const alpha_enabled_; | ||
176 | 675 | float const alpha_; | 669 | float const alpha_; |
177 | 676 | bool const shaped_; | 670 | bool const shaped_; |
178 | 677 | bool const visible_; | 671 | bool const visible_; |
179 | @@ -685,7 +679,6 @@ | |||
180 | 685 | { | 679 | { |
181 | 686 | std::unique_lock<std::mutex> lk(guard); | 680 | std::unique_lock<std::mutex> lk(guard); |
182 | 687 | 681 | ||
183 | 688 | auto const shaped = nonrectangular || (surface_alpha < 1.0f); | ||
184 | 689 | return std::unique_ptr<mg::Renderable>( | 682 | return std::unique_ptr<mg::Renderable>( |
185 | 690 | new SurfaceSnapshot( | 683 | new SurfaceSnapshot( |
186 | 691 | surface_buffer_stream, | 684 | surface_buffer_stream, |
187 | @@ -693,7 +686,6 @@ | |||
188 | 693 | surface_rect, | 686 | surface_rect, |
189 | 694 | transformation_matrix, | 687 | transformation_matrix, |
190 | 695 | visible(lk), | 688 | visible(lk), |
191 | 696 | shaped, | ||
192 | 697 | surface_alpha, | 689 | surface_alpha, |
193 | 698 | nonrectangular, | 690 | nonrectangular, |
194 | 699 | this)); | 691 | this)); |
195 | 700 | 692 | ||
196 | === modified file 'tests/include/mir_test_doubles/fake_renderable.h' | |||
197 | --- tests/include/mir_test_doubles/fake_renderable.h 2014-09-19 03:08:20 +0000 | |||
198 | +++ tests/include/mir_test_doubles/fake_renderable.h 2014-10-01 03:43:21 +0000 | |||
199 | @@ -107,11 +107,6 @@ | |||
200 | 107 | return buf; | 107 | return buf; |
201 | 108 | } | 108 | } |
202 | 109 | 109 | ||
203 | 110 | bool alpha_enabled() const override | ||
204 | 111 | { | ||
205 | 112 | return shaped() || alpha() < 1.0f; | ||
206 | 113 | } | ||
207 | 114 | |||
208 | 115 | geometry::Rectangle screen_position() const override | 110 | geometry::Rectangle screen_position() const override |
209 | 116 | { | 111 | { |
210 | 117 | return rect; | 112 | return rect; |
211 | 118 | 113 | ||
212 | === modified file 'tests/include/mir_test_doubles/mock_renderable.h' | |||
213 | --- tests/include/mir_test_doubles/mock_renderable.h 2014-09-19 03:08:20 +0000 | |||
214 | +++ tests/include/mir_test_doubles/mock_renderable.h 2014-10-01 03:43:21 +0000 | |||
215 | @@ -49,7 +49,6 @@ | |||
216 | 49 | 49 | ||
217 | 50 | MOCK_CONST_METHOD0(id, ID()); | 50 | MOCK_CONST_METHOD0(id, ID()); |
218 | 51 | MOCK_CONST_METHOD0(buffer, std::shared_ptr<graphics::Buffer>()); | 51 | MOCK_CONST_METHOD0(buffer, std::shared_ptr<graphics::Buffer>()); |
219 | 52 | MOCK_CONST_METHOD0(alpha_enabled, bool()); | ||
220 | 53 | MOCK_CONST_METHOD0(screen_position, geometry::Rectangle()); | 52 | MOCK_CONST_METHOD0(screen_position, geometry::Rectangle()); |
221 | 54 | MOCK_CONST_METHOD0(alpha, float()); | 53 | MOCK_CONST_METHOD0(alpha, float()); |
222 | 55 | MOCK_CONST_METHOD0(transformation, glm::mat4()); | 54 | MOCK_CONST_METHOD0(transformation, glm::mat4()); |
223 | 56 | 55 | ||
224 | === modified file 'tests/include/mir_test_doubles/stub_renderable.h' | |||
225 | --- tests/include/mir_test_doubles/stub_renderable.h 2014-09-19 03:08:20 +0000 | |||
226 | +++ tests/include/mir_test_doubles/stub_renderable.h 2014-10-01 03:43:21 +0000 | |||
227 | @@ -68,10 +68,6 @@ | |||
228 | 68 | { | 68 | { |
229 | 69 | return stub_buffer; | 69 | return stub_buffer; |
230 | 70 | } | 70 | } |
231 | 71 | bool alpha_enabled() const | ||
232 | 72 | { | ||
233 | 73 | return false; | ||
234 | 74 | } | ||
235 | 75 | geometry::Rectangle screen_position() const | 71 | geometry::Rectangle screen_position() const |
236 | 76 | { | 72 | { |
237 | 77 | return rect; | 73 | return rect; |
238 | @@ -133,7 +129,7 @@ | |||
239 | 133 | 129 | ||
240 | 134 | struct StubTranslucentRenderable : public StubRenderable | 130 | struct StubTranslucentRenderable : public StubRenderable |
241 | 135 | { | 131 | { |
243 | 136 | bool alpha_enabled() const override | 132 | bool shaped() const override |
244 | 137 | { | 133 | { |
245 | 138 | return true; | 134 | return true; |
246 | 139 | } | 135 | } |
247 | @@ -141,10 +137,6 @@ | |||
248 | 141 | 137 | ||
249 | 142 | struct PlaneAlphaRenderable : public StubRenderable | 138 | struct PlaneAlphaRenderable : public StubRenderable |
250 | 143 | { | 139 | { |
251 | 144 | bool alpha_enabled() const override | ||
252 | 145 | { | ||
253 | 146 | return true; | ||
254 | 147 | } | ||
255 | 148 | float alpha() const override | 140 | float alpha() const override |
256 | 149 | { | 141 | { |
257 | 150 | //approx 99% alpha | 142 | //approx 99% alpha |
I just noticed I had accidentally fixed too much in hwc_device.cpp, which stopped nested servers from overlaying. Now un-fixed hwc_device.cpp so it at least has the same old bug as before ("FIXME"), and overlays will still work :S