Merge lp:~alan-griffiths/mir/move-graphicsplatform-dependencies-to-graphics into lp:~mir-team/mir/trunk
- move-graphicsplatform-dependencies-to-graphics
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~alan-griffiths/mir/move-graphicsplatform-dependencies-to-graphics |
Merge into: | lp:~mir-team/mir/trunk |
Diff against target: |
3976 lines (+494/-482) 133 files modified
examples/buffer_render_target.cpp (+4/-4) examples/buffer_render_target.h (+4/-4) examples/render_surfaces.cpp (+1/-1) include/server/mir/compositor/back_buffer_strategy.h (+4/-5) include/server/mir/compositor/buffer_allocation_strategy.h (+2/-2) include/server/mir/compositor/buffer_basic.h (+5/-5) include/server/mir/compositor/buffer_stream_factory.h (+1/-1) include/server/mir/compositor/buffer_stream_surfaces.h (+2/-2) include/server/mir/compositor/buffer_swapper.h (+7/-7) include/server/mir/compositor/buffer_swapper_multi.h (+8/-10) include/server/mir/compositor/buffer_swapper_spin.h (+7/-7) include/server/mir/compositor/graphic_buffer_allocator.h (+2/-2) include/server/mir/compositor/multi_acquisition_back_buffer_strategy.h (+4/-6) include/server/mir/compositor/swapper_factory.h (+2/-2) include/server/mir/default_server_configuration.h (+3/-3) include/server/mir/frontend/session_mediator.h (+2/-2) include/server/mir/frontend/surface.h (+2/-2) include/server/mir/graphics/buffer.h (+1/-2) include/server/mir/graphics/buffer_id.h (+4/-4) include/server/mir/graphics/buffer_initializer.h (+3/-6) include/server/mir/graphics/gl_pixel_buffer.h (+4/-4) include/server/mir/graphics/pixel_buffer.h (+5/-8) include/server/mir/graphics/platform.h (+2/-2) include/server/mir/shell/surface.h (+2/-2) include/server/mir/shell/surface_buffer_access.h (+2/-2) include/server/mir/shell/threaded_snapshot_strategy.h (+7/-4) include/server/mir/surfaces/buffer_stream.h (+4/-4) include/server/mir/surfaces/surface.h (+6/-4) include/shared/mir/int_wrapper.h (+6/-6) include/test/mir_test_doubles/mock_buffer.h (+4/-4) include/test/mir_test_doubles/mock_buffer_bundle.h (+4/-4) include/test/mir_test_doubles/mock_buffer_initializer.h (+2/-2) include/test/mir_test_doubles/mock_buffer_stream.h (+2/-2) include/test/mir_test_doubles/mock_display_support_provider.h (+1/-1) include/test/mir_test_doubles/mock_hwc_interface.h (+1/-1) include/test/mir_test_doubles/mock_hwc_organizer.h (+1/-1) include/test/mir_test_doubles/mock_interpreter_resource_cache.h (+2/-2) include/test/mir_test_doubles/mock_surface.h (+1/-1) include/test/mir_test_doubles/mock_swapper.h (+7/-7) include/test/mir_test_doubles/mock_swapper_factory.h (+1/-1) include/test/mir_test_doubles/null_platform.h (+1/-1) include/test/mir_test_doubles/stub_buffer.h (+1/-1) include/test/mir_test_doubles/stub_buffer_stream.h (+4/-4) include/test/mir_test_doubles/stub_surface.h (+2/-2) src/server/compositor/buffer_basic.cpp (+5/-3) src/server/compositor/buffer_bundle.h (+6/-5) src/server/compositor/buffer_stream_factory.cpp (+2/-2) src/server/compositor/buffer_stream_surfaces.cpp (+3/-2) src/server/compositor/buffer_swapper_multi.cpp (+8/-7) src/server/compositor/buffer_swapper_spin.cpp (+7/-7) src/server/compositor/multi_acquisition_back_buffer_strategy.cpp (+5/-4) src/server/compositor/swapper_factory.cpp (+5/-4) src/server/compositor/switching_bundle.cpp (+7/-6) src/server/compositor/switching_bundle.h (+4/-4) src/server/compositor/temporary_buffers.cpp (+3/-2) src/server/compositor/temporary_buffers.h (+8/-7) src/server/default_server_configuration.cpp (+1/-1) src/server/frontend/client_buffer_tracker.cpp (+4/-4) src/server/frontend/client_buffer_tracker.h (+4/-4) src/server/frontend/session_mediator.cpp (+2/-2) src/server/graphics/android/android_buffer_allocator.cpp (+1/-1) src/server/graphics/android/android_graphic_buffer_allocator.h (+1/-1) src/server/graphics/android/android_platform.cpp (+2/-2) src/server/graphics/android/android_platform.h (+1/-1) src/server/graphics/android/default_framebuffer_factory.cpp (+4/-3) src/server/graphics/android/default_framebuffer_factory.h (+4/-3) src/server/graphics/android/display_support_provider.h (+3/-5) src/server/graphics/android/fb_device.cpp (+4/-4) src/server/graphics/android/fb_device.h (+1/-1) src/server/graphics/android/fb_simple_swapper.cpp (+3/-3) src/server/graphics/android/fb_simple_swapper.h (+3/-3) src/server/graphics/android/fb_swapper.h (+4/-9) src/server/graphics/android/hwc10_device.cpp (+2/-2) src/server/graphics/android/hwc10_device.h (+1/-1) src/server/graphics/android/hwc11_device.cpp (+3/-3) src/server/graphics/android/hwc11_device.h (+3/-1) src/server/graphics/android/hwc_common_device.h (+1/-1) src/server/graphics/android/hwc_device.h (+1/-1) src/server/graphics/android/hwc_layerlist.cpp (+2/-2) src/server/graphics/android/hwc_layerlist.h (+4/-7) src/server/graphics/android/internal_client_window.cpp (+1/-1) src/server/graphics/android/interpreter_cache.cpp (+3/-3) src/server/graphics/android/interpreter_cache.h (+3/-3) src/server/graphics/android/interpreter_resource_cache.h (+4/-6) src/server/graphics/android/server_render_window.cpp (+1/-1) src/server/graphics/gbm/gbm_buffer_allocator.cpp (+2/-2) src/server/graphics/gbm/gbm_buffer_allocator.h (+2/-2) src/server/graphics/gbm/gbm_platform.cpp (+1/-1) src/server/graphics/gbm/gbm_platform.h (+1/-1) src/server/graphics/gbm/internal_native_display.cpp (+1/-1) src/server/graphics/gbm/internal_native_surface.cpp (+1/-1) src/server/graphics/gbm/internal_native_surface.h (+2/-2) src/server/graphics/gl_pixel_buffer.cpp (+2/-3) src/server/graphics/gl_renderer.cpp (+1/-1) src/server/shell/surface.cpp (+3/-2) src/server/shell/threaded_snapshot_strategy.cpp (+5/-5) src/server/surfaces/surface.cpp (+3/-3) tests/integration-tests/client/test_client_render.cpp (+4/-4) tests/integration-tests/compositor/test_buffer_stream.cpp (+4/-3) tests/integration-tests/compositor/test_stress_buffer_swapper.cpp (+29/-28) tests/integration-tests/compositor/test_swapping_swappers.cpp (+2/-1) tests/integration-tests/graphics/gbm/test_buffer_integration.cpp (+8/-8) tests/integration-tests/shell/test_session.cpp (+5/-5) tests/integration-tests/test_display_info.cpp (+3/-3) tests/integration-tests/test_drm_auth_magic.cpp (+2/-2) tests/integration-tests/test_surfaceloop.cpp (+7/-7) tests/integration-tests/test_swapinterval.cpp (+2/-2) tests/mir_test_framework/testing_server_options.cpp (+2/-2) tests/unit-tests/compositor/test_buffer_id.cpp (+9/-8) tests/unit-tests/compositor/test_buffer_swapper.cpp (+13/-12) tests/unit-tests/compositor/test_buffer_swapper_double.cpp (+5/-4) tests/unit-tests/compositor/test_buffer_swapper_spin_triple.cpp (+10/-9) tests/unit-tests/compositor/test_buffer_swapper_triple.cpp (+6/-5) tests/unit-tests/compositor/test_swapper_factory.cpp (+7/-6) tests/unit-tests/compositor/test_switching_bundle.cpp (+2/-1) tests/unit-tests/compositor/test_temporary_buffers.cpp (+4/-3) tests/unit-tests/frontend/test_client_buffer_tracker.cpp (+15/-15) tests/unit-tests/frontend/test_session_mediator.cpp (+8/-8) tests/unit-tests/frontend/test_session_mediator_android.cpp (+2/-2) tests/unit-tests/frontend/test_session_mediator_gbm.cpp (+2/-2) tests/unit-tests/graphics/android/test_fb_simple_swapper.cpp (+9/-8) tests/unit-tests/graphics/android/test_framebuffer_factory.cpp (+2/-1) tests/unit-tests/graphics/android/test_hwc10_device.cpp (+2/-1) tests/unit-tests/graphics/android/test_hwc11_device.cpp (+4/-3) tests/unit-tests/graphics/android/test_internal_client.cpp (+3/-3) tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp (+3/-3) tests/unit-tests/graphics/android/test_server_interpreter.cpp (+7/-6) tests/unit-tests/graphics/gbm/test_internal_client.cpp (+0/-1) tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp (+1/-1) tests/unit-tests/shell/test_application_session.cpp (+1/-1) tests/unit-tests/shell/test_surface.cpp (+3/-2) tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp (+6/-5) tests/unit-tests/surfaces/test_surface_stack.cpp (+4/-4) |
To merge this branch: | bzr merge lp:~alan-griffiths/mir/move-graphicsplatform-dependencies-to-graphics |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Daniel van Vugt | Needs Fixing | ||
Review via email: mp+175078@code.launchpad.net |
Commit message
graphics, conpositor: Move dependencies of graphics platform into graphics.
Description of the change
graphics, conpositor: Move dependencies of graphics platform into graphics.
This is preparatory to splitting graphics off into an LGPL library that breaks the current dependency of graphicsplatform implementations on GPL code.
PS Jenkins bot (ps-jenkins) wrote : | # |
Daniel van Vugt (vanvugt) wrote : | # |
1. So the graphics namespace would no longer be used inside libmirserver right? Because everything remaining in libmirserver would ideally be moved into mir::server:: or grouped more logically in future.
2. Can we think of a better namespace than "mir::graphics::"? It seems silly to imply that other components of Mir are not graphics-related. It's all graphics-related. So calling the namespace "graphics" does not communicate the intention at all. Maybe use "driver" or "platform"...
Alexandros Frantzis (afrantzis) wrote : | # |
One concern I have is that we move some interfaces away from their consumers (e.g. msh::PixelBuffer). Although the consumer can still conceptually stay in control of the interface, the dissociation makes it less intuitive to do so. An alternative would be to change the license in files without moving them, but that's arguably more complicated and confusing for interested parties. So I guess this dissociation is something we will need to live with :/
Daniel van Vugt (vanvugt) wrote : | # |
There's a very simple (albeit initially labour intensive) solution I mentioned a while back: Just define a bare interface that is "a graphics driver" header, which has zero dependencies on anything else. Then both the server and the driver can use that interface without any license mixture.
Alan Griffiths (alan-griffiths) wrote : | # |
> 1. So the graphics namespace would no longer be used inside libmirserver
> right? Because everything remaining in libmirserver would ideally be moved
> into mir::server:: or grouped more logically in future.
No. Like the protobuf namespace the graphics namespace will be consumed in libmirserver, but implemented in another library.
> 2. Can we think of a better namespace than "mir::graphics::"? It seems silly
> to imply that other components of Mir are not graphics-related. It's all
> graphics-related. So calling the namespace "graphics" does not communicate the
> intention at all. Maybe use "driver" or "platform"...
Possibly, the name originates from the the project startup meeting (and I'm used to it).
I don't think this MP is the right place to change it though - an MP dedicated to changing the name would be far easier to review.
Daniel van Vugt (vanvugt) wrote : | # |
OK, it sounds quite plausible, and I hope reasonable, that the "graphics" namespace should go away. So I think it might be a bad idea to move everything into "graphics" if it should/might go away soon.
I think this MP is the correct place to fix it.
Daniel van Vugt (vanvugt) wrote : | # |
Now I look in more detail, there is a bigger issue - We are moving platform independent classes out of mir::compositor:: and into mir::graphics::. So the mir::graphics:: you see here is actually a superset of what will be the "platform" or driver". Much of it however is platform independent.
I'm now wondering if the whole exercise makes sense. Dividing the server library into 3 eventual parts seems a bit messy:
1. Existing GPL server code
2. Server code which has to become LGPL
3. The platform/driver code
I don't think designating 2 and 3 as mir::graphics:: is helpful. Particularly when 2 is more closely related to 1.
Daniel van Vugt (vanvugt) wrote : | # |
I suggest two possible solutions:
(a) Define a clear and completely independent driver interface which has no dependencies; or
(b) Move the whole libmirserver to LGPL, as a temporary step in the absence of (a).
Alan Griffiths (alan-griffiths) wrote : | # |
> I suggest two possible solutions:
>
> (a) Define a clear and completely independent driver interface which has no
> dependencies; or
> (b) Move the whole libmirserver to LGPL, as a temporary step in the absence of
> (a).
(c) Define a clear driver interface which only has dependencies on LGPL code, not on libmirserver. (This MP moves "graphics" a step in that direction - "graphics" will become that interface and new LGPL library.)
Alan Griffiths (alan-griffiths) wrote : | # |
> Now I look in more detail, there is a bigger issue - We are moving platform
> independent classes out of mir::compositor:: and into mir::graphics::. So the
> mir::graphics:: you see here is actually a superset of what will be the
> "platform" or driver". Much of it however is platform independent.
>
> I'm now wondering if the whole exercise makes sense. Dividing the server
> library into 3 eventual parts seems a bit messy:
>
> 1. Existing GPL server code
> 2. Server code which has to become LGPL
> 3. The platform/driver code
>
> I don't think designating 2 and 3 as mir::graphics:: is helpful. Particularly
> when 2 is more closely related to 1.
No-one is proposing to move 3 into graphics
Daniel van Vugt (vanvugt) wrote : | # |
I think dividing libmirserver into more libraries is just going to make maintenance more difficult. Plus we won't get it right first time and more classes will drift from GPL into LGPL over time. There's no reason to maintain any GPL server code if so much of it needs to be LGPL.
But again, if your "driver interface" is carefully designed to have zero dependencies, then the server library can stay full GPL.
- 859. By Alan Griffiths
-
merge lp:mir
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:859
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 860. By Alan Griffiths
-
merge lp:mir
- 861. By Alan Griffiths
-
merge lp:mir
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:861
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 862. By Alan Griffiths
-
Move IntWrapper to LGPL
Alan Griffiths (alan-griffiths) wrote : | # |
Note that everything moved in this MP is a header. All parts of the "graphics platform" interface that we are using.
Alan Griffiths (alan-griffiths) wrote : | # |
> One concern I have is that we move some interfaces away from their consumers
> (e.g. msh::PixelBuffer). Although the consumer can still conceptually stay in
> control of the interface, the dissociation makes it less intuitive to do so.
> An alternative would be to change the license in files without moving them,
> but that's arguably more complicated and confusing for interested parties. So
> I guess this dissociation is something we will need to live with :/
In the specific case of PixelBuffer it would also be possible to move the gl_pixel_
Perhaps the same is true of the other implementations in graphics? I need to think about this (and where, if anywhere, to put them).
Buffer however is implemented differently across gbm and android.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:862
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
Unmerged revisions
- 862. By Alan Griffiths
-
Move IntWrapper to LGPL
- 861. By Alan Griffiths
-
merge lp:mir
- 860. By Alan Griffiths
-
merge lp:mir
- 859. By Alan Griffiths
-
merge lp:mir
- 858. By Alan Griffiths
-
Move buffer.h and buffer_id.h to graphics
- 857. By Alan Griffiths
-
Move Buffer interface and BufferID to graphics
- 856. By Alan Griffiths
-
Simpler and more flexible IntWrapper
- 855. By Alan Griffiths
-
merge lp:mir
- 854. By Alan Griffiths
-
Move shell/pixel_
buffer. h to graphics - 853. By Alan Griffiths
-
Move PixelBuffer to graphics
Preview Diff
1 | === modified file 'examples/buffer_render_target.cpp' | |||
2 | --- examples/buffer_render_target.cpp 2013-03-21 03:32:59 +0000 | |||
3 | +++ examples/buffer_render_target.cpp 2013-07-17 14:20:33 +0000 | |||
4 | @@ -17,16 +17,16 @@ | |||
5 | 17 | */ | 17 | */ |
6 | 18 | 18 | ||
7 | 19 | #include "buffer_render_target.h" | 19 | #include "buffer_render_target.h" |
9 | 20 | #include "mir/compositor/buffer.h" | 20 | #include "mir/graphics/buffer.h" |
10 | 21 | 21 | ||
11 | 22 | #include <GLES2/gl2ext.h> | 22 | #include <GLES2/gl2ext.h> |
12 | 23 | #include <stdexcept> | 23 | #include <stdexcept> |
13 | 24 | 24 | ||
14 | 25 | namespace geom = mir::geometry; | 25 | namespace geom = mir::geometry; |
16 | 26 | namespace mc = mir::compositor; | 26 | namespace mg = mir::graphics; |
17 | 27 | namespace mt = mir::tools; | 27 | namespace mt = mir::tools; |
18 | 28 | 28 | ||
20 | 29 | mt::BufferRenderTarget::BufferRenderTarget(mc::Buffer& buffer) | 29 | mt::BufferRenderTarget::BufferRenderTarget(mg::Buffer& buffer) |
21 | 30 | : buffer(buffer) | 30 | : buffer(buffer) |
22 | 31 | { | 31 | { |
23 | 32 | resources.setup(buffer); | 32 | resources.setup(buffer); |
24 | @@ -55,7 +55,7 @@ | |||
25 | 55 | glDeleteFramebuffers(1, &fbo); | 55 | glDeleteFramebuffers(1, &fbo); |
26 | 56 | } | 56 | } |
27 | 57 | 57 | ||
29 | 58 | void mt::BufferRenderTarget::Resources::setup(mc::Buffer& buffer) | 58 | void mt::BufferRenderTarget::Resources::setup(mg::Buffer& buffer) |
30 | 59 | { | 59 | { |
31 | 60 | geom::Size buf_size = buffer.size(); | 60 | geom::Size buf_size = buffer.size(); |
32 | 61 | 61 | ||
33 | 62 | 62 | ||
34 | === modified file 'examples/buffer_render_target.h' | |||
35 | --- examples/buffer_render_target.h 2013-03-21 03:32:59 +0000 | |||
36 | +++ examples/buffer_render_target.h 2013-07-17 14:20:33 +0000 | |||
37 | @@ -25,7 +25,7 @@ | |||
38 | 25 | 25 | ||
39 | 26 | namespace mir | 26 | namespace mir |
40 | 27 | { | 27 | { |
42 | 28 | namespace compositor | 28 | namespace graphics |
43 | 29 | { | 29 | { |
44 | 30 | class Buffer; | 30 | class Buffer; |
45 | 31 | } | 31 | } |
46 | @@ -35,7 +35,7 @@ | |||
47 | 35 | class BufferRenderTarget | 35 | class BufferRenderTarget |
48 | 36 | { | 36 | { |
49 | 37 | public: | 37 | public: |
51 | 38 | BufferRenderTarget(mir::compositor::Buffer& buffer); | 38 | BufferRenderTarget(mir::graphics::Buffer& buffer); |
52 | 39 | ~BufferRenderTarget(); | 39 | ~BufferRenderTarget(); |
53 | 40 | 40 | ||
54 | 41 | void make_current(); | 41 | void make_current(); |
55 | @@ -49,7 +49,7 @@ | |||
56 | 49 | { | 49 | { |
57 | 50 | } | 50 | } |
58 | 51 | ~Resources(); | 51 | ~Resources(); |
60 | 52 | void setup(mir::compositor::Buffer& buffer); | 52 | void setup(mir::graphics::Buffer& buffer); |
61 | 53 | 53 | ||
62 | 54 | GLuint fbo; | 54 | GLuint fbo; |
63 | 55 | GLuint color_tex; | 55 | GLuint color_tex; |
64 | @@ -57,7 +57,7 @@ | |||
65 | 57 | }; | 57 | }; |
66 | 58 | 58 | ||
67 | 59 | Resources resources; | 59 | Resources resources; |
69 | 60 | mir::compositor::Buffer& buffer; | 60 | mir::graphics::Buffer& buffer; |
70 | 61 | }; | 61 | }; |
71 | 62 | 62 | ||
72 | 63 | } | 63 | } |
73 | 64 | 64 | ||
74 | === modified file 'examples/render_surfaces.cpp' | |||
75 | --- examples/render_surfaces.cpp 2013-07-11 16:54:41 +0000 | |||
76 | +++ examples/render_surfaces.cpp 2013-07-17 14:20:33 +0000 | |||
77 | @@ -289,7 +289,7 @@ | |||
78 | 289 | { | 289 | { |
79 | 290 | } | 290 | } |
80 | 291 | 291 | ||
82 | 292 | void operator()(mc::Buffer& buffer) | 292 | void operator()(mg::Buffer& buffer) |
83 | 293 | { | 293 | { |
84 | 294 | mt::BufferRenderTarget brt{buffer}; | 294 | mt::BufferRenderTarget brt{buffer}; |
85 | 295 | brt.make_current(); | 295 | brt.make_current(); |
86 | 296 | 296 | ||
87 | === modified file 'include/server/mir/compositor/back_buffer_strategy.h' | |||
88 | --- include/server/mir/compositor/back_buffer_strategy.h 2013-06-17 15:55:04 +0000 | |||
89 | +++ include/server/mir/compositor/back_buffer_strategy.h 2013-07-17 14:20:33 +0000 | |||
90 | @@ -23,18 +23,17 @@ | |||
91 | 23 | 23 | ||
92 | 24 | namespace mir | 24 | namespace mir |
93 | 25 | { | 25 | { |
94 | 26 | namespace graphics { class Buffer; } | ||
95 | 27 | |||
96 | 26 | namespace compositor | 28 | namespace compositor |
97 | 27 | { | 29 | { |
98 | 28 | |||
99 | 29 | class Buffer; | ||
100 | 30 | |||
101 | 31 | class BackBufferStrategy | 30 | class BackBufferStrategy |
102 | 32 | { | 31 | { |
103 | 33 | public: | 32 | public: |
104 | 34 | virtual ~BackBufferStrategy() = default; | 33 | virtual ~BackBufferStrategy() = default; |
105 | 35 | 34 | ||
108 | 36 | virtual std::shared_ptr<Buffer> acquire() = 0; | 35 | virtual std::shared_ptr<graphics::Buffer> acquire() = 0; |
109 | 37 | virtual void release(std::shared_ptr<Buffer> const& buffer) = 0; | 36 | virtual void release(std::shared_ptr<graphics::Buffer> const& buffer) = 0; |
110 | 38 | 37 | ||
111 | 39 | protected: | 38 | protected: |
112 | 40 | BackBufferStrategy() = default; | 39 | BackBufferStrategy() = default; |
113 | 41 | 40 | ||
114 | === modified file 'include/server/mir/compositor/buffer_allocation_strategy.h' | |||
115 | --- include/server/mir/compositor/buffer_allocation_strategy.h 2013-06-21 23:40:49 +0000 | |||
116 | +++ include/server/mir/compositor/buffer_allocation_strategy.h 2013-07-17 14:20:33 +0000 | |||
117 | @@ -21,7 +21,7 @@ | |||
118 | 21 | #ifndef MIR_COMPOSITOR_BUFFER_ALLOCATION_STRATEGY_H_ | 21 | #ifndef MIR_COMPOSITOR_BUFFER_ALLOCATION_STRATEGY_H_ |
119 | 22 | #define MIR_COMPOSITOR_BUFFER_ALLOCATION_STRATEGY_H_ | 22 | #define MIR_COMPOSITOR_BUFFER_ALLOCATION_STRATEGY_H_ |
120 | 23 | 23 | ||
122 | 24 | #include "mir/compositor/buffer.h" | 24 | #include "mir/graphics/buffer.h" |
123 | 25 | 25 | ||
124 | 26 | #include <vector> | 26 | #include <vector> |
125 | 27 | #include <memory> | 27 | #include <memory> |
126 | @@ -46,7 +46,7 @@ | |||
127 | 46 | { | 46 | { |
128 | 47 | public: | 47 | public: |
129 | 48 | virtual std::shared_ptr<BufferSwapper> create_swapper_reuse_buffers(BufferProperties const&, | 48 | virtual std::shared_ptr<BufferSwapper> create_swapper_reuse_buffers(BufferProperties const&, |
131 | 49 | std::vector<std::shared_ptr<Buffer>>&, size_t, SwapperType) const = 0; | 49 | std::vector<std::shared_ptr<graphics::Buffer>>&, size_t, SwapperType) const = 0; |
132 | 50 | virtual std::shared_ptr<BufferSwapper> create_swapper_new_buffers( | 50 | virtual std::shared_ptr<BufferSwapper> create_swapper_new_buffers( |
133 | 51 | BufferProperties& actual_properties, BufferProperties const& requested_properties, SwapperType) const = 0; | 51 | BufferProperties& actual_properties, BufferProperties const& requested_properties, SwapperType) const = 0; |
134 | 52 | 52 | ||
135 | 53 | 53 | ||
136 | === modified file 'include/server/mir/compositor/buffer_basic.h' | |||
137 | --- include/server/mir/compositor/buffer_basic.h 2013-04-24 05:22:20 +0000 | |||
138 | +++ include/server/mir/compositor/buffer_basic.h 2013-07-17 14:20:33 +0000 | |||
139 | @@ -18,26 +18,26 @@ | |||
140 | 18 | #ifndef MIR_COMPOSITOR_BUFFER_BASIC_H_ | 18 | #ifndef MIR_COMPOSITOR_BUFFER_BASIC_H_ |
141 | 19 | #define MIR_COMPOSITOR_BUFFER_BASIC_H_ | 19 | #define MIR_COMPOSITOR_BUFFER_BASIC_H_ |
142 | 20 | 20 | ||
145 | 21 | #include "mir/compositor/buffer.h" | 21 | #include "mir/graphics/buffer.h" |
146 | 22 | #include "mir/compositor/buffer_id.h" | 22 | #include "mir/graphics/buffer_id.h" |
147 | 23 | 23 | ||
148 | 24 | namespace mir | 24 | namespace mir |
149 | 25 | { | 25 | { |
150 | 26 | namespace compositor | 26 | namespace compositor |
151 | 27 | { | 27 | { |
152 | 28 | 28 | ||
154 | 29 | class BufferBasic : public Buffer | 29 | class BufferBasic : public graphics::Buffer |
155 | 30 | { | 30 | { |
156 | 31 | public: | 31 | public: |
157 | 32 | BufferBasic(); | 32 | BufferBasic(); |
158 | 33 | 33 | ||
160 | 34 | BufferID id() const | 34 | graphics::BufferID id() const |
161 | 35 | { | 35 | { |
162 | 36 | return buffer_id; | 36 | return buffer_id; |
163 | 37 | } | 37 | } |
164 | 38 | 38 | ||
165 | 39 | private: | 39 | private: |
167 | 40 | BufferID const buffer_id; | 40 | graphics::BufferID const buffer_id; |
168 | 41 | }; | 41 | }; |
169 | 42 | 42 | ||
170 | 43 | } | 43 | } |
171 | 44 | 44 | ||
172 | === modified file 'include/server/mir/compositor/buffer_stream_factory.h' | |||
173 | --- include/server/mir/compositor/buffer_stream_factory.h 2013-06-12 15:36:31 +0000 | |||
174 | +++ include/server/mir/compositor/buffer_stream_factory.h 2013-07-17 14:20:33 +0000 | |||
175 | @@ -21,7 +21,7 @@ | |||
176 | 21 | #ifndef MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_ | 21 | #ifndef MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_ |
177 | 22 | #define MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_ | 22 | #define MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_ |
178 | 23 | 23 | ||
180 | 24 | #include "mir/compositor/buffer.h" | 24 | #include "mir/graphics/buffer.h" |
181 | 25 | #include "mir/surfaces/buffer_stream_factory.h" | 25 | #include "mir/surfaces/buffer_stream_factory.h" |
182 | 26 | 26 | ||
183 | 27 | #include <memory> | 27 | #include <memory> |
184 | 28 | 28 | ||
185 | === modified file 'include/server/mir/compositor/buffer_stream_surfaces.h' | |||
186 | --- include/server/mir/compositor/buffer_stream_surfaces.h 2013-06-21 23:40:49 +0000 | |||
187 | +++ include/server/mir/compositor/buffer_stream_surfaces.h 2013-07-17 14:20:33 +0000 | |||
188 | @@ -40,9 +40,9 @@ | |||
189 | 40 | BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& swapper); | 40 | BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& swapper); |
190 | 41 | ~BufferStreamSurfaces(); | 41 | ~BufferStreamSurfaces(); |
191 | 42 | 42 | ||
193 | 43 | std::shared_ptr<Buffer> secure_client_buffer(); | 43 | std::shared_ptr<graphics::Buffer> secure_client_buffer(); |
194 | 44 | 44 | ||
196 | 45 | std::shared_ptr<Buffer> lock_back_buffer(); | 45 | std::shared_ptr<graphics::Buffer> lock_back_buffer(); |
197 | 46 | 46 | ||
198 | 47 | geometry::PixelFormat get_stream_pixel_format(); | 47 | geometry::PixelFormat get_stream_pixel_format(); |
199 | 48 | geometry::Size stream_size(); | 48 | geometry::Size stream_size(); |
200 | 49 | 49 | ||
201 | === modified file 'include/server/mir/compositor/buffer_swapper.h' | |||
202 | --- include/server/mir/compositor/buffer_swapper.h 2013-06-19 09:57:32 +0000 | |||
203 | +++ include/server/mir/compositor/buffer_swapper.h 2013-07-17 14:20:33 +0000 | |||
204 | @@ -25,10 +25,10 @@ | |||
205 | 25 | 25 | ||
206 | 26 | namespace mir | 26 | namespace mir |
207 | 27 | { | 27 | { |
208 | 28 | namespace graphics { class Buffer; } | ||
209 | 29 | |||
210 | 28 | namespace compositor | 30 | namespace compositor |
211 | 29 | { | 31 | { |
212 | 30 | class Buffer; | ||
213 | 31 | |||
214 | 32 | class BufferSwapper | 32 | class BufferSwapper |
215 | 33 | { | 33 | { |
216 | 34 | public: | 34 | public: |
217 | @@ -41,12 +41,12 @@ | |||
218 | 41 | * | 41 | * |
219 | 42 | * May throw a mc::BufferSwapperRequestAbortedException. | 42 | * May throw a mc::BufferSwapperRequestAbortedException. |
220 | 43 | */ | 43 | */ |
222 | 44 | virtual std::shared_ptr<Buffer> client_acquire() = 0; | 44 | virtual std::shared_ptr<graphics::Buffer> client_acquire() = 0; |
223 | 45 | 45 | ||
224 | 46 | /** | 46 | /** |
225 | 47 | * Releases a client buffer, making it available to the compositor. | 47 | * Releases a client buffer, making it available to the compositor. |
226 | 48 | */ | 48 | */ |
228 | 49 | virtual void client_release(std::shared_ptr<Buffer> const& queued_buffer) = 0; | 49 | virtual void client_release(std::shared_ptr<graphics::Buffer> const& queued_buffer) = 0; |
229 | 50 | 50 | ||
230 | 51 | /** | 51 | /** |
231 | 52 | * Acquires the last posted buffer. | 52 | * Acquires the last posted buffer. |
232 | @@ -61,12 +61,12 @@ | |||
233 | 61 | * | 61 | * |
234 | 62 | * May throw a mc::BufferSwapperOutOfBuffersException. | 62 | * May throw a mc::BufferSwapperOutOfBuffersException. |
235 | 63 | */ | 63 | */ |
237 | 64 | virtual std::shared_ptr<Buffer> compositor_acquire() = 0; | 64 | virtual std::shared_ptr<graphics::Buffer> compositor_acquire() = 0; |
238 | 65 | 65 | ||
239 | 66 | /** | 66 | /** |
240 | 67 | * Releases a compositor buffer, making it available to the client. | 67 | * Releases a compositor buffer, making it available to the client. |
241 | 68 | */ | 68 | */ |
243 | 69 | virtual void compositor_release(std::shared_ptr<Buffer> const& released_buffer) = 0; | 69 | virtual void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer) = 0; |
244 | 70 | 70 | ||
245 | 71 | /** | 71 | /** |
246 | 72 | * Forces client requests on the buffer swapper to abort. | 72 | * Forces client requests on the buffer swapper to abort. |
247 | @@ -110,7 +110,7 @@ | |||
248 | 110 | * After the completion of this call, neither the client, nor the compositor can | 110 | * After the completion of this call, neither the client, nor the compositor can |
249 | 111 | * continue to request or return buffers to this swapper. | 111 | * continue to request or return buffers to this swapper. |
250 | 112 | */ | 112 | */ |
252 | 113 | virtual void end_responsibility(std::vector<std::shared_ptr<Buffer>>& buffers, size_t& original_size) = 0; | 113 | virtual void end_responsibility(std::vector<std::shared_ptr<graphics::Buffer>>& buffers, size_t& original_size) = 0; |
253 | 114 | 114 | ||
254 | 115 | /** | 115 | /** |
255 | 116 | * If the swapper has been used, and you want to preserve the buffers that have been used, | 116 | * If the swapper has been used, and you want to preserve the buffers that have been used, |
256 | 117 | 117 | ||
257 | === modified file 'include/server/mir/compositor/buffer_swapper_multi.h' | |||
258 | --- include/server/mir/compositor/buffer_swapper_multi.h 2013-06-15 11:09:16 +0000 | |||
259 | +++ include/server/mir/compositor/buffer_swapper_multi.h 2013-07-17 14:20:33 +0000 | |||
260 | @@ -34,28 +34,26 @@ | |||
261 | 34 | namespace compositor | 34 | namespace compositor |
262 | 35 | { | 35 | { |
263 | 36 | 36 | ||
264 | 37 | class Buffer; | ||
265 | 38 | |||
266 | 39 | class BufferSwapperMulti : public BufferSwapper | 37 | class BufferSwapperMulti : public BufferSwapper |
267 | 40 | { | 38 | { |
268 | 41 | public: | 39 | public: |
270 | 42 | explicit BufferSwapperMulti(std::vector<std::shared_ptr<compositor::Buffer>>& buffer_list, size_t swapper_size); | 40 | explicit BufferSwapperMulti(std::vector<std::shared_ptr<graphics::Buffer>>& buffer_list, size_t swapper_size); |
271 | 43 | 41 | ||
276 | 44 | std::shared_ptr<Buffer> client_acquire(); | 42 | std::shared_ptr<graphics::Buffer> client_acquire(); |
277 | 45 | void client_release(std::shared_ptr<Buffer> const& queued_buffer); | 43 | void client_release(std::shared_ptr<graphics::Buffer> const& queued_buffer); |
278 | 46 | std::shared_ptr<Buffer> compositor_acquire(); | 44 | std::shared_ptr<graphics::Buffer> compositor_acquire(); |
279 | 47 | void compositor_release(std::shared_ptr<Buffer> const& released_buffer); | 45 | void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer); |
280 | 48 | 46 | ||
281 | 49 | void force_client_abort(); | 47 | void force_client_abort(); |
282 | 50 | void force_requests_to_complete(); | 48 | void force_requests_to_complete(); |
284 | 51 | void end_responsibility(std::vector<std::shared_ptr<Buffer>>&, size_t&); | 49 | void end_responsibility(std::vector<std::shared_ptr<graphics::Buffer>>&, size_t&); |
285 | 52 | 50 | ||
286 | 53 | private: | 51 | private: |
287 | 54 | std::mutex swapper_mutex; | 52 | std::mutex swapper_mutex; |
288 | 55 | std::condition_variable client_available_cv; | 53 | std::condition_variable client_available_cv; |
289 | 56 | 54 | ||
292 | 57 | std::deque<std::shared_ptr<Buffer>> client_queue; | 55 | std::deque<std::shared_ptr<graphics::Buffer>> client_queue; |
293 | 58 | std::deque<std::shared_ptr<Buffer>> compositor_queue; | 56 | std::deque<std::shared_ptr<graphics::Buffer>> compositor_queue; |
294 | 59 | unsigned int in_use_by_client; | 57 | unsigned int in_use_by_client; |
295 | 60 | unsigned int const swapper_size; | 58 | unsigned int const swapper_size; |
296 | 61 | int clients_trying_to_acquire; | 59 | int clients_trying_to_acquire; |
297 | 62 | 60 | ||
298 | === modified file 'include/server/mir/compositor/buffer_swapper_spin.h' | |||
299 | --- include/server/mir/compositor/buffer_swapper_spin.h 2013-07-16 09:31:36 +0000 | |||
300 | +++ include/server/mir/compositor/buffer_swapper_spin.h 2013-07-17 14:20:33 +0000 | |||
301 | @@ -47,21 +47,21 @@ | |||
302 | 47 | class BufferSwapperSpin : public BufferSwapper | 47 | class BufferSwapperSpin : public BufferSwapper |
303 | 48 | { | 48 | { |
304 | 49 | public: | 49 | public: |
306 | 50 | BufferSwapperSpin(std::vector<std::shared_ptr<compositor::Buffer>>& buffer_list, size_t swapper_size); | 50 | BufferSwapperSpin(std::vector<std::shared_ptr<graphics::Buffer>>& buffer_list, size_t swapper_size); |
307 | 51 | 51 | ||
312 | 52 | std::shared_ptr<Buffer> client_acquire(); | 52 | std::shared_ptr<graphics::Buffer> client_acquire(); |
313 | 53 | void client_release(std::shared_ptr<Buffer> const& queued_buffer); | 53 | void client_release(std::shared_ptr<graphics::Buffer> const& queued_buffer); |
314 | 54 | std::shared_ptr<Buffer> compositor_acquire(); | 54 | std::shared_ptr<graphics::Buffer> compositor_acquire(); |
315 | 55 | void compositor_release(std::shared_ptr<Buffer> const& released_buffer); | 55 | void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer); |
316 | 56 | 56 | ||
317 | 57 | void force_client_abort(); | 57 | void force_client_abort(); |
318 | 58 | void force_requests_to_complete(); | 58 | void force_requests_to_complete(); |
320 | 59 | void end_responsibility(std::vector<std::shared_ptr<Buffer>>&, size_t&); | 59 | void end_responsibility(std::vector<std::shared_ptr<graphics::Buffer>>&, size_t&); |
321 | 60 | 60 | ||
322 | 61 | private: | 61 | private: |
323 | 62 | std::mutex swapper_mutex; | 62 | std::mutex swapper_mutex; |
324 | 63 | 63 | ||
326 | 64 | std::deque<std::shared_ptr<Buffer>> buffer_queue; | 64 | std::deque<std::shared_ptr<graphics::Buffer>> buffer_queue; |
327 | 65 | unsigned int in_use_by_client; | 65 | unsigned int in_use_by_client; |
328 | 66 | bool client_submitted_new_buffer; | 66 | bool client_submitted_new_buffer; |
329 | 67 | size_t const swapper_size; | 67 | size_t const swapper_size; |
330 | 68 | 68 | ||
331 | === modified file 'include/server/mir/compositor/graphic_buffer_allocator.h' | |||
332 | --- include/server/mir/compositor/graphic_buffer_allocator.h 2013-06-17 09:51:42 +0000 | |||
333 | +++ include/server/mir/compositor/graphic_buffer_allocator.h 2013-07-17 14:20:33 +0000 | |||
334 | @@ -19,7 +19,7 @@ | |||
335 | 19 | #ifndef MIR_COMPOSITOR_GRAPHIC_BUFFER_ALLOCATOR_H_ | 19 | #ifndef MIR_COMPOSITOR_GRAPHIC_BUFFER_ALLOCATOR_H_ |
336 | 20 | #define MIR_COMPOSITOR_GRAPHIC_BUFFER_ALLOCATOR_H_ | 20 | #define MIR_COMPOSITOR_GRAPHIC_BUFFER_ALLOCATOR_H_ |
337 | 21 | 21 | ||
339 | 22 | #include "mir/compositor/buffer.h" | 22 | #include "mir/graphics/buffer.h" |
340 | 23 | 23 | ||
341 | 24 | #include <vector> | 24 | #include <vector> |
342 | 25 | #include <memory> | 25 | #include <memory> |
343 | @@ -44,7 +44,7 @@ | |||
344 | 44 | * | 44 | * |
345 | 45 | * \param [in] buffer_properties the properties the allocated buffer should have | 45 | * \param [in] buffer_properties the properties the allocated buffer should have |
346 | 46 | */ | 46 | */ |
348 | 47 | virtual std::shared_ptr<Buffer> alloc_buffer( | 47 | virtual std::shared_ptr<graphics::Buffer> alloc_buffer( |
349 | 48 | BufferProperties const& buffer_properties) = 0; | 48 | BufferProperties const& buffer_properties) = 0; |
350 | 49 | 49 | ||
351 | 50 | /** | 50 | /** |
352 | 51 | 51 | ||
353 | === modified file 'include/server/mir/compositor/multi_acquisition_back_buffer_strategy.h' | |||
354 | --- include/server/mir/compositor/multi_acquisition_back_buffer_strategy.h 2013-06-17 15:55:04 +0000 | |||
355 | +++ include/server/mir/compositor/multi_acquisition_back_buffer_strategy.h 2013-07-17 14:20:33 +0000 | |||
356 | @@ -29,8 +29,6 @@ | |||
357 | 29 | { | 29 | { |
358 | 30 | namespace compositor | 30 | namespace compositor |
359 | 31 | { | 31 | { |
360 | 32 | |||
361 | 33 | class Buffer; | ||
362 | 34 | class BufferBundle; | 32 | class BufferBundle; |
363 | 35 | 33 | ||
364 | 36 | namespace detail | 34 | namespace detail |
365 | @@ -38,7 +36,7 @@ | |||
366 | 38 | 36 | ||
367 | 39 | struct AcquiredBufferInfo | 37 | struct AcquiredBufferInfo |
368 | 40 | { | 38 | { |
370 | 41 | std::weak_ptr<Buffer> buffer; | 39 | std::weak_ptr<graphics::Buffer> buffer; |
371 | 42 | bool partly_released; | 40 | bool partly_released; |
372 | 43 | int use_count; | 41 | int use_count; |
373 | 44 | }; | 42 | }; |
374 | @@ -50,12 +48,12 @@ | |||
375 | 50 | public: | 48 | public: |
376 | 51 | MultiAcquisitionBackBufferStrategy(std::shared_ptr<BufferBundle> const& buffer_bundle); | 49 | MultiAcquisitionBackBufferStrategy(std::shared_ptr<BufferBundle> const& buffer_bundle); |
377 | 52 | 50 | ||
380 | 53 | std::shared_ptr<Buffer> acquire(); | 51 | std::shared_ptr<graphics::Buffer> acquire(); |
381 | 54 | void release(std::shared_ptr<Buffer> const& buffer); | 52 | void release(std::shared_ptr<graphics::Buffer> const& buffer); |
382 | 55 | 53 | ||
383 | 56 | private: | 54 | private: |
384 | 57 | std::vector<detail::AcquiredBufferInfo>::iterator find_info( | 55 | std::vector<detail::AcquiredBufferInfo>::iterator find_info( |
386 | 58 | std::shared_ptr<Buffer> const& buffer); | 56 | std::shared_ptr<graphics::Buffer> const& buffer); |
387 | 59 | 57 | ||
388 | 60 | std::shared_ptr<BufferBundle> const buffer_bundle; | 58 | std::shared_ptr<BufferBundle> const buffer_bundle; |
389 | 61 | std::vector<detail::AcquiredBufferInfo> acquired_buffers; | 59 | std::vector<detail::AcquiredBufferInfo> acquired_buffers; |
390 | 62 | 60 | ||
391 | === modified file 'include/server/mir/compositor/swapper_factory.h' | |||
392 | --- include/server/mir/compositor/swapper_factory.h 2013-06-17 19:40:58 +0000 | |||
393 | +++ include/server/mir/compositor/swapper_factory.h 2013-07-17 14:20:33 +0000 | |||
394 | @@ -39,13 +39,13 @@ | |||
395 | 39 | int number_of_buffers); | 39 | int number_of_buffers); |
396 | 40 | 40 | ||
397 | 41 | std::shared_ptr<BufferSwapper> create_swapper_reuse_buffers(BufferProperties const&, | 41 | std::shared_ptr<BufferSwapper> create_swapper_reuse_buffers(BufferProperties const&, |
399 | 42 | std::vector<std::shared_ptr<Buffer>>&, size_t, SwapperType) const; | 42 | std::vector<std::shared_ptr<graphics::Buffer>>&, size_t, SwapperType) const; |
400 | 43 | std::shared_ptr<BufferSwapper> create_swapper_new_buffers( | 43 | std::shared_ptr<BufferSwapper> create_swapper_new_buffers( |
401 | 44 | BufferProperties& actual_properties, BufferProperties const& requested_properties, SwapperType) const; | 44 | BufferProperties& actual_properties, BufferProperties const& requested_properties, SwapperType) const; |
402 | 45 | 45 | ||
403 | 46 | private: | 46 | private: |
404 | 47 | void change_swapper_size( | 47 | void change_swapper_size( |
406 | 48 | std::vector<std::shared_ptr<Buffer>>&, size_t const, size_t, BufferProperties const&) const; | 48 | std::vector<std::shared_ptr<graphics::Buffer>>&, size_t const, size_t, BufferProperties const&) const; |
407 | 49 | 49 | ||
408 | 50 | std::shared_ptr<GraphicBufferAllocator> const gr_allocator; | 50 | std::shared_ptr<GraphicBufferAllocator> const gr_allocator; |
409 | 51 | unsigned int const synchronous_number_of_buffers; | 51 | unsigned int const synchronous_number_of_buffers; |
410 | 52 | 52 | ||
411 | === modified file 'include/server/mir/default_server_configuration.h' | |||
412 | --- include/server/mir/default_server_configuration.h 2013-07-15 09:29:14 +0000 | |||
413 | +++ include/server/mir/default_server_configuration.h 2013-07-17 14:20:33 +0000 | |||
414 | @@ -60,7 +60,6 @@ | |||
415 | 60 | class SessionListener; | 60 | class SessionListener; |
416 | 61 | class FocusController; | 61 | class FocusController; |
417 | 62 | class SessionManager; | 62 | class SessionManager; |
418 | 63 | class PixelBuffer; | ||
419 | 64 | class SnapshotStrategy; | 63 | class SnapshotStrategy; |
420 | 65 | } | 64 | } |
421 | 66 | namespace time | 65 | namespace time |
422 | @@ -82,6 +81,7 @@ | |||
423 | 82 | class Display; | 81 | class Display; |
424 | 83 | class ViewableArea; | 82 | class ViewableArea; |
425 | 84 | class BufferInitializer; | 83 | class BufferInitializer; |
426 | 84 | class PixelBuffer; | ||
427 | 85 | class DisplayReport; | 85 | class DisplayReport; |
428 | 86 | } | 86 | } |
429 | 87 | namespace input | 87 | namespace input |
430 | @@ -164,7 +164,7 @@ | |||
431 | 164 | virtual std::shared_ptr<shell::FocusSequence> the_shell_focus_sequence(); | 164 | virtual std::shared_ptr<shell::FocusSequence> the_shell_focus_sequence(); |
432 | 165 | virtual std::shared_ptr<shell::PlacementStrategy> the_shell_placement_strategy(); | 165 | virtual std::shared_ptr<shell::PlacementStrategy> the_shell_placement_strategy(); |
433 | 166 | virtual std::shared_ptr<shell::SessionListener> the_shell_session_listener(); | 166 | virtual std::shared_ptr<shell::SessionListener> the_shell_session_listener(); |
435 | 167 | virtual std::shared_ptr<shell::PixelBuffer> the_shell_pixel_buffer(); | 167 | virtual std::shared_ptr<graphics::PixelBuffer> the_shell_pixel_buffer(); |
436 | 168 | virtual std::shared_ptr<shell::SnapshotStrategy> the_shell_snapshot_strategy(); | 168 | virtual std::shared_ptr<shell::SnapshotStrategy> the_shell_snapshot_strategy(); |
437 | 169 | /** @} */ | 169 | /** @} */ |
438 | 170 | 170 | ||
439 | @@ -248,7 +248,7 @@ | |||
440 | 248 | CachedPtr<shell::FocusSequence> shell_focus_sequence; | 248 | CachedPtr<shell::FocusSequence> shell_focus_sequence; |
441 | 249 | CachedPtr<shell::PlacementStrategy> shell_placement_strategy; | 249 | CachedPtr<shell::PlacementStrategy> shell_placement_strategy; |
442 | 250 | CachedPtr<shell::SessionListener> shell_session_listener; | 250 | CachedPtr<shell::SessionListener> shell_session_listener; |
444 | 251 | CachedPtr<shell::PixelBuffer> shell_pixel_buffer; | 251 | CachedPtr<graphics::PixelBuffer> shell_pixel_buffer; |
445 | 252 | CachedPtr<shell::SnapshotStrategy> shell_snapshot_strategy; | 252 | CachedPtr<shell::SnapshotStrategy> shell_snapshot_strategy; |
446 | 253 | CachedPtr<compositor::CompositingStrategy> compositing_strategy; | 253 | CachedPtr<compositor::CompositingStrategy> compositing_strategy; |
447 | 254 | CachedPtr<compositor::OverlayRenderer> overlay_renderer; | 254 | CachedPtr<compositor::OverlayRenderer> overlay_renderer; |
448 | 255 | 255 | ||
449 | === modified file 'include/server/mir/frontend/session_mediator.h' | |||
450 | --- include/server/mir/frontend/session_mediator.h 2013-07-09 18:53:16 +0000 | |||
451 | +++ include/server/mir/frontend/session_mediator.h 2013-07-17 14:20:33 +0000 | |||
452 | @@ -34,13 +34,13 @@ | |||
453 | 34 | } | 34 | } |
454 | 35 | namespace graphics | 35 | namespace graphics |
455 | 36 | { | 36 | { |
456 | 37 | class Buffer; | ||
457 | 37 | class Platform; | 38 | class Platform; |
458 | 38 | class ViewableArea; | 39 | class ViewableArea; |
459 | 39 | } | 40 | } |
460 | 40 | 41 | ||
461 | 41 | namespace compositor | 42 | namespace compositor |
462 | 42 | { | 43 | { |
463 | 43 | class Buffer; | ||
464 | 44 | class GraphicBufferAllocator; | 44 | class GraphicBufferAllocator; |
465 | 45 | } | 45 | } |
466 | 46 | 46 | ||
467 | @@ -123,7 +123,7 @@ | |||
468 | 123 | std::shared_ptr<ResourceCache> const resource_cache; | 123 | std::shared_ptr<ResourceCache> const resource_cache; |
469 | 124 | std::shared_ptr<ClientBufferTracker> const client_tracker; | 124 | std::shared_ptr<ClientBufferTracker> const client_tracker; |
470 | 125 | 125 | ||
472 | 126 | std::shared_ptr<compositor::Buffer> client_buffer_resource; | 126 | std::shared_ptr<graphics::Buffer> client_buffer_resource; |
473 | 127 | 127 | ||
474 | 128 | std::mutex session_mutex; | 128 | std::mutex session_mutex; |
475 | 129 | std::shared_ptr<Session> session; | 129 | std::shared_ptr<Session> session; |
476 | 130 | 130 | ||
477 | === modified file 'include/server/mir/frontend/surface.h' | |||
478 | --- include/server/mir/frontend/surface.h 2013-06-25 05:42:49 +0000 | |||
479 | +++ include/server/mir/frontend/surface.h 2013-07-17 14:20:33 +0000 | |||
480 | @@ -29,7 +29,7 @@ | |||
481 | 29 | 29 | ||
482 | 30 | namespace mir | 30 | namespace mir |
483 | 31 | { | 31 | { |
485 | 32 | namespace compositor | 32 | namespace graphics |
486 | 33 | { | 33 | { |
487 | 34 | class Buffer; | 34 | class Buffer; |
488 | 35 | } | 35 | } |
489 | @@ -53,7 +53,7 @@ | |||
490 | 53 | virtual geometry::Size size() const = 0; | 53 | virtual geometry::Size size() const = 0; |
491 | 54 | virtual geometry::PixelFormat pixel_format() const = 0; | 54 | virtual geometry::PixelFormat pixel_format() const = 0; |
492 | 55 | 55 | ||
494 | 56 | virtual std::shared_ptr<compositor::Buffer> advance_client_buffer() = 0; | 56 | virtual std::shared_ptr<graphics::Buffer> advance_client_buffer() = 0; |
495 | 57 | 57 | ||
496 | 58 | virtual bool supports_input() const = 0; | 58 | virtual bool supports_input() const = 0; |
497 | 59 | virtual int client_input_fd() const = 0; | 59 | virtual int client_input_fd() const = 0; |
498 | 60 | 60 | ||
499 | === renamed file 'include/server/mir/compositor/buffer.h' => 'include/server/mir/graphics/buffer.h' | |||
500 | --- include/server/mir/compositor/buffer.h 2013-05-14 17:39:25 +0000 | |||
501 | +++ include/server/mir/graphics/buffer.h 2013-07-17 14:20:33 +0000 | |||
502 | @@ -26,9 +26,8 @@ | |||
503 | 26 | 26 | ||
504 | 27 | namespace mir | 27 | namespace mir |
505 | 28 | { | 28 | { |
507 | 29 | namespace compositor | 29 | namespace graphics |
508 | 30 | { | 30 | { |
509 | 31 | struct BufferIPCPackage; | ||
510 | 32 | class BufferID; | 31 | class BufferID; |
511 | 33 | 32 | ||
512 | 34 | class Buffer : public surfaces::GraphicRegion | 33 | class Buffer : public surfaces::GraphicRegion |
513 | 35 | 34 | ||
514 | === renamed file 'include/server/mir/compositor/buffer_id.h' => 'include/server/mir/graphics/buffer_id.h' | |||
515 | --- include/server/mir/compositor/buffer_id.h 2013-04-24 05:22:20 +0000 | |||
516 | +++ include/server/mir/graphics/buffer_id.h 2013-07-17 14:20:33 +0000 | |||
517 | @@ -15,14 +15,14 @@ | |||
518 | 15 | * | 15 | * |
519 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
520 | 17 | */ | 17 | */ |
523 | 18 | #ifndef MIR_COMPOSITOR_BUFFER_ID_H_ | 18 | #ifndef MIR_GRAPHICS_BUFFER_ID_H_ |
524 | 19 | #define MIR_COMPOSITOR_BUFFER_ID_H_ | 19 | #define MIR_GRAPHICS_BUFFER_ID_H_ |
525 | 20 | 20 | ||
526 | 21 | #include <cstdint> | 21 | #include <cstdint> |
527 | 22 | 22 | ||
528 | 23 | namespace mir | 23 | namespace mir |
529 | 24 | { | 24 | { |
531 | 25 | namespace compositor | 25 | namespace graphics |
532 | 26 | { | 26 | { |
533 | 27 | class BufferID | 27 | class BufferID |
534 | 28 | { | 28 | { |
535 | @@ -53,4 +53,4 @@ | |||
536 | 53 | 53 | ||
537 | 54 | } | 54 | } |
538 | 55 | } | 55 | } |
540 | 56 | #endif /* MIR_COMPOSITOR_BUFFER_ID_H_ */ | 56 | #endif /* MIR_GRAPHICS_BUFFER_ID_H_ */ |
541 | 57 | 57 | ||
542 | === modified file 'include/server/mir/graphics/buffer_initializer.h' | |||
543 | --- include/server/mir/graphics/buffer_initializer.h 2013-06-18 08:49:16 +0000 | |||
544 | +++ include/server/mir/graphics/buffer_initializer.h 2013-07-17 14:20:33 +0000 | |||
545 | @@ -21,12 +21,9 @@ | |||
546 | 21 | 21 | ||
547 | 22 | namespace mir | 22 | namespace mir |
548 | 23 | { | 23 | { |
550 | 24 | namespace compositor | 24 | namespace graphics |
551 | 25 | { | 25 | { |
552 | 26 | class Buffer; | 26 | class Buffer; |
553 | 27 | } | ||
554 | 28 | namespace graphics | ||
555 | 29 | { | ||
556 | 30 | 27 | ||
557 | 31 | /** | 28 | /** |
558 | 32 | * Interface to buffer initialization. | 29 | * Interface to buffer initialization. |
559 | @@ -37,7 +34,7 @@ | |||
560 | 37 | virtual ~BufferInitializer() {} | 34 | virtual ~BufferInitializer() {} |
561 | 38 | 35 | ||
562 | 39 | /** Operator to call to initialize a buffer. */ | 36 | /** Operator to call to initialize a buffer. */ |
564 | 40 | virtual void operator()(compositor::Buffer& buffer) = 0; | 37 | virtual void operator()(Buffer& buffer) = 0; |
565 | 41 | 38 | ||
566 | 42 | protected: | 39 | protected: |
567 | 43 | BufferInitializer() = default; | 40 | BufferInitializer() = default; |
568 | @@ -48,7 +45,7 @@ | |||
569 | 48 | class NullBufferInitializer : public BufferInitializer | 45 | class NullBufferInitializer : public BufferInitializer |
570 | 49 | { | 46 | { |
571 | 50 | public: | 47 | public: |
573 | 51 | void operator()(compositor::Buffer& /*buffer*/) {} | 48 | void operator()(Buffer& /*buffer*/) {} |
574 | 52 | }; | 49 | }; |
575 | 53 | 50 | ||
576 | 54 | } | 51 | } |
577 | 55 | 52 | ||
578 | === modified file 'include/server/mir/graphics/gl_pixel_buffer.h' | |||
579 | --- include/server/mir/graphics/gl_pixel_buffer.h 2013-06-25 10:44:13 +0000 | |||
580 | +++ include/server/mir/graphics/gl_pixel_buffer.h 2013-07-17 14:20:33 +0000 | |||
581 | @@ -19,7 +19,7 @@ | |||
582 | 19 | #ifndef MIR_GRAPHICS_GL_PIXEL_BUFFER_H_ | 19 | #ifndef MIR_GRAPHICS_GL_PIXEL_BUFFER_H_ |
583 | 20 | #define MIR_GRAPHICS_GL_PIXEL_BUFFER_H_ | 20 | #define MIR_GRAPHICS_GL_PIXEL_BUFFER_H_ |
584 | 21 | 21 | ||
586 | 22 | #include "mir/shell/pixel_buffer.h" | 22 | #include "mir/graphics/pixel_buffer.h" |
587 | 23 | 23 | ||
588 | 24 | #include <memory> | 24 | #include <memory> |
589 | 25 | #include <vector> | 25 | #include <vector> |
590 | @@ -30,17 +30,17 @@ | |||
591 | 30 | { | 30 | { |
592 | 31 | namespace graphics | 31 | namespace graphics |
593 | 32 | { | 32 | { |
595 | 33 | 33 | class Buffer; | |
596 | 34 | class GLContext; | 34 | class GLContext; |
597 | 35 | 35 | ||
598 | 36 | /** Extracts the pixels from a compositor::Buffer using GL facilities. */ | 36 | /** Extracts the pixels from a compositor::Buffer using GL facilities. */ |
600 | 37 | class GLPixelBuffer : public shell::PixelBuffer | 37 | class GLPixelBuffer : public PixelBuffer |
601 | 38 | { | 38 | { |
602 | 39 | public: | 39 | public: |
603 | 40 | GLPixelBuffer(std::unique_ptr<GLContext> gl_context); | 40 | GLPixelBuffer(std::unique_ptr<GLContext> gl_context); |
604 | 41 | ~GLPixelBuffer() noexcept; | 41 | ~GLPixelBuffer() noexcept; |
605 | 42 | 42 | ||
607 | 43 | void fill_from(compositor::Buffer& buffer); | 43 | void fill_from(Buffer& buffer); |
608 | 44 | void const* as_argb_8888(); | 44 | void const* as_argb_8888(); |
609 | 45 | geometry::Size size() const; | 45 | geometry::Size size() const; |
610 | 46 | geometry::Stride stride() const; | 46 | geometry::Stride stride() const; |
611 | 47 | 47 | ||
612 | === renamed file 'include/server/mir/shell/pixel_buffer.h' => 'include/server/mir/graphics/pixel_buffer.h' | |||
613 | --- include/server/mir/shell/pixel_buffer.h 2013-06-25 10:44:13 +0000 | |||
614 | +++ include/server/mir/graphics/pixel_buffer.h 2013-07-17 14:20:33 +0000 | |||
615 | @@ -16,20 +16,17 @@ | |||
616 | 16 | * Authored By: Alexandros Frantzis <alexandros.frantzis@canonical.com> | 16 | * Authored By: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
617 | 17 | */ | 17 | */ |
618 | 18 | 18 | ||
621 | 19 | #ifndef MIR_SHELL_PIXEL_BUFFER_H_ | 19 | #ifndef MIR_GRAPHICS_PIXEL_BUFFER_H_ |
622 | 20 | #define MIR_SHELL_PIXEL_BUFFER_H_ | 20 | #define MIR_GRAPHICS_PIXEL_BUFFER_H_ |
623 | 21 | 21 | ||
624 | 22 | #include "mir/geometry/size.h" | 22 | #include "mir/geometry/size.h" |
625 | 23 | #include "mir/geometry/dimensions.h" | 23 | #include "mir/geometry/dimensions.h" |
626 | 24 | 24 | ||
627 | 25 | namespace mir | 25 | namespace mir |
628 | 26 | { | 26 | { |
630 | 27 | namespace compositor | 27 | namespace graphics |
631 | 28 | { | 28 | { |
632 | 29 | class Buffer; | 29 | class Buffer; |
633 | 30 | } | ||
634 | 31 | namespace shell | ||
635 | 32 | { | ||
636 | 33 | 30 | ||
637 | 34 | /** | 31 | /** |
638 | 35 | * Interface for extracting the pixels from a compositor::Buffer. | 32 | * Interface for extracting the pixels from a compositor::Buffer. |
639 | @@ -44,7 +41,7 @@ | |||
640 | 44 | * | 41 | * |
641 | 45 | * \param [in] buffer the buffer to get the pixels of | 42 | * \param [in] buffer the buffer to get the pixels of |
642 | 46 | */ | 43 | */ |
644 | 47 | virtual void fill_from(compositor::Buffer& buffer) = 0; | 44 | virtual void fill_from(Buffer& buffer) = 0; |
645 | 48 | 45 | ||
646 | 49 | /** | 46 | /** |
647 | 50 | * The pixels in 0xAARRGGBB format. | 47 | * The pixels in 0xAARRGGBB format. |
648 | @@ -75,4 +72,4 @@ | |||
649 | 75 | } | 72 | } |
650 | 76 | } | 73 | } |
651 | 77 | 74 | ||
653 | 78 | #endif /* MIR_SHELL_PIXEL_BUFFER_H_ */ | 75 | #endif /* MIR_GRAPHICS_PIXEL_BUFFER_H_ */ |
654 | 79 | 76 | ||
655 | === modified file 'include/server/mir/graphics/platform.h' | |||
656 | --- include/server/mir/graphics/platform.h 2013-07-10 08:50:53 +0000 | |||
657 | +++ include/server/mir/graphics/platform.h 2013-07-17 14:20:33 +0000 | |||
658 | @@ -31,7 +31,6 @@ | |||
659 | 31 | namespace compositor | 31 | namespace compositor |
660 | 32 | { | 32 | { |
661 | 33 | class GraphicBufferAllocator; | 33 | class GraphicBufferAllocator; |
662 | 34 | class Buffer; | ||
663 | 35 | class BufferIPCPacker; | 34 | class BufferIPCPacker; |
664 | 36 | } | 35 | } |
665 | 37 | namespace options | 36 | namespace options |
666 | @@ -44,6 +43,7 @@ | |||
667 | 44 | namespace graphics | 43 | namespace graphics |
668 | 45 | { | 44 | { |
669 | 46 | 45 | ||
670 | 46 | class Buffer; | ||
671 | 47 | class Display; | 47 | class Display; |
672 | 48 | struct PlatformIPCPackage; | 48 | struct PlatformIPCPackage; |
673 | 49 | class BufferInitializer; | 49 | class BufferInitializer; |
674 | @@ -102,7 +102,7 @@ | |||
675 | 102 | * \param [in] buffer the buffer to fill the IPC package for | 102 | * \param [in] buffer the buffer to fill the IPC package for |
676 | 103 | */ | 103 | */ |
677 | 104 | virtual void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, | 104 | virtual void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, |
679 | 105 | std::shared_ptr<compositor::Buffer> const& buffer) const = 0; | 105 | std::shared_ptr<graphics::Buffer> const& buffer) const = 0; |
680 | 106 | 106 | ||
681 | 107 | /** | 107 | /** |
682 | 108 | * Creates the in-process client support object. | 108 | * Creates the in-process client support object. |
683 | 109 | 109 | ||
684 | === modified file 'include/server/mir/shell/surface.h' | |||
685 | --- include/server/mir/shell/surface.h 2013-07-09 18:55:47 +0000 | |||
686 | +++ include/server/mir/shell/surface.h 2013-07-17 14:20:33 +0000 | |||
687 | @@ -78,8 +78,8 @@ | |||
688 | 78 | virtual geometry::PixelFormat pixel_format() const; | 78 | virtual geometry::PixelFormat pixel_format() const; |
689 | 79 | 79 | ||
690 | 80 | virtual void with_most_recent_buffer_do( | 80 | virtual void with_most_recent_buffer_do( |
693 | 81 | std::function<void(compositor::Buffer&)> const& exec); | 81 | std::function<void(graphics::Buffer&)> const& exec); |
694 | 82 | virtual std::shared_ptr<compositor::Buffer> advance_client_buffer(); | 82 | virtual std::shared_ptr<graphics::Buffer> advance_client_buffer(); |
695 | 83 | 83 | ||
696 | 84 | virtual bool supports_input() const; | 84 | virtual bool supports_input() const; |
697 | 85 | virtual int client_input_fd() const; | 85 | virtual int client_input_fd() const; |
698 | 86 | 86 | ||
699 | === modified file 'include/server/mir/shell/surface_buffer_access.h' | |||
700 | --- include/server/mir/shell/surface_buffer_access.h 2013-06-25 13:19:14 +0000 | |||
701 | +++ include/server/mir/shell/surface_buffer_access.h 2013-07-17 14:20:33 +0000 | |||
702 | @@ -23,7 +23,7 @@ | |||
703 | 23 | 23 | ||
704 | 24 | namespace mir | 24 | namespace mir |
705 | 25 | { | 25 | { |
707 | 26 | namespace compositor | 26 | namespace graphics |
708 | 27 | { | 27 | { |
709 | 28 | class Buffer; | 28 | class Buffer; |
710 | 29 | } | 29 | } |
711 | @@ -36,7 +36,7 @@ | |||
712 | 36 | virtual ~SurfaceBufferAccess() = default; | 36 | virtual ~SurfaceBufferAccess() = default; |
713 | 37 | 37 | ||
714 | 38 | virtual void with_most_recent_buffer_do( | 38 | virtual void with_most_recent_buffer_do( |
716 | 39 | std::function<void(compositor::Buffer&)> const& exec) = 0; | 39 | std::function<void(graphics::Buffer&)> const& exec) = 0; |
717 | 40 | 40 | ||
718 | 41 | protected: | 41 | protected: |
719 | 42 | SurfaceBufferAccess() = default; | 42 | SurfaceBufferAccess() = default; |
720 | 43 | 43 | ||
721 | === modified file 'include/server/mir/shell/threaded_snapshot_strategy.h' | |||
722 | --- include/server/mir/shell/threaded_snapshot_strategy.h 2013-06-25 13:19:14 +0000 | |||
723 | +++ include/server/mir/shell/threaded_snapshot_strategy.h 2013-07-17 14:20:33 +0000 | |||
724 | @@ -27,16 +27,19 @@ | |||
725 | 27 | 27 | ||
726 | 28 | namespace mir | 28 | namespace mir |
727 | 29 | { | 29 | { |
728 | 30 | namespace graphics | ||
729 | 31 | { | ||
730 | 32 | class PixelBuffer; | ||
731 | 33 | } | ||
732 | 34 | |||
733 | 30 | namespace shell | 35 | namespace shell |
734 | 31 | { | 36 | { |
735 | 32 | |||
736 | 33 | class PixelBuffer; | ||
737 | 34 | class SnapshottingFunctor; | 37 | class SnapshottingFunctor; |
738 | 35 | 38 | ||
739 | 36 | class ThreadedSnapshotStrategy : public SnapshotStrategy | 39 | class ThreadedSnapshotStrategy : public SnapshotStrategy |
740 | 37 | { | 40 | { |
741 | 38 | public: | 41 | public: |
743 | 39 | ThreadedSnapshotStrategy(std::shared_ptr<PixelBuffer> const& pixels); | 42 | ThreadedSnapshotStrategy(std::shared_ptr<graphics::PixelBuffer> const& pixels); |
744 | 40 | ~ThreadedSnapshotStrategy() noexcept; | 43 | ~ThreadedSnapshotStrategy() noexcept; |
745 | 41 | 44 | ||
746 | 42 | void take_snapshot_of( | 45 | void take_snapshot_of( |
747 | @@ -44,7 +47,7 @@ | |||
748 | 44 | SnapshotCallback const& snapshot_taken); | 47 | SnapshotCallback const& snapshot_taken); |
749 | 45 | 48 | ||
750 | 46 | private: | 49 | private: |
752 | 47 | std::shared_ptr<PixelBuffer> const pixels; | 50 | std::shared_ptr<graphics::PixelBuffer> const pixels; |
753 | 48 | std::unique_ptr<SnapshottingFunctor> functor; | 51 | std::unique_ptr<SnapshottingFunctor> functor; |
754 | 49 | std::thread thread; | 52 | std::thread thread; |
755 | 50 | }; | 53 | }; |
756 | 51 | 54 | ||
757 | === modified file 'include/server/mir/surfaces/buffer_stream.h' | |||
758 | --- include/server/mir/surfaces/buffer_stream.h 2013-06-21 23:40:49 +0000 | |||
759 | +++ include/server/mir/surfaces/buffer_stream.h 2013-07-17 14:20:33 +0000 | |||
760 | @@ -22,13 +22,13 @@ | |||
761 | 22 | 22 | ||
762 | 23 | #include "mir/geometry/size.h" | 23 | #include "mir/geometry/size.h" |
763 | 24 | #include "mir/geometry/pixel_format.h" | 24 | #include "mir/geometry/pixel_format.h" |
765 | 25 | #include "mir/compositor/buffer_id.h" | 25 | #include "mir/graphics/buffer_id.h" |
766 | 26 | 26 | ||
767 | 27 | #include <memory> | 27 | #include <memory> |
768 | 28 | 28 | ||
769 | 29 | namespace mir | 29 | namespace mir |
770 | 30 | { | 30 | { |
772 | 31 | namespace compositor | 31 | namespace graphics |
773 | 32 | { | 32 | { |
774 | 33 | class Buffer; | 33 | class Buffer; |
775 | 34 | } | 34 | } |
776 | @@ -41,8 +41,8 @@ | |||
777 | 41 | public: | 41 | public: |
778 | 42 | virtual ~BufferStream() {/* TODO: make nothrow */} | 42 | virtual ~BufferStream() {/* TODO: make nothrow */} |
779 | 43 | 43 | ||
782 | 44 | virtual std::shared_ptr<compositor::Buffer> secure_client_buffer() = 0; | 44 | virtual std::shared_ptr<graphics::Buffer> secure_client_buffer() = 0; |
783 | 45 | virtual std::shared_ptr<compositor::Buffer> lock_back_buffer() = 0; | 45 | virtual std::shared_ptr<graphics::Buffer> lock_back_buffer() = 0; |
784 | 46 | virtual geometry::PixelFormat get_stream_pixel_format() = 0; | 46 | virtual geometry::PixelFormat get_stream_pixel_format() = 0; |
785 | 47 | virtual geometry::Size stream_size() = 0; | 47 | virtual geometry::Size stream_size() = 0; |
786 | 48 | virtual void allow_framedropping(bool) = 0; | 48 | virtual void allow_framedropping(bool) = 0; |
787 | 49 | 49 | ||
788 | === modified file 'include/server/mir/surfaces/surface.h' | |||
789 | --- include/server/mir/surfaces/surface.h 2013-07-15 15:15:40 +0000 | |||
790 | +++ include/server/mir/surfaces/surface.h 2013-07-17 14:20:33 +0000 | |||
791 | @@ -32,10 +32,12 @@ | |||
792 | 32 | { | 32 | { |
793 | 33 | namespace compositor | 33 | namespace compositor |
794 | 34 | { | 34 | { |
795 | 35 | class Buffer; | ||
796 | 36 | class GraphicRegion; | 35 | class GraphicRegion; |
797 | 37 | struct BufferIPCPackage; | 36 | struct BufferIPCPackage; |
799 | 38 | class BufferID; | 37 | } |
800 | 38 | namespace graphics | ||
801 | 39 | { | ||
802 | 40 | class Buffer; | ||
803 | 39 | } | 41 | } |
804 | 40 | namespace input | 42 | namespace input |
805 | 41 | { | 43 | { |
806 | @@ -75,8 +77,8 @@ | |||
807 | 75 | 77 | ||
808 | 76 | geometry::PixelFormat pixel_format() const; | 78 | geometry::PixelFormat pixel_format() const; |
809 | 77 | 79 | ||
812 | 78 | std::shared_ptr<compositor::Buffer> compositor_buffer() const; | 80 | std::shared_ptr<graphics::Buffer> compositor_buffer() const; |
813 | 79 | std::shared_ptr<compositor::Buffer> advance_client_buffer(); | 81 | std::shared_ptr<graphics::Buffer> advance_client_buffer(); |
814 | 80 | void force_requests_to_complete(); | 82 | void force_requests_to_complete(); |
815 | 81 | void flag_for_render(); | 83 | void flag_for_render(); |
816 | 82 | 84 | ||
817 | 83 | 85 | ||
818 | === renamed file 'include/server/mir/int_wrapper.h' => 'include/shared/mir/int_wrapper.h' | |||
819 | --- include/server/mir/int_wrapper.h 2013-07-16 12:00:39 +0000 | |||
820 | +++ include/shared/mir/int_wrapper.h 2013-07-17 14:20:33 +0000 | |||
821 | @@ -1,17 +1,17 @@ | |||
822 | 1 | /* | 1 | /* |
824 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012, 2013 Canonical Ltd. |
825 | 3 | * | 3 | * |
826 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
828 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU Lesser General Public License version 3, |
829 | 6 | * as published by the Free Software Foundation. | 6 | * as published by the Free Software Foundation. |
830 | 7 | * | 7 | * |
831 | 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
832 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
835 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
836 | 11 | * GNU General Public License for more details. | 11 | * GNU Lesser General Public License for more details. |
837 | 12 | * | 12 | * |
840 | 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU Lesser General Public License |
841 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
842 | 15 | * | 15 | * |
843 | 16 | * Authored By: Alan Griffiths <alan@octopull.co.uk> | 16 | * Authored By: Alan Griffiths <alan@octopull.co.uk> |
844 | 17 | */ | 17 | */ |
845 | 18 | 18 | ||
846 | === modified file 'include/test/mir_test_doubles/mock_buffer.h' | |||
847 | --- include/test/mir_test_doubles/mock_buffer.h 2013-05-14 21:39:52 +0000 | |||
848 | +++ include/test/mir_test_doubles/mock_buffer.h 2013-07-17 14:20:33 +0000 | |||
849 | @@ -21,7 +21,7 @@ | |||
850 | 21 | 21 | ||
851 | 22 | #include "mir/compositor/buffer_basic.h" | 22 | #include "mir/compositor/buffer_basic.h" |
852 | 23 | #include "mir/geometry/size.h" | 23 | #include "mir/geometry/size.h" |
854 | 24 | #include "mir/compositor/buffer_id.h" | 24 | #include "mir/graphics/buffer_id.h" |
855 | 25 | 25 | ||
856 | 26 | #include <gmock/gmock.h> | 26 | #include <gmock/gmock.h> |
857 | 27 | #include <gtest/gtest.h> | 27 | #include <gtest/gtest.h> |
858 | @@ -33,7 +33,7 @@ | |||
859 | 33 | namespace doubles | 33 | namespace doubles |
860 | 34 | { | 34 | { |
861 | 35 | 35 | ||
863 | 36 | struct MockBuffer : public compositor::Buffer | 36 | struct MockBuffer : public graphics::Buffer |
864 | 37 | { | 37 | { |
865 | 38 | public: | 38 | public: |
866 | 39 | MockBuffer() | 39 | MockBuffer() |
867 | @@ -53,7 +53,7 @@ | |||
868 | 53 | .WillByDefault(Return(pf)); | 53 | .WillByDefault(Return(pf)); |
869 | 54 | 54 | ||
870 | 55 | ON_CALL(*this, id()) | 55 | ON_CALL(*this, id()) |
872 | 56 | .WillByDefault(Return(compositor::BufferID{4})); | 56 | .WillByDefault(Return(graphics::BufferID{4})); |
873 | 57 | ON_CALL(*this, native_buffer_handle()) | 57 | ON_CALL(*this, native_buffer_handle()) |
874 | 58 | .WillByDefault(Return(std::shared_ptr<MirNativeBuffer>())); | 58 | .WillByDefault(Return(std::shared_ptr<MirNativeBuffer>())); |
875 | 59 | } | 59 | } |
876 | @@ -64,7 +64,7 @@ | |||
877 | 64 | MOCK_CONST_METHOD0(native_buffer_handle, std::shared_ptr<MirNativeBuffer>()); | 64 | MOCK_CONST_METHOD0(native_buffer_handle, std::shared_ptr<MirNativeBuffer>()); |
878 | 65 | 65 | ||
879 | 66 | MOCK_METHOD0(bind_to_texture, void()); | 66 | MOCK_METHOD0(bind_to_texture, void()); |
881 | 67 | MOCK_CONST_METHOD0(id, compositor::BufferID()); | 67 | MOCK_CONST_METHOD0(id, graphics::BufferID()); |
882 | 68 | }; | 68 | }; |
883 | 69 | 69 | ||
884 | 70 | } | 70 | } |
885 | 71 | 71 | ||
886 | === modified file 'include/test/mir_test_doubles/mock_buffer_bundle.h' | |||
887 | --- include/test/mir_test_doubles/mock_buffer_bundle.h 2013-06-13 08:59:25 +0000 | |||
888 | +++ include/test/mir_test_doubles/mock_buffer_bundle.h 2013-07-17 14:20:33 +0000 | |||
889 | @@ -37,10 +37,10 @@ | |||
890 | 37 | ~MockBufferBundle() noexcept | 37 | ~MockBufferBundle() noexcept |
891 | 38 | {} | 38 | {} |
892 | 39 | 39 | ||
897 | 40 | MOCK_METHOD0(client_acquire, std::shared_ptr<compositor::Buffer>()); | 40 | MOCK_METHOD0(client_acquire, std::shared_ptr<graphics::Buffer>()); |
898 | 41 | MOCK_METHOD1(client_release, void(std::shared_ptr<compositor::Buffer> const&)); | 41 | MOCK_METHOD1(client_release, void(std::shared_ptr<graphics::Buffer> const&)); |
899 | 42 | MOCK_METHOD0(compositor_acquire, std::shared_ptr<compositor::Buffer>()); | 42 | MOCK_METHOD0(compositor_acquire, std::shared_ptr<graphics::Buffer>()); |
900 | 43 | MOCK_METHOD1(compositor_release, void(std::shared_ptr<compositor::Buffer> const&)); | 43 | MOCK_METHOD1(compositor_release, void(std::shared_ptr<graphics::Buffer> const&)); |
901 | 44 | MOCK_METHOD1(allow_framedropping, void(bool)); | 44 | MOCK_METHOD1(allow_framedropping, void(bool)); |
902 | 45 | MOCK_CONST_METHOD0(properties, compositor::BufferProperties()); | 45 | MOCK_CONST_METHOD0(properties, compositor::BufferProperties()); |
903 | 46 | MOCK_METHOD0(force_client_abort, void()); | 46 | MOCK_METHOD0(force_client_abort, void()); |
904 | 47 | 47 | ||
905 | === modified file 'include/test/mir_test_doubles/mock_buffer_initializer.h' | |||
906 | --- include/test/mir_test_doubles/mock_buffer_initializer.h 2013-04-24 05:22:20 +0000 | |||
907 | +++ include/test/mir_test_doubles/mock_buffer_initializer.h 2013-07-17 14:20:33 +0000 | |||
908 | @@ -33,9 +33,9 @@ | |||
909 | 33 | class MockBufferInitializer : public graphics::BufferInitializer | 33 | class MockBufferInitializer : public graphics::BufferInitializer |
910 | 34 | { | 34 | { |
911 | 35 | public: | 35 | public: |
913 | 36 | MOCK_METHOD1(operator_call, void(compositor::Buffer& buffer)); | 36 | MOCK_METHOD1(operator_call, void(graphics::Buffer& buffer)); |
914 | 37 | 37 | ||
916 | 38 | void operator()(compositor::Buffer& buffer) | 38 | void operator()(graphics::Buffer& buffer) |
917 | 39 | { | 39 | { |
918 | 40 | operator_call(buffer); | 40 | operator_call(buffer); |
919 | 41 | } | 41 | } |
920 | 42 | 42 | ||
921 | === modified file 'include/test/mir_test_doubles/mock_buffer_stream.h' | |||
922 | --- include/test/mir_test_doubles/mock_buffer_stream.h 2013-06-21 23:40:49 +0000 | |||
923 | +++ include/test/mir_test_doubles/mock_buffer_stream.h 2013-07-17 14:20:33 +0000 | |||
924 | @@ -31,8 +31,8 @@ | |||
925 | 31 | { | 31 | { |
926 | 32 | struct MockBufferStream : public surfaces::BufferStream | 32 | struct MockBufferStream : public surfaces::BufferStream |
927 | 33 | { | 33 | { |
930 | 34 | MOCK_METHOD0(secure_client_buffer, std::shared_ptr<compositor::Buffer>()); | 34 | MOCK_METHOD0(secure_client_buffer, std::shared_ptr<graphics::Buffer>()); |
931 | 35 | MOCK_METHOD0(lock_back_buffer, std::shared_ptr<compositor::Buffer>()); | 35 | MOCK_METHOD0(lock_back_buffer, std::shared_ptr<graphics::Buffer>()); |
932 | 36 | 36 | ||
933 | 37 | MOCK_METHOD0(get_stream_pixel_format, geometry::PixelFormat()); | 37 | MOCK_METHOD0(get_stream_pixel_format, geometry::PixelFormat()); |
934 | 38 | MOCK_METHOD0(stream_size, geometry::Size()); | 38 | MOCK_METHOD0(stream_size, geometry::Size()); |
935 | 39 | 39 | ||
936 | === modified file 'include/test/mir_test_doubles/mock_display_support_provider.h' | |||
937 | --- include/test/mir_test_doubles/mock_display_support_provider.h 2013-05-16 20:04:58 +0000 | |||
938 | +++ include/test/mir_test_doubles/mock_display_support_provider.h 2013-07-17 14:20:33 +0000 | |||
939 | @@ -35,7 +35,7 @@ | |||
940 | 35 | MOCK_CONST_METHOD0(display_size, geometry::Size()); | 35 | MOCK_CONST_METHOD0(display_size, geometry::Size()); |
941 | 36 | MOCK_CONST_METHOD0(display_format, geometry::PixelFormat()); | 36 | MOCK_CONST_METHOD0(display_format, geometry::PixelFormat()); |
942 | 37 | MOCK_CONST_METHOD0(number_of_framebuffers_available, unsigned int()); | 37 | MOCK_CONST_METHOD0(number_of_framebuffers_available, unsigned int()); |
944 | 38 | MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::compositor::Buffer> const&)); | 38 | MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::graphics::Buffer> const&)); |
945 | 39 | MOCK_METHOD1(sync_to_display, void(bool)); | 39 | MOCK_METHOD1(sync_to_display, void(bool)); |
946 | 40 | }; | 40 | }; |
947 | 41 | } | 41 | } |
948 | 42 | 42 | ||
949 | === modified file 'include/test/mir_test_doubles/mock_hwc_interface.h' | |||
950 | --- include/test/mir_test_doubles/mock_hwc_interface.h 2013-05-16 20:04:58 +0000 | |||
951 | +++ include/test/mir_test_doubles/mock_hwc_interface.h 2013-07-17 14:20:33 +0000 | |||
952 | @@ -39,7 +39,7 @@ | |||
953 | 39 | MOCK_CONST_METHOD0(display_size, geometry::Size()); | 39 | MOCK_CONST_METHOD0(display_size, geometry::Size()); |
954 | 40 | MOCK_CONST_METHOD0(display_format, geometry::PixelFormat()); | 40 | MOCK_CONST_METHOD0(display_format, geometry::PixelFormat()); |
955 | 41 | MOCK_CONST_METHOD0(number_of_framebuffers_available, unsigned int()); | 41 | MOCK_CONST_METHOD0(number_of_framebuffers_available, unsigned int()); |
957 | 42 | MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::compositor::Buffer> const&)); | 42 | MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::graphics::Buffer> const&)); |
958 | 43 | MOCK_METHOD1(sync_to_display, void(bool)); | 43 | MOCK_METHOD1(sync_to_display, void(bool)); |
959 | 44 | }; | 44 | }; |
960 | 45 | 45 | ||
961 | 46 | 46 | ||
962 | === modified file 'include/test/mir_test_doubles/mock_hwc_organizer.h' | |||
963 | --- include/test/mir_test_doubles/mock_hwc_organizer.h 2013-05-02 00:34:03 +0000 | |||
964 | +++ include/test/mir_test_doubles/mock_hwc_organizer.h 2013-07-17 14:20:33 +0000 | |||
965 | @@ -34,7 +34,7 @@ | |||
966 | 34 | { | 34 | { |
967 | 35 | ~MockHWCOrganizer() noexcept {} | 35 | ~MockHWCOrganizer() noexcept {} |
968 | 36 | MOCK_CONST_METHOD0(native_list, graphics::android::LayerList const&()); | 36 | MOCK_CONST_METHOD0(native_list, graphics::android::LayerList const&()); |
970 | 37 | MOCK_METHOD1(set_fb_target, void(std::shared_ptr<compositor::Buffer> const&)); | 37 | MOCK_METHOD1(set_fb_target, void(std::shared_ptr<graphics::Buffer> const&)); |
971 | 38 | }; | 38 | }; |
972 | 39 | 39 | ||
973 | 40 | } | 40 | } |
974 | 41 | 41 | ||
975 | === modified file 'include/test/mir_test_doubles/mock_interpreter_resource_cache.h' | |||
976 | --- include/test/mir_test_doubles/mock_interpreter_resource_cache.h 2013-05-06 21:25:47 +0000 | |||
977 | +++ include/test/mir_test_doubles/mock_interpreter_resource_cache.h 2013-07-17 14:20:33 +0000 | |||
978 | @@ -28,8 +28,8 @@ | |||
979 | 28 | { | 28 | { |
980 | 29 | struct MockInterpreterResourceCache : public graphics::android::InterpreterResourceCache | 29 | struct MockInterpreterResourceCache : public graphics::android::InterpreterResourceCache |
981 | 30 | { | 30 | { |
984 | 31 | MOCK_METHOD2(store_buffer, void(std::shared_ptr<compositor::Buffer>const&, ANativeWindowBuffer*)); | 31 | MOCK_METHOD2(store_buffer, void(std::shared_ptr<graphics::Buffer>const&, ANativeWindowBuffer*)); |
985 | 32 | MOCK_METHOD1(retrieve_buffer, std::shared_ptr<compositor::Buffer>(ANativeWindowBuffer*)); | 32 | MOCK_METHOD1(retrieve_buffer, std::shared_ptr<graphics::Buffer>(ANativeWindowBuffer*)); |
986 | 33 | }; | 33 | }; |
987 | 34 | } | 34 | } |
988 | 35 | } | 35 | } |
989 | 36 | 36 | ||
990 | === modified file 'include/test/mir_test_doubles/mock_surface.h' | |||
991 | --- include/test/mir_test_doubles/mock_surface.h 2013-07-03 22:10:48 +0000 | |||
992 | +++ include/test/mir_test_doubles/mock_surface.h 2013-07-17 14:20:33 +0000 | |||
993 | @@ -49,7 +49,7 @@ | |||
994 | 49 | 49 | ||
995 | 50 | MOCK_METHOD0(destroy, void()); | 50 | MOCK_METHOD0(destroy, void()); |
996 | 51 | MOCK_METHOD0(force_requests_to_complete, void()); | 51 | MOCK_METHOD0(force_requests_to_complete, void()); |
998 | 52 | MOCK_METHOD0(advance_client_buffer, std::shared_ptr<compositor::Buffer>()); | 52 | MOCK_METHOD0(advance_client_buffer, std::shared_ptr<graphics::Buffer>()); |
999 | 53 | 53 | ||
1000 | 54 | MOCK_CONST_METHOD0(name, std::string()); | 54 | MOCK_CONST_METHOD0(name, std::string()); |
1001 | 55 | MOCK_CONST_METHOD0(size, geometry::Size()); | 55 | MOCK_CONST_METHOD0(size, geometry::Size()); |
1002 | 56 | 56 | ||
1003 | === modified file 'include/test/mir_test_doubles/mock_swapper.h' | |||
1004 | --- include/test/mir_test_doubles/mock_swapper.h 2013-06-12 16:56:32 +0000 | |||
1005 | +++ include/test/mir_test_doubles/mock_swapper.h 2013-07-17 14:20:33 +0000 | |||
1006 | @@ -35,7 +35,7 @@ | |||
1007 | 35 | MockSwapper() {} | 35 | MockSwapper() {} |
1008 | 36 | ~MockSwapper() noexcept {} | 36 | ~MockSwapper() noexcept {} |
1009 | 37 | 37 | ||
1011 | 38 | MockSwapper(std::shared_ptr<compositor::Buffer> buffer) | 38 | MockSwapper(std::shared_ptr<graphics::Buffer> buffer) |
1012 | 39 | : default_buffer(buffer) | 39 | : default_buffer(buffer) |
1013 | 40 | { | 40 | { |
1014 | 41 | using namespace testing; | 41 | using namespace testing; |
1015 | @@ -46,17 +46,17 @@ | |||
1016 | 46 | .WillByDefault(Return(default_buffer)); | 46 | .WillByDefault(Return(default_buffer)); |
1017 | 47 | } | 47 | } |
1018 | 48 | 48 | ||
1023 | 49 | MOCK_METHOD0(client_acquire, std::shared_ptr<compositor::Buffer>()); | 49 | MOCK_METHOD0(client_acquire, std::shared_ptr<graphics::Buffer>()); |
1024 | 50 | MOCK_METHOD1(client_release, void(std::shared_ptr<compositor::Buffer> const&)); | 50 | MOCK_METHOD1(client_release, void(std::shared_ptr<graphics::Buffer> const&)); |
1025 | 51 | MOCK_METHOD0(compositor_acquire, std::shared_ptr<compositor::Buffer>()); | 51 | MOCK_METHOD0(compositor_acquire, std::shared_ptr<graphics::Buffer>()); |
1026 | 52 | MOCK_METHOD1(compositor_release, void(std::shared_ptr<compositor::Buffer> const&)); | 52 | MOCK_METHOD1(compositor_release, void(std::shared_ptr<graphics::Buffer> const&)); |
1027 | 53 | MOCK_METHOD0(force_client_abort, void()); | 53 | MOCK_METHOD0(force_client_abort, void()); |
1028 | 54 | MOCK_METHOD0(force_requests_to_complete, void()); | 54 | MOCK_METHOD0(force_requests_to_complete, void()); |
1029 | 55 | 55 | ||
1031 | 56 | MOCK_METHOD2(end_responsibility, void(std::vector<std::shared_ptr<compositor::Buffer>>&, size_t&)); | 56 | MOCK_METHOD2(end_responsibility, void(std::vector<std::shared_ptr<graphics::Buffer>>&, size_t&)); |
1032 | 57 | 57 | ||
1033 | 58 | private: | 58 | private: |
1035 | 59 | std::shared_ptr<compositor::Buffer> default_buffer; | 59 | std::shared_ptr<graphics::Buffer> default_buffer; |
1036 | 60 | }; | 60 | }; |
1037 | 61 | 61 | ||
1038 | 62 | } | 62 | } |
1039 | 63 | 63 | ||
1040 | === modified file 'include/test/mir_test_doubles/mock_swapper_factory.h' | |||
1041 | --- include/test/mir_test_doubles/mock_swapper_factory.h 2013-06-13 23:31:56 +0000 | |||
1042 | +++ include/test/mir_test_doubles/mock_swapper_factory.h 2013-07-17 14:20:33 +0000 | |||
1043 | @@ -35,7 +35,7 @@ | |||
1044 | 35 | 35 | ||
1045 | 36 | MOCK_CONST_METHOD4(create_swapper_reuse_buffers, | 36 | MOCK_CONST_METHOD4(create_swapper_reuse_buffers, |
1046 | 37 | std::shared_ptr<compositor::BufferSwapper>(compositor::BufferProperties const&, | 37 | std::shared_ptr<compositor::BufferSwapper>(compositor::BufferProperties const&, |
1048 | 38 | std::vector<std::shared_ptr<compositor::Buffer>>&, size_t, compositor::SwapperType)); | 38 | std::vector<std::shared_ptr<graphics::Buffer>>&, size_t, compositor::SwapperType)); |
1049 | 39 | MOCK_CONST_METHOD3(create_swapper_new_buffers, | 39 | MOCK_CONST_METHOD3(create_swapper_new_buffers, |
1050 | 40 | std::shared_ptr<compositor::BufferSwapper>( | 40 | std::shared_ptr<compositor::BufferSwapper>( |
1051 | 41 | compositor::BufferProperties&, compositor::BufferProperties const&, compositor::SwapperType)); | 41 | compositor::BufferProperties&, compositor::BufferProperties const&, compositor::SwapperType)); |
1052 | 42 | 42 | ||
1053 | === modified file 'include/test/mir_test_doubles/null_platform.h' | |||
1054 | --- include/test/mir_test_doubles/null_platform.h 2013-07-10 08:50:53 +0000 | |||
1055 | +++ include/test/mir_test_doubles/null_platform.h 2013-07-17 14:20:33 +0000 | |||
1056 | @@ -55,7 +55,7 @@ | |||
1057 | 55 | } | 55 | } |
1058 | 56 | 56 | ||
1059 | 57 | void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const&, | 57 | void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const&, |
1061 | 58 | std::shared_ptr<compositor::Buffer> const&) const | 58 | std::shared_ptr<graphics::Buffer> const&) const |
1062 | 59 | { | 59 | { |
1063 | 60 | } | 60 | } |
1064 | 61 | }; | 61 | }; |
1065 | 62 | 62 | ||
1066 | === modified file 'include/test/mir_test_doubles/stub_buffer.h' | |||
1067 | --- include/test/mir_test_doubles/stub_buffer.h 2013-07-11 16:54:41 +0000 | |||
1068 | +++ include/test/mir_test_doubles/stub_buffer.h 2013-07-17 14:20:33 +0000 | |||
1069 | @@ -22,7 +22,7 @@ | |||
1070 | 22 | #include "mir/compositor/buffer_basic.h" | 22 | #include "mir/compositor/buffer_basic.h" |
1071 | 23 | #include "mir/compositor/buffer_properties.h" | 23 | #include "mir/compositor/buffer_properties.h" |
1072 | 24 | #include "mir/geometry/size.h" | 24 | #include "mir/geometry/size.h" |
1074 | 25 | #include "mir/compositor/buffer_id.h" | 25 | #include "mir/graphics/buffer_id.h" |
1075 | 26 | 26 | ||
1076 | 27 | namespace mir | 27 | namespace mir |
1077 | 28 | { | 28 | { |
1078 | 29 | 29 | ||
1079 | === modified file 'include/test/mir_test_doubles/stub_buffer_stream.h' | |||
1080 | --- include/test/mir_test_doubles/stub_buffer_stream.h 2013-06-21 23:40:49 +0000 | |||
1081 | +++ include/test/mir_test_doubles/stub_buffer_stream.h 2013-07-17 14:20:33 +0000 | |||
1082 | @@ -37,12 +37,12 @@ | |||
1083 | 37 | stub_client_buffer = std::make_shared<StubBuffer>(); | 37 | stub_client_buffer = std::make_shared<StubBuffer>(); |
1084 | 38 | stub_compositor_buffer = std::make_shared<StubBuffer>(); | 38 | stub_compositor_buffer = std::make_shared<StubBuffer>(); |
1085 | 39 | } | 39 | } |
1087 | 40 | std::shared_ptr<compositor::Buffer> secure_client_buffer() | 40 | std::shared_ptr<graphics::Buffer> secure_client_buffer() |
1088 | 41 | { | 41 | { |
1089 | 42 | return stub_client_buffer; | 42 | return stub_client_buffer; |
1090 | 43 | } | 43 | } |
1091 | 44 | 44 | ||
1093 | 45 | std::shared_ptr<compositor::Buffer> lock_back_buffer() | 45 | std::shared_ptr<graphics::Buffer> lock_back_buffer() |
1094 | 46 | { | 46 | { |
1095 | 47 | return stub_compositor_buffer; | 47 | return stub_compositor_buffer; |
1096 | 48 | } | 48 | } |
1097 | @@ -65,8 +65,8 @@ | |||
1098 | 65 | { | 65 | { |
1099 | 66 | } | 66 | } |
1100 | 67 | 67 | ||
1103 | 68 | std::shared_ptr<compositor::Buffer> stub_client_buffer; | 68 | std::shared_ptr<graphics::Buffer> stub_client_buffer; |
1104 | 69 | std::shared_ptr<compositor::Buffer> stub_compositor_buffer; | 69 | std::shared_ptr<graphics::Buffer> stub_compositor_buffer; |
1105 | 70 | }; | 70 | }; |
1106 | 71 | 71 | ||
1107 | 72 | } | 72 | } |
1108 | 73 | 73 | ||
1109 | === modified file 'include/test/mir_test_doubles/stub_surface.h' | |||
1110 | --- include/test/mir_test_doubles/stub_surface.h 2013-06-25 05:42:49 +0000 | |||
1111 | +++ include/test/mir_test_doubles/stub_surface.h 2013-07-17 14:20:33 +0000 | |||
1112 | @@ -47,9 +47,9 @@ | |||
1113 | 47 | return geometry::PixelFormat(); | 47 | return geometry::PixelFormat(); |
1114 | 48 | } | 48 | } |
1115 | 49 | 49 | ||
1117 | 50 | std::shared_ptr<compositor::Buffer> advance_client_buffer() | 50 | std::shared_ptr<graphics::Buffer> advance_client_buffer() |
1118 | 51 | { | 51 | { |
1120 | 52 | return std::shared_ptr<compositor::Buffer>(); | 52 | return std::shared_ptr<graphics::Buffer>(); |
1121 | 53 | } | 53 | } |
1122 | 54 | 54 | ||
1123 | 55 | virtual int configure(MirSurfaceAttrib, int) | 55 | virtual int configure(MirSurfaceAttrib, int) |
1124 | 56 | 56 | ||
1125 | === modified file 'src/server/compositor/buffer_basic.cpp' | |||
1126 | --- src/server/compositor/buffer_basic.cpp 2013-04-24 05:22:20 +0000 | |||
1127 | +++ src/server/compositor/buffer_basic.cpp 2013-07-17 14:20:33 +0000 | |||
1128 | @@ -19,20 +19,22 @@ | |||
1129 | 19 | #include "mir/compositor/buffer_basic.h" | 19 | #include "mir/compositor/buffer_basic.h" |
1130 | 20 | #include <atomic> | 20 | #include <atomic> |
1131 | 21 | 21 | ||
1132 | 22 | namespace mg = mir::graphics; | ||
1133 | 23 | |||
1134 | 22 | namespace mir | 24 | namespace mir |
1135 | 23 | { | 25 | { |
1136 | 24 | namespace compositor | 26 | namespace compositor |
1137 | 25 | { | 27 | { |
1138 | 26 | namespace | 28 | namespace |
1139 | 27 | { | 29 | { |
1141 | 28 | BufferID generate_next_buffer_id() | 30 | mg::BufferID generate_next_buffer_id() |
1142 | 29 | { | 31 | { |
1143 | 30 | static std::atomic<uint32_t> next_id{0}; | 32 | static std::atomic<uint32_t> next_id{0}; |
1144 | 31 | 33 | ||
1146 | 32 | auto id = BufferID(next_id.fetch_add(1)); | 34 | auto id = mg::BufferID(next_id.fetch_add(1)); |
1147 | 33 | 35 | ||
1148 | 34 | // Avoid returning an "invalid" id. (Not sure we need invalid ids) | 36 | // Avoid returning an "invalid" id. (Not sure we need invalid ids) |
1150 | 35 | while (!id.is_valid()) id = BufferID(next_id.fetch_add(1)); | 37 | while (!id.is_valid()) id = mg::BufferID(next_id.fetch_add(1)); |
1151 | 36 | 38 | ||
1152 | 37 | return id; | 39 | return id; |
1153 | 38 | } | 40 | } |
1154 | 39 | 41 | ||
1155 | === modified file 'src/server/compositor/buffer_bundle.h' | |||
1156 | --- src/server/compositor/buffer_bundle.h 2013-06-19 09:57:32 +0000 | |||
1157 | +++ src/server/compositor/buffer_bundle.h 2013-07-17 14:20:33 +0000 | |||
1158 | @@ -25,18 +25,19 @@ | |||
1159 | 25 | 25 | ||
1160 | 26 | namespace mir | 26 | namespace mir |
1161 | 27 | { | 27 | { |
1162 | 28 | namespace graphics { class Buffer; } | ||
1163 | 29 | |||
1164 | 28 | namespace compositor | 30 | namespace compositor |
1165 | 29 | { | 31 | { |
1166 | 30 | class Buffer; | ||
1167 | 31 | 32 | ||
1168 | 32 | class BufferBundle | 33 | class BufferBundle |
1169 | 33 | { | 34 | { |
1170 | 34 | public: | 35 | public: |
1171 | 35 | virtual ~BufferBundle() noexcept {} | 36 | virtual ~BufferBundle() noexcept {} |
1176 | 36 | virtual std::shared_ptr<Buffer> client_acquire() = 0; | 37 | virtual std::shared_ptr<graphics::Buffer> client_acquire() = 0; |
1177 | 37 | virtual void client_release(std::shared_ptr<Buffer> const&) = 0; | 38 | virtual void client_release(std::shared_ptr<graphics::Buffer> const&) = 0; |
1178 | 38 | virtual std::shared_ptr<Buffer> compositor_acquire() = 0; | 39 | virtual std::shared_ptr<graphics::Buffer> compositor_acquire() = 0; |
1179 | 39 | virtual void compositor_release(std::shared_ptr<Buffer> const&) = 0; | 40 | virtual void compositor_release(std::shared_ptr<graphics::Buffer> const&) = 0; |
1180 | 40 | 41 | ||
1181 | 41 | virtual BufferProperties properties() const = 0; | 42 | virtual BufferProperties properties() const = 0; |
1182 | 42 | virtual void allow_framedropping(bool dropping_allowed) = 0; | 43 | virtual void allow_framedropping(bool dropping_allowed) = 0; |
1183 | 43 | 44 | ||
1184 | === modified file 'src/server/compositor/buffer_stream_factory.cpp' | |||
1185 | --- src/server/compositor/buffer_stream_factory.cpp 2013-06-12 15:36:31 +0000 | |||
1186 | +++ src/server/compositor/buffer_stream_factory.cpp 2013-07-17 14:20:33 +0000 | |||
1187 | @@ -23,8 +23,8 @@ | |||
1188 | 23 | #include "mir/compositor/buffer_stream_surfaces.h" | 23 | #include "mir/compositor/buffer_stream_surfaces.h" |
1189 | 24 | #include "mir/compositor/buffer_properties.h" | 24 | #include "mir/compositor/buffer_properties.h" |
1190 | 25 | #include "switching_bundle.h" | 25 | #include "switching_bundle.h" |
1193 | 26 | #include "mir/compositor/buffer.h" | 26 | #include "mir/graphics/buffer.h" |
1194 | 27 | #include "mir/compositor/buffer_id.h" | 27 | #include "mir/graphics/buffer_id.h" |
1195 | 28 | #include "mir/compositor/graphic_buffer_allocator.h" | 28 | #include "mir/compositor/graphic_buffer_allocator.h" |
1196 | 29 | #include "mir/graphics/display.h" | 29 | #include "mir/graphics/display.h" |
1197 | 30 | 30 | ||
1198 | 31 | 31 | ||
1199 | === modified file 'src/server/compositor/buffer_stream_surfaces.cpp' | |||
1200 | --- src/server/compositor/buffer_stream_surfaces.cpp 2013-06-21 23:40:49 +0000 | |||
1201 | +++ src/server/compositor/buffer_stream_surfaces.cpp 2013-07-17 14:20:33 +0000 | |||
1202 | @@ -25,6 +25,7 @@ | |||
1203 | 25 | #include "temporary_buffers.h" | 25 | #include "temporary_buffers.h" |
1204 | 26 | 26 | ||
1205 | 27 | namespace mc = mir::compositor; | 27 | namespace mc = mir::compositor; |
1206 | 28 | namespace mg = mir::graphics; | ||
1207 | 28 | namespace geom = mir::geometry; | 29 | namespace geom = mir::geometry; |
1208 | 29 | 30 | ||
1209 | 30 | mc::BufferStreamSurfaces::BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& buffer_bundle) | 31 | mc::BufferStreamSurfaces::BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& buffer_bundle) |
1210 | @@ -38,12 +39,12 @@ | |||
1211 | 38 | { | 39 | { |
1212 | 39 | } | 40 | } |
1213 | 40 | 41 | ||
1215 | 41 | std::shared_ptr<mc::Buffer> mc::BufferStreamSurfaces::lock_back_buffer() | 42 | std::shared_ptr<mg::Buffer> mc::BufferStreamSurfaces::lock_back_buffer() |
1216 | 42 | { | 43 | { |
1217 | 43 | return std::make_shared<mc::TemporaryCompositorBuffer>(back_buffer_strategy); | 44 | return std::make_shared<mc::TemporaryCompositorBuffer>(back_buffer_strategy); |
1218 | 44 | } | 45 | } |
1219 | 45 | 46 | ||
1221 | 46 | std::shared_ptr<mc::Buffer> mc::BufferStreamSurfaces::secure_client_buffer() | 47 | std::shared_ptr<mg::Buffer> mc::BufferStreamSurfaces::secure_client_buffer() |
1222 | 47 | { | 48 | { |
1223 | 48 | return std::make_shared<mc::TemporaryClientBuffer>(buffer_bundle); | 49 | return std::make_shared<mc::TemporaryClientBuffer>(buffer_bundle); |
1224 | 49 | } | 50 | } |
1225 | 50 | 51 | ||
1226 | === modified file 'src/server/compositor/buffer_swapper_multi.cpp' | |||
1227 | --- src/server/compositor/buffer_swapper_multi.cpp 2013-06-15 11:09:16 +0000 | |||
1228 | +++ src/server/compositor/buffer_swapper_multi.cpp 2013-07-17 14:20:33 +0000 | |||
1229 | @@ -21,8 +21,9 @@ | |||
1230 | 21 | #include <boost/throw_exception.hpp> | 21 | #include <boost/throw_exception.hpp> |
1231 | 22 | 22 | ||
1232 | 23 | namespace mc = mir::compositor; | 23 | namespace mc = mir::compositor; |
1233 | 24 | namespace mg = mir::graphics; | ||
1234 | 24 | 25 | ||
1236 | 25 | mc::BufferSwapperMulti::BufferSwapperMulti(std::vector<std::shared_ptr<compositor::Buffer>>& buffer_list, size_t swapper_size) | 26 | mc::BufferSwapperMulti::BufferSwapperMulti(std::vector<std::shared_ptr<mg::Buffer>>& buffer_list, size_t swapper_size) |
1237 | 26 | : in_use_by_client(0), | 27 | : in_use_by_client(0), |
1238 | 27 | swapper_size(swapper_size), | 28 | swapper_size(swapper_size), |
1239 | 28 | clients_trying_to_acquire(0), | 29 | clients_trying_to_acquire(0), |
1240 | @@ -39,7 +40,7 @@ | |||
1241 | 39 | } | 40 | } |
1242 | 40 | } | 41 | } |
1243 | 41 | 42 | ||
1245 | 42 | std::shared_ptr<mc::Buffer> mc::BufferSwapperMulti::client_acquire() | 43 | std::shared_ptr<mg::Buffer> mc::BufferSwapperMulti::client_acquire() |
1246 | 43 | { | 44 | { |
1247 | 44 | std::unique_lock<std::mutex> lk(swapper_mutex); | 45 | std::unique_lock<std::mutex> lk(swapper_mutex); |
1248 | 45 | 46 | ||
1249 | @@ -71,7 +72,7 @@ | |||
1250 | 71 | return dequeued_buffer; | 72 | return dequeued_buffer; |
1251 | 72 | } | 73 | } |
1252 | 73 | 74 | ||
1254 | 74 | void mc::BufferSwapperMulti::client_release(std::shared_ptr<Buffer> const& queued_buffer) | 75 | void mc::BufferSwapperMulti::client_release(std::shared_ptr<mg::Buffer> const& queued_buffer) |
1255 | 75 | { | 76 | { |
1256 | 76 | std::unique_lock<std::mutex> lk(swapper_mutex); | 77 | std::unique_lock<std::mutex> lk(swapper_mutex); |
1257 | 77 | 78 | ||
1258 | @@ -87,11 +88,11 @@ | |||
1259 | 87 | */ | 88 | */ |
1260 | 88 | } | 89 | } |
1261 | 89 | 90 | ||
1263 | 90 | std::shared_ptr<mc::Buffer> mc::BufferSwapperMulti::compositor_acquire() | 91 | std::shared_ptr<mg::Buffer> mc::BufferSwapperMulti::compositor_acquire() |
1264 | 91 | { | 92 | { |
1265 | 92 | std::unique_lock<std::mutex> lk(swapper_mutex); | 93 | std::unique_lock<std::mutex> lk(swapper_mutex); |
1266 | 93 | 94 | ||
1268 | 94 | std::shared_ptr<mc::Buffer> dequeued_buffer; | 95 | std::shared_ptr<mg::Buffer> dequeued_buffer; |
1269 | 95 | 96 | ||
1270 | 96 | if (!compositor_queue.empty()) | 97 | if (!compositor_queue.empty()) |
1271 | 97 | { | 98 | { |
1272 | @@ -111,7 +112,7 @@ | |||
1273 | 111 | return dequeued_buffer; | 112 | return dequeued_buffer; |
1274 | 112 | } | 113 | } |
1275 | 113 | 114 | ||
1277 | 114 | void mc::BufferSwapperMulti::compositor_release(std::shared_ptr<Buffer> const& released_buffer) | 115 | void mc::BufferSwapperMulti::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer) |
1278 | 115 | { | 116 | { |
1279 | 116 | std::unique_lock<std::mutex> lk(swapper_mutex); | 117 | std::unique_lock<std::mutex> lk(swapper_mutex); |
1280 | 117 | client_queue.push_back(released_buffer); | 118 | client_queue.push_back(released_buffer); |
1281 | @@ -152,7 +153,7 @@ | |||
1282 | 152 | } | 153 | } |
1283 | 153 | 154 | ||
1284 | 154 | 155 | ||
1286 | 155 | void mc::BufferSwapperMulti::end_responsibility(std::vector<std::shared_ptr<Buffer>>& buffers, | 156 | void mc::BufferSwapperMulti::end_responsibility(std::vector<std::shared_ptr<mg::Buffer>>& buffers, |
1287 | 156 | size_t& size) | 157 | size_t& size) |
1288 | 157 | { | 158 | { |
1289 | 158 | std::unique_lock<std::mutex> lk(swapper_mutex); | 159 | std::unique_lock<std::mutex> lk(swapper_mutex); |
1290 | 159 | 160 | ||
1291 | === modified file 'src/server/compositor/buffer_swapper_spin.cpp' | |||
1292 | --- src/server/compositor/buffer_swapper_spin.cpp 2013-06-12 16:56:32 +0000 | |||
1293 | +++ src/server/compositor/buffer_swapper_spin.cpp 2013-07-17 14:20:33 +0000 | |||
1294 | @@ -19,10 +19,10 @@ | |||
1295 | 19 | #include "mir/compositor/buffer_swapper_spin.h" | 19 | #include "mir/compositor/buffer_swapper_spin.h" |
1296 | 20 | 20 | ||
1297 | 21 | namespace mc = mir::compositor; | 21 | namespace mc = mir::compositor; |
1299 | 22 | 22 | namespace mg = mir::graphics; | |
1300 | 23 | 23 | ||
1301 | 24 | mc::BufferSwapperSpin::BufferSwapperSpin( | 24 | mc::BufferSwapperSpin::BufferSwapperSpin( |
1303 | 25 | std::vector<std::shared_ptr<mc::Buffer>>& buffer_list, size_t swapper_size) | 25 | std::vector<std::shared_ptr<mg::Buffer>>& buffer_list, size_t swapper_size) |
1304 | 26 | : buffer_queue{buffer_list.begin(), buffer_list.end()}, | 26 | : buffer_queue{buffer_list.begin(), buffer_list.end()}, |
1305 | 27 | in_use_by_client{0}, | 27 | in_use_by_client{0}, |
1306 | 28 | swapper_size{swapper_size} | 28 | swapper_size{swapper_size} |
1307 | @@ -34,7 +34,7 @@ | |||
1308 | 34 | } | 34 | } |
1309 | 35 | } | 35 | } |
1310 | 36 | 36 | ||
1312 | 37 | std::shared_ptr<mc::Buffer> mc::BufferSwapperSpin::client_acquire() | 37 | std::shared_ptr<mg::Buffer> mc::BufferSwapperSpin::client_acquire() |
1313 | 38 | { | 38 | { |
1314 | 39 | std::lock_guard<std::mutex> lg{swapper_mutex}; | 39 | std::lock_guard<std::mutex> lg{swapper_mutex}; |
1315 | 40 | 40 | ||
1316 | @@ -54,7 +54,7 @@ | |||
1317 | 54 | return dequeued_buffer; | 54 | return dequeued_buffer; |
1318 | 55 | } | 55 | } |
1319 | 56 | 56 | ||
1321 | 57 | void mc::BufferSwapperSpin::client_release(std::shared_ptr<Buffer> const& queued_buffer) | 57 | void mc::BufferSwapperSpin::client_release(std::shared_ptr<mg::Buffer> const& queued_buffer) |
1322 | 58 | { | 58 | { |
1323 | 59 | std::lock_guard<std::mutex> lg{swapper_mutex}; | 59 | std::lock_guard<std::mutex> lg{swapper_mutex}; |
1324 | 60 | 60 | ||
1325 | @@ -63,7 +63,7 @@ | |||
1326 | 63 | client_submitted_new_buffer = true; | 63 | client_submitted_new_buffer = true; |
1327 | 64 | } | 64 | } |
1328 | 65 | 65 | ||
1330 | 66 | std::shared_ptr<mc::Buffer> mc::BufferSwapperSpin::compositor_acquire() | 66 | std::shared_ptr<mg::Buffer> mc::BufferSwapperSpin::compositor_acquire() |
1331 | 67 | { | 67 | { |
1332 | 68 | std::lock_guard<std::mutex> lg{swapper_mutex}; | 68 | std::lock_guard<std::mutex> lg{swapper_mutex}; |
1333 | 69 | 69 | ||
1334 | @@ -74,7 +74,7 @@ | |||
1335 | 74 | return dequeued_buffer; | 74 | return dequeued_buffer; |
1336 | 75 | } | 75 | } |
1337 | 76 | 76 | ||
1339 | 77 | void mc::BufferSwapperSpin::compositor_release(std::shared_ptr<Buffer> const& released_buffer) | 77 | void mc::BufferSwapperSpin::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer) |
1340 | 78 | { | 78 | { |
1341 | 79 | std::lock_guard<std::mutex> lg{swapper_mutex}; | 79 | std::lock_guard<std::mutex> lg{swapper_mutex}; |
1342 | 80 | 80 | ||
1343 | @@ -99,7 +99,7 @@ | |||
1344 | 99 | } | 99 | } |
1345 | 100 | 100 | ||
1346 | 101 | 101 | ||
1348 | 102 | void mc::BufferSwapperSpin::end_responsibility(std::vector<std::shared_ptr<Buffer>>& buffers, | 102 | void mc::BufferSwapperSpin::end_responsibility(std::vector<std::shared_ptr<mg::Buffer>>& buffers, |
1349 | 103 | size_t& size) | 103 | size_t& size) |
1350 | 104 | { | 104 | { |
1351 | 105 | std::lock_guard<std::mutex> lg{swapper_mutex}; | 105 | std::lock_guard<std::mutex> lg{swapper_mutex}; |
1352 | 106 | 106 | ||
1353 | === modified file 'src/server/compositor/multi_acquisition_back_buffer_strategy.cpp' | |||
1354 | --- src/server/compositor/multi_acquisition_back_buffer_strategy.cpp 2013-06-19 09:55:54 +0000 | |||
1355 | +++ src/server/compositor/multi_acquisition_back_buffer_strategy.cpp 2013-07-17 14:20:33 +0000 | |||
1356 | @@ -23,6 +23,7 @@ | |||
1357 | 23 | #include <algorithm> | 23 | #include <algorithm> |
1358 | 24 | 24 | ||
1359 | 25 | namespace mc = mir::compositor; | 25 | namespace mc = mir::compositor; |
1360 | 26 | namespace mg = mir::graphics; | ||
1361 | 26 | 27 | ||
1362 | 27 | mc::MultiAcquisitionBackBufferStrategy::MultiAcquisitionBackBufferStrategy( | 28 | mc::MultiAcquisitionBackBufferStrategy::MultiAcquisitionBackBufferStrategy( |
1363 | 28 | std::shared_ptr<BufferBundle> const& buffer_bundle) | 29 | std::shared_ptr<BufferBundle> const& buffer_bundle) |
1364 | @@ -30,7 +31,7 @@ | |||
1365 | 30 | { | 31 | { |
1366 | 31 | } | 32 | } |
1367 | 32 | 33 | ||
1369 | 33 | std::shared_ptr<mc::Buffer> mc::MultiAcquisitionBackBufferStrategy::acquire() | 34 | std::shared_ptr<mg::Buffer> mc::MultiAcquisitionBackBufferStrategy::acquire() |
1370 | 34 | { | 35 | { |
1371 | 35 | std::lock_guard<std::mutex> lg{mutex}; | 36 | std::lock_guard<std::mutex> lg{mutex}; |
1372 | 36 | 37 | ||
1373 | @@ -41,7 +42,7 @@ | |||
1374 | 41 | return info.partly_released == false; | 42 | return info.partly_released == false; |
1375 | 42 | }); | 43 | }); |
1376 | 43 | 44 | ||
1378 | 44 | std::shared_ptr<mc::Buffer> buffer; | 45 | std::shared_ptr<mg::Buffer> buffer; |
1379 | 45 | 46 | ||
1380 | 46 | if (iter != acquired_buffers.end()) | 47 | if (iter != acquired_buffers.end()) |
1381 | 47 | { | 48 | { |
1382 | @@ -78,7 +79,7 @@ | |||
1383 | 78 | return buffer; | 79 | return buffer; |
1384 | 79 | } | 80 | } |
1385 | 80 | 81 | ||
1387 | 81 | void mc::MultiAcquisitionBackBufferStrategy::release(std::shared_ptr<Buffer> const& buffer) | 82 | void mc::MultiAcquisitionBackBufferStrategy::release(std::shared_ptr<mg::Buffer> const& buffer) |
1388 | 82 | { | 83 | { |
1389 | 83 | std::lock_guard<std::mutex> lg{mutex}; | 84 | std::lock_guard<std::mutex> lg{mutex}; |
1390 | 84 | 85 | ||
1391 | @@ -108,7 +109,7 @@ | |||
1392 | 108 | } | 109 | } |
1393 | 109 | 110 | ||
1394 | 110 | std::vector<mc::detail::AcquiredBufferInfo>::iterator | 111 | std::vector<mc::detail::AcquiredBufferInfo>::iterator |
1396 | 111 | mc::MultiAcquisitionBackBufferStrategy::find_info(std::shared_ptr<Buffer> const& buffer) | 112 | mc::MultiAcquisitionBackBufferStrategy::find_info(std::shared_ptr<mg::Buffer> const& buffer) |
1397 | 112 | { | 113 | { |
1398 | 113 | return std::find_if(acquired_buffers.begin(), acquired_buffers.end(), | 114 | return std::find_if(acquired_buffers.begin(), acquired_buffers.end(), |
1399 | 114 | [&buffer] (detail::AcquiredBufferInfo const& info) | 115 | [&buffer] (detail::AcquiredBufferInfo const& info) |
1400 | 115 | 116 | ||
1401 | === modified file 'src/server/compositor/swapper_factory.cpp' | |||
1402 | --- src/server/compositor/swapper_factory.cpp 2013-06-22 00:25:47 +0000 | |||
1403 | +++ src/server/compositor/swapper_factory.cpp 2013-07-17 14:20:33 +0000 | |||
1404 | @@ -22,7 +22,7 @@ | |||
1405 | 22 | #include "mir/compositor/graphic_buffer_allocator.h" | 22 | #include "mir/compositor/graphic_buffer_allocator.h" |
1406 | 23 | #include "mir/compositor/buffer_swapper_multi.h" | 23 | #include "mir/compositor/buffer_swapper_multi.h" |
1407 | 24 | #include "mir/compositor/buffer_swapper_spin.h" | 24 | #include "mir/compositor/buffer_swapper_spin.h" |
1409 | 25 | #include "mir/compositor/buffer_id.h" | 25 | #include "mir/graphics/buffer_id.h" |
1410 | 26 | #include "mir/geometry/dimensions.h" | 26 | #include "mir/geometry/dimensions.h" |
1411 | 27 | #include "switching_bundle.h" | 27 | #include "switching_bundle.h" |
1412 | 28 | 28 | ||
1413 | @@ -31,6 +31,7 @@ | |||
1414 | 31 | #include <cassert> | 31 | #include <cassert> |
1415 | 32 | 32 | ||
1416 | 33 | namespace mc = mir::compositor; | 33 | namespace mc = mir::compositor; |
1417 | 34 | namespace mg = mir::graphics; | ||
1418 | 34 | 35 | ||
1419 | 35 | mc::SwapperFactory::SwapperFactory( | 36 | mc::SwapperFactory::SwapperFactory( |
1420 | 36 | std::shared_ptr<GraphicBufferAllocator> const& gr_alloc, | 37 | std::shared_ptr<GraphicBufferAllocator> const& gr_alloc, |
1421 | @@ -48,7 +49,7 @@ | |||
1422 | 48 | } | 49 | } |
1423 | 49 | 50 | ||
1424 | 50 | void mc::SwapperFactory::change_swapper_size( | 51 | void mc::SwapperFactory::change_swapper_size( |
1426 | 51 | std::vector<std::shared_ptr<mc::Buffer>>& list, | 52 | std::vector<std::shared_ptr<mg::Buffer>>& list, |
1427 | 52 | size_t const desired_size, size_t current_size, BufferProperties const& buffer_properties) const | 53 | size_t const desired_size, size_t current_size, BufferProperties const& buffer_properties) const |
1428 | 53 | { | 54 | { |
1429 | 54 | while (current_size < desired_size) | 55 | while (current_size < desired_size) |
1430 | @@ -72,7 +73,7 @@ | |||
1431 | 72 | } | 73 | } |
1432 | 73 | 74 | ||
1433 | 74 | std::shared_ptr<mc::BufferSwapper> mc::SwapperFactory::create_swapper_reuse_buffers( | 75 | std::shared_ptr<mc::BufferSwapper> mc::SwapperFactory::create_swapper_reuse_buffers( |
1435 | 75 | BufferProperties const& buffer_properties, std::vector<std::shared_ptr<Buffer>>& list, | 76 | BufferProperties const& buffer_properties, std::vector<std::shared_ptr<mg::Buffer>>& list, |
1436 | 76 | size_t buffer_num, SwapperType type) const | 77 | size_t buffer_num, SwapperType type) const |
1437 | 77 | { | 78 | { |
1438 | 78 | if (type == mc::SwapperType::synchronous) | 79 | if (type == mc::SwapperType::synchronous) |
1439 | @@ -91,7 +92,7 @@ | |||
1440 | 91 | BufferProperties& actual_buffer_properties, | 92 | BufferProperties& actual_buffer_properties, |
1441 | 92 | BufferProperties const& requested_buffer_properties, SwapperType type) const | 93 | BufferProperties const& requested_buffer_properties, SwapperType type) const |
1442 | 93 | { | 94 | { |
1444 | 94 | std::vector<std::shared_ptr<mc::Buffer>> list; | 95 | std::vector<std::shared_ptr<mg::Buffer>> list; |
1445 | 95 | std::shared_ptr<mc::BufferSwapper> new_swapper; | 96 | std::shared_ptr<mc::BufferSwapper> new_swapper; |
1446 | 96 | 97 | ||
1447 | 97 | if (type == mc::SwapperType::synchronous) | 98 | if (type == mc::SwapperType::synchronous) |
1448 | 98 | 99 | ||
1449 | === modified file 'src/server/compositor/switching_bundle.cpp' | |||
1450 | --- src/server/compositor/switching_bundle.cpp 2013-06-17 19:40:58 +0000 | |||
1451 | +++ src/server/compositor/switching_bundle.cpp 2013-07-17 14:20:33 +0000 | |||
1452 | @@ -25,6 +25,7 @@ | |||
1453 | 25 | #include <boost/throw_exception.hpp> | 25 | #include <boost/throw_exception.hpp> |
1454 | 26 | 26 | ||
1455 | 27 | namespace mc=mir::compositor; | 27 | namespace mc=mir::compositor; |
1456 | 28 | namespace mg = mir::graphics; | ||
1457 | 28 | 29 | ||
1458 | 29 | mc::SwitchingBundle::SwitchingBundle( | 30 | mc::SwitchingBundle::SwitchingBundle( |
1459 | 30 | std::shared_ptr<BufferAllocationStrategy> const& swapper_factory, BufferProperties const& property_request) | 31 | std::shared_ptr<BufferAllocationStrategy> const& swapper_factory, BufferProperties const& property_request) |
1460 | @@ -34,12 +35,12 @@ | |||
1461 | 34 | { | 35 | { |
1462 | 35 | } | 36 | } |
1463 | 36 | 37 | ||
1465 | 37 | std::shared_ptr<mc::Buffer> mc::SwitchingBundle::client_acquire() | 38 | std::shared_ptr<mg::Buffer> mc::SwitchingBundle::client_acquire() |
1466 | 38 | { | 39 | { |
1467 | 39 | /* lock is for use of 'swapper' below' */ | 40 | /* lock is for use of 'swapper' below' */ |
1468 | 40 | std::unique_lock<mc::ReadLock> lk(rw_lock); | 41 | std::unique_lock<mc::ReadLock> lk(rw_lock); |
1469 | 41 | 42 | ||
1471 | 42 | std::shared_ptr<mc::Buffer> buffer = nullptr; | 43 | std::shared_ptr<mg::Buffer> buffer = nullptr; |
1472 | 43 | while (!buffer) | 44 | while (!buffer) |
1473 | 44 | { | 45 | { |
1474 | 45 | try | 46 | try |
1475 | @@ -55,19 +56,19 @@ | |||
1476 | 55 | return buffer; | 56 | return buffer; |
1477 | 56 | } | 57 | } |
1478 | 57 | 58 | ||
1480 | 58 | void mc::SwitchingBundle::client_release(std::shared_ptr<mc::Buffer> const& released_buffer) | 59 | void mc::SwitchingBundle::client_release(std::shared_ptr<mg::Buffer> const& released_buffer) |
1481 | 59 | { | 60 | { |
1482 | 60 | std::unique_lock<mc::ReadLock> lk(rw_lock); | 61 | std::unique_lock<mc::ReadLock> lk(rw_lock); |
1483 | 61 | return swapper->client_release(released_buffer); | 62 | return swapper->client_release(released_buffer); |
1484 | 62 | } | 63 | } |
1485 | 63 | 64 | ||
1487 | 64 | std::shared_ptr<mc::Buffer> mc::SwitchingBundle::compositor_acquire() | 65 | std::shared_ptr<mg::Buffer> mc::SwitchingBundle::compositor_acquire() |
1488 | 65 | { | 66 | { |
1489 | 66 | std::unique_lock<mc::ReadLock> lk(rw_lock); | 67 | std::unique_lock<mc::ReadLock> lk(rw_lock); |
1490 | 67 | return swapper->compositor_acquire(); | 68 | return swapper->compositor_acquire(); |
1491 | 68 | } | 69 | } |
1492 | 69 | 70 | ||
1494 | 70 | void mc::SwitchingBundle::compositor_release(std::shared_ptr<mc::Buffer> const& released_buffer) | 71 | void mc::SwitchingBundle::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer) |
1495 | 71 | { | 72 | { |
1496 | 72 | std::unique_lock<mc::ReadLock> lk(rw_lock); | 73 | std::unique_lock<mc::ReadLock> lk(rw_lock); |
1497 | 73 | return swapper->compositor_release(released_buffer); | 74 | return swapper->compositor_release(released_buffer); |
1498 | @@ -87,7 +88,7 @@ | |||
1499 | 87 | } | 88 | } |
1500 | 88 | 89 | ||
1501 | 89 | std::unique_lock<mc::WriteLock> lk(rw_lock); | 90 | std::unique_lock<mc::WriteLock> lk(rw_lock); |
1503 | 90 | std::vector<std::shared_ptr<mc::Buffer>> list{}; | 91 | std::vector<std::shared_ptr<mg::Buffer>> list{}; |
1504 | 91 | size_t size = 0; | 92 | size_t size = 0; |
1505 | 92 | swapper->end_responsibility(list, size); | 93 | swapper->end_responsibility(list, size); |
1506 | 93 | 94 | ||
1507 | 94 | 95 | ||
1508 | === modified file 'src/server/compositor/switching_bundle.h' | |||
1509 | --- src/server/compositor/switching_bundle.h 2013-06-15 11:09:16 +0000 | |||
1510 | +++ src/server/compositor/switching_bundle.h 2013-07-17 14:20:33 +0000 | |||
1511 | @@ -41,10 +41,10 @@ | |||
1512 | 41 | 41 | ||
1513 | 42 | BufferProperties properties() const; | 42 | BufferProperties properties() const; |
1514 | 43 | 43 | ||
1519 | 44 | std::shared_ptr<Buffer> client_acquire(); | 44 | std::shared_ptr<graphics::Buffer> client_acquire(); |
1520 | 45 | void client_release(std::shared_ptr<Buffer> const&); | 45 | void client_release(std::shared_ptr<graphics::Buffer> const&); |
1521 | 46 | std::shared_ptr<Buffer> compositor_acquire(); | 46 | std::shared_ptr<graphics::Buffer> compositor_acquire(); |
1522 | 47 | void compositor_release(std::shared_ptr<Buffer> const& released_buffer); | 47 | void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer); |
1523 | 48 | void force_requests_to_complete(); | 48 | void force_requests_to_complete(); |
1524 | 49 | void allow_framedropping(bool dropping_allowed); | 49 | void allow_framedropping(bool dropping_allowed); |
1525 | 50 | 50 | ||
1526 | 51 | 51 | ||
1527 | === modified file 'src/server/compositor/temporary_buffers.cpp' | |||
1528 | --- src/server/compositor/temporary_buffers.cpp 2013-06-18 09:44:11 +0000 | |||
1529 | +++ src/server/compositor/temporary_buffers.cpp 2013-07-17 14:20:33 +0000 | |||
1530 | @@ -22,9 +22,10 @@ | |||
1531 | 22 | #include "temporary_buffers.h" | 22 | #include "temporary_buffers.h" |
1532 | 23 | 23 | ||
1533 | 24 | namespace mc=mir::compositor; | 24 | namespace mc=mir::compositor; |
1534 | 25 | namespace mg=mir::graphics; | ||
1535 | 25 | namespace geom=mir::geometry; | 26 | namespace geom=mir::geometry; |
1536 | 26 | 27 | ||
1538 | 27 | mc::TemporaryBuffer::TemporaryBuffer(std::shared_ptr<Buffer> const& real_buffer) | 28 | mc::TemporaryBuffer::TemporaryBuffer(std::shared_ptr<mg::Buffer> const& real_buffer) |
1539 | 28 | : buffer(real_buffer) | 29 | : buffer(real_buffer) |
1540 | 29 | { | 30 | { |
1541 | 30 | } | 31 | } |
1542 | @@ -69,7 +70,7 @@ | |||
1543 | 69 | return buffer->pixel_format(); | 70 | return buffer->pixel_format(); |
1544 | 70 | } | 71 | } |
1545 | 71 | 72 | ||
1547 | 72 | mc::BufferID mc::TemporaryBuffer::id() const | 73 | mg::BufferID mc::TemporaryBuffer::id() const |
1548 | 73 | { | 74 | { |
1549 | 74 | return buffer->id(); | 75 | return buffer->id(); |
1550 | 75 | } | 76 | } |
1551 | 76 | 77 | ||
1552 | === modified file 'src/server/compositor/temporary_buffers.h' | |||
1553 | --- src/server/compositor/temporary_buffers.h 2013-06-18 09:44:11 +0000 | |||
1554 | +++ src/server/compositor/temporary_buffers.h 2013-07-17 14:20:33 +0000 | |||
1555 | @@ -19,31 +19,32 @@ | |||
1556 | 19 | #ifndef MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_ | 19 | #ifndef MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_ |
1557 | 20 | #define MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_ | 20 | #define MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_ |
1558 | 21 | 21 | ||
1561 | 22 | #include "mir/compositor/buffer.h" | 22 | #include "mir/graphics/buffer.h" |
1562 | 23 | #include "mir/compositor/buffer_id.h" | 23 | #include "mir/graphics/buffer_id.h" |
1563 | 24 | |||
1564 | 25 | namespace mg = mir::graphics; | ||
1565 | 24 | 26 | ||
1566 | 25 | namespace mir | 27 | namespace mir |
1567 | 26 | { | 28 | { |
1568 | 27 | namespace compositor | 29 | namespace compositor |
1569 | 28 | { | 30 | { |
1570 | 29 | 31 | ||
1571 | 30 | class BufferID; | ||
1572 | 31 | class BufferBundle; | 32 | class BufferBundle; |
1573 | 32 | class BackBufferStrategy; | 33 | class BackBufferStrategy; |
1574 | 33 | 34 | ||
1576 | 34 | class TemporaryBuffer : public Buffer | 35 | class TemporaryBuffer : public mg::Buffer |
1577 | 35 | { | 36 | { |
1578 | 36 | public: | 37 | public: |
1579 | 37 | geometry::Size size() const; | 38 | geometry::Size size() const; |
1580 | 38 | geometry::Stride stride() const; | 39 | geometry::Stride stride() const; |
1581 | 39 | geometry::PixelFormat pixel_format() const; | 40 | geometry::PixelFormat pixel_format() const; |
1583 | 40 | BufferID id() const; | 41 | mg::BufferID id() const; |
1584 | 41 | void bind_to_texture(); | 42 | void bind_to_texture(); |
1585 | 42 | std::shared_ptr<MirNativeBuffer> native_buffer_handle() const; | 43 | std::shared_ptr<MirNativeBuffer> native_buffer_handle() const; |
1586 | 43 | 44 | ||
1587 | 44 | protected: | 45 | protected: |
1590 | 45 | explicit TemporaryBuffer(std::shared_ptr<Buffer> const& real_buffer); | 46 | explicit TemporaryBuffer(std::shared_ptr<mg::Buffer> const& real_buffer); |
1591 | 46 | std::shared_ptr<Buffer> const buffer; | 47 | std::shared_ptr<mg::Buffer> const buffer; |
1592 | 47 | }; | 48 | }; |
1593 | 48 | 49 | ||
1594 | 49 | class TemporaryClientBuffer : public TemporaryBuffer | 50 | class TemporaryClientBuffer : public TemporaryBuffer |
1595 | 50 | 51 | ||
1596 | === modified file 'src/server/default_server_configuration.cpp' | |||
1597 | --- src/server/default_server_configuration.cpp 2013-07-16 18:34:20 +0000 | |||
1598 | +++ src/server/default_server_configuration.cpp 2013-07-17 14:20:33 +0000 | |||
1599 | @@ -405,7 +405,7 @@ | |||
1600 | 405 | }); | 405 | }); |
1601 | 406 | } | 406 | } |
1602 | 407 | 407 | ||
1604 | 408 | std::shared_ptr<msh::PixelBuffer> | 408 | std::shared_ptr<mg::PixelBuffer> |
1605 | 409 | mir::DefaultServerConfiguration::the_shell_pixel_buffer() | 409 | mir::DefaultServerConfiguration::the_shell_pixel_buffer() |
1606 | 410 | { | 410 | { |
1607 | 411 | return shell_pixel_buffer( | 411 | return shell_pixel_buffer( |
1608 | 412 | 412 | ||
1609 | === modified file 'src/server/frontend/client_buffer_tracker.cpp' | |||
1610 | --- src/server/frontend/client_buffer_tracker.cpp 2013-04-24 05:22:20 +0000 | |||
1611 | +++ src/server/frontend/client_buffer_tracker.cpp 2013-07-17 14:20:33 +0000 | |||
1612 | @@ -19,10 +19,10 @@ | |||
1613 | 19 | #include <algorithm> | 19 | #include <algorithm> |
1614 | 20 | 20 | ||
1615 | 21 | #include "client_buffer_tracker.h" | 21 | #include "client_buffer_tracker.h" |
1617 | 22 | #include "mir/compositor/buffer_id.h" | 22 | #include "mir/graphics/buffer_id.h" |
1618 | 23 | 23 | ||
1619 | 24 | namespace mf = mir::frontend; | 24 | namespace mf = mir::frontend; |
1621 | 25 | namespace mc = mir::compositor; | 25 | namespace mg = mir::graphics; |
1622 | 26 | 26 | ||
1623 | 27 | mf::ClientBufferTracker::ClientBufferTracker(unsigned int client_cache_size) | 27 | mf::ClientBufferTracker::ClientBufferTracker(unsigned int client_cache_size) |
1624 | 28 | : ids(), | 28 | : ids(), |
1625 | @@ -30,7 +30,7 @@ | |||
1626 | 30 | { | 30 | { |
1627 | 31 | } | 31 | } |
1628 | 32 | 32 | ||
1630 | 33 | void mf::ClientBufferTracker::add(mc::BufferID const& id) | 33 | void mf::ClientBufferTracker::add(mg::BufferID const& id) |
1631 | 34 | { | 34 | { |
1632 | 35 | auto existing_id = std::find(ids.begin(), ids.end(), id); | 35 | auto existing_id = std::find(ids.begin(), ids.end(), id); |
1633 | 36 | 36 | ||
1634 | @@ -47,7 +47,7 @@ | |||
1635 | 47 | ids.pop_back(); | 47 | ids.pop_back(); |
1636 | 48 | } | 48 | } |
1637 | 49 | 49 | ||
1639 | 50 | bool mf::ClientBufferTracker::client_has(mc::BufferID const& id) const | 50 | bool mf::ClientBufferTracker::client_has(mg::BufferID const& id) const |
1640 | 51 | { | 51 | { |
1641 | 52 | return std::find(ids.begin(), ids.end(), id) != ids.end(); | 52 | return std::find(ids.begin(), ids.end(), id) != ids.end(); |
1642 | 53 | } | 53 | } |
1643 | 54 | 54 | ||
1644 | === modified file 'src/server/frontend/client_buffer_tracker.h' | |||
1645 | --- src/server/frontend/client_buffer_tracker.h 2013-04-24 05:22:20 +0000 | |||
1646 | +++ src/server/frontend/client_buffer_tracker.h 2013-07-17 14:20:33 +0000 | |||
1647 | @@ -25,7 +25,7 @@ | |||
1648 | 25 | namespace mir | 25 | namespace mir |
1649 | 26 | { | 26 | { |
1650 | 27 | 27 | ||
1652 | 28 | namespace compositor | 28 | namespace graphics |
1653 | 29 | { | 29 | { |
1654 | 30 | class BufferID; | 30 | class BufferID; |
1655 | 31 | } | 31 | } |
1656 | @@ -48,11 +48,11 @@ | |||
1657 | 48 | /// Add a BufferID to the list of buffers known by the client. | 48 | /// Add a BufferID to the list of buffers known by the client. |
1658 | 49 | /// | 49 | /// |
1659 | 50 | /// Typically this should be done just prior to or just after sending the buffer information | 50 | /// Typically this should be done just prior to or just after sending the buffer information |
1662 | 51 | void add(compositor::BufferID const& id); | 51 | void add(graphics::BufferID const& id); |
1663 | 52 | bool client_has(compositor::BufferID const& id) const; | 52 | bool client_has(graphics::BufferID const& id) const; |
1664 | 53 | private: | 53 | private: |
1665 | 54 | 54 | ||
1667 | 55 | std::list<compositor::BufferID> ids; | 55 | std::list<graphics::BufferID> ids; |
1668 | 56 | unsigned int const cache_size; | 56 | unsigned int const cache_size; |
1669 | 57 | }; | 57 | }; |
1670 | 58 | 58 | ||
1671 | 59 | 59 | ||
1672 | === modified file 'src/server/frontend/session_mediator.cpp' | |||
1673 | --- src/server/frontend/session_mediator.cpp 2013-07-09 18:53:16 +0000 | |||
1674 | +++ src/server/frontend/session_mediator.cpp 2013-07-17 14:20:33 +0000 | |||
1675 | @@ -24,8 +24,8 @@ | |||
1676 | 24 | #include "mir/shell/surface_creation_parameters.h" | 24 | #include "mir/shell/surface_creation_parameters.h" |
1677 | 25 | #include "mir/frontend/resource_cache.h" | 25 | #include "mir/frontend/resource_cache.h" |
1678 | 26 | #include "mir_toolkit/common.h" | 26 | #include "mir_toolkit/common.h" |
1681 | 27 | #include "mir/compositor/buffer_id.h" | 27 | #include "mir/graphics/buffer_id.h" |
1682 | 28 | #include "mir/compositor/buffer.h" | 28 | #include "mir/graphics/buffer.h" |
1683 | 29 | #include "mir/surfaces/buffer_stream.h" | 29 | #include "mir/surfaces/buffer_stream.h" |
1684 | 30 | #include "mir/compositor/graphic_buffer_allocator.h" | 30 | #include "mir/compositor/graphic_buffer_allocator.h" |
1685 | 31 | #include "mir/geometry/dimensions.h" | 31 | #include "mir/geometry/dimensions.h" |
1686 | 32 | 32 | ||
1687 | === modified file 'src/server/graphics/android/android_buffer_allocator.cpp' | |||
1688 | --- src/server/graphics/android/android_buffer_allocator.cpp 2013-06-14 18:20:39 +0000 | |||
1689 | +++ src/server/graphics/android/android_buffer_allocator.cpp 2013-07-17 14:20:33 +0000 | |||
1690 | @@ -70,7 +70,7 @@ | |||
1691 | 70 | alloc_device = std::shared_ptr<mga::GraphicAllocAdaptor>(new AndroidAllocAdaptor(alloc_dev_ptr)); | 70 | alloc_device = std::shared_ptr<mga::GraphicAllocAdaptor>(new AndroidAllocAdaptor(alloc_dev_ptr)); |
1692 | 71 | } | 71 | } |
1693 | 72 | 72 | ||
1695 | 73 | std::shared_ptr<mc::Buffer> mga::AndroidGraphicBufferAllocator::alloc_buffer( | 73 | std::shared_ptr<mg::Buffer> mga::AndroidGraphicBufferAllocator::alloc_buffer( |
1696 | 74 | mc::BufferProperties const& buffer_properties) | 74 | mc::BufferProperties const& buffer_properties) |
1697 | 75 | { | 75 | { |
1698 | 76 | auto usage = convert_from_compositor_usage(buffer_properties.usage); | 76 | auto usage = convert_from_compositor_usage(buffer_properties.usage); |
1699 | 77 | 77 | ||
1700 | === modified file 'src/server/graphics/android/android_graphic_buffer_allocator.h' | |||
1701 | --- src/server/graphics/android/android_graphic_buffer_allocator.h 2013-06-14 18:20:39 +0000 | |||
1702 | +++ src/server/graphics/android/android_graphic_buffer_allocator.h 2013-07-17 14:20:33 +0000 | |||
1703 | @@ -45,7 +45,7 @@ | |||
1704 | 45 | AndroidGraphicBufferAllocator( | 45 | AndroidGraphicBufferAllocator( |
1705 | 46 | std::shared_ptr<BufferInitializer> const& buffer_initializer); | 46 | std::shared_ptr<BufferInitializer> const& buffer_initializer); |
1706 | 47 | 47 | ||
1708 | 48 | std::shared_ptr<compositor::Buffer> alloc_buffer( | 48 | std::shared_ptr<graphics::Buffer> alloc_buffer( |
1709 | 49 | compositor::BufferProperties const& buffer_properties); | 49 | compositor::BufferProperties const& buffer_properties); |
1710 | 50 | 50 | ||
1711 | 51 | std::shared_ptr<Buffer> alloc_buffer_platform( | 51 | std::shared_ptr<Buffer> alloc_buffer_platform( |
1712 | 52 | 52 | ||
1713 | === modified file 'src/server/graphics/android/android_platform.cpp' | |||
1714 | --- src/server/graphics/android/android_platform.cpp 2013-07-10 08:50:53 +0000 | |||
1715 | +++ src/server/graphics/android/android_platform.cpp 2013-07-17 14:20:33 +0000 | |||
1716 | @@ -26,7 +26,7 @@ | |||
1717 | 26 | #include "internal_client.h" | 26 | #include "internal_client.h" |
1718 | 27 | #include "mir/graphics/platform_ipc_package.h" | 27 | #include "mir/graphics/platform_ipc_package.h" |
1719 | 28 | #include "mir/graphics/buffer_initializer.h" | 28 | #include "mir/graphics/buffer_initializer.h" |
1721 | 29 | #include "mir/compositor/buffer_id.h" | 29 | #include "mir/graphics/buffer_id.h" |
1722 | 30 | #include "mir/compositor/buffer_ipc_packer.h" | 30 | #include "mir/compositor/buffer_ipc_packer.h" |
1723 | 31 | #include "mir/options/option.h" | 31 | #include "mir/options/option.h" |
1724 | 32 | 32 | ||
1725 | @@ -78,7 +78,7 @@ | |||
1726 | 78 | } | 78 | } |
1727 | 79 | 79 | ||
1728 | 80 | void mga::AndroidPlatform::fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, | 80 | void mga::AndroidPlatform::fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, |
1730 | 81 | std::shared_ptr<mc::Buffer> const& buffer) const | 81 | std::shared_ptr<mg::Buffer> const& buffer) const |
1731 | 82 | { | 82 | { |
1732 | 83 | auto native_buffer = buffer->native_buffer_handle(); | 83 | auto native_buffer = buffer->native_buffer_handle(); |
1733 | 84 | auto buffer_handle = native_buffer->handle; | 84 | auto buffer_handle = native_buffer->handle; |
1734 | 85 | 85 | ||
1735 | === modified file 'src/server/graphics/android/android_platform.h' | |||
1736 | --- src/server/graphics/android/android_platform.h 2013-07-10 08:50:53 +0000 | |||
1737 | +++ src/server/graphics/android/android_platform.h 2013-07-17 14:20:33 +0000 | |||
1738 | @@ -44,7 +44,7 @@ | |||
1739 | 44 | std::shared_ptr<PlatformIPCPackage> get_ipc_package(); | 44 | std::shared_ptr<PlatformIPCPackage> get_ipc_package(); |
1740 | 45 | std::shared_ptr<InternalClient> create_internal_client(); | 45 | std::shared_ptr<InternalClient> create_internal_client(); |
1741 | 46 | void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, | 46 | void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, |
1743 | 47 | std::shared_ptr<compositor::Buffer> const& buffer) const; | 47 | std::shared_ptr<graphics::Buffer> const& buffer) const; |
1744 | 48 | 48 | ||
1745 | 49 | private: | 49 | private: |
1746 | 50 | // TODO a design that has this and create_buffer_allocator is missing simplicity | 50 | // TODO a design that has this and create_buffer_allocator is missing simplicity |
1747 | 51 | 51 | ||
1748 | === modified file 'src/server/graphics/android/default_framebuffer_factory.cpp' | |||
1749 | --- src/server/graphics/android/default_framebuffer_factory.cpp 2013-05-29 15:28:27 +0000 | |||
1750 | +++ src/server/graphics/android/default_framebuffer_factory.cpp 2013-07-17 14:20:33 +0000 | |||
1751 | @@ -30,6 +30,7 @@ | |||
1752 | 30 | #include <stdexcept> | 30 | #include <stdexcept> |
1753 | 31 | #include <vector> | 31 | #include <vector> |
1754 | 32 | 32 | ||
1755 | 33 | namespace mg = mir::graphics; | ||
1756 | 33 | namespace mga=mir::graphics::android; | 34 | namespace mga=mir::graphics::android; |
1757 | 34 | namespace mc=mir::compositor; | 35 | namespace mc=mir::compositor; |
1758 | 35 | 36 | ||
1759 | @@ -39,13 +40,13 @@ | |||
1760 | 39 | { | 40 | { |
1761 | 40 | } | 41 | } |
1762 | 41 | 42 | ||
1764 | 42 | std::vector<std::shared_ptr<mc::Buffer>> mga::DefaultFramebufferFactory::create_buffers( | 43 | std::vector<std::shared_ptr<mg::Buffer>> mga::DefaultFramebufferFactory::create_buffers( |
1765 | 43 | std::shared_ptr<DisplaySupportProvider> const& info_provider) const | 44 | std::shared_ptr<DisplaySupportProvider> const& info_provider) const |
1766 | 44 | { | 45 | { |
1767 | 45 | auto size = info_provider->display_size(); | 46 | auto size = info_provider->display_size(); |
1768 | 46 | auto pf = info_provider->display_format(); | 47 | auto pf = info_provider->display_format(); |
1769 | 47 | auto num_framebuffers = info_provider->number_of_framebuffers_available(); | 48 | auto num_framebuffers = info_provider->number_of_framebuffers_available(); |
1771 | 48 | std::vector<std::shared_ptr<mc::Buffer>> buffers; | 49 | std::vector<std::shared_ptr<mg::Buffer>> buffers; |
1772 | 49 | for (auto i = 0u; i < num_framebuffers; ++i) | 50 | for (auto i = 0u; i < num_framebuffers; ++i) |
1773 | 50 | { | 51 | { |
1774 | 51 | buffers.push_back(buffer_allocator->alloc_buffer_platform(size, pf, mga::BufferUsage::use_framebuffer_gles)); | 52 | buffers.push_back(buffer_allocator->alloc_buffer_platform(size, pf, mga::BufferUsage::use_framebuffer_gles)); |
1775 | @@ -54,7 +55,7 @@ | |||
1776 | 54 | } | 55 | } |
1777 | 55 | 56 | ||
1778 | 56 | std::shared_ptr<mga::FBSwapper> mga::DefaultFramebufferFactory::create_swapper( | 57 | std::shared_ptr<mga::FBSwapper> mga::DefaultFramebufferFactory::create_swapper( |
1780 | 57 | std::vector<std::shared_ptr<mc::Buffer>> const& buffers) const | 58 | std::vector<std::shared_ptr<mg::Buffer>> const& buffers) const |
1781 | 58 | { | 59 | { |
1782 | 59 | return std::make_shared<mga::FBSimpleSwapper>(buffers); | 60 | return std::make_shared<mga::FBSimpleSwapper>(buffers); |
1783 | 60 | } | 61 | } |
1784 | 61 | 62 | ||
1785 | === modified file 'src/server/graphics/android/default_framebuffer_factory.h' | |||
1786 | --- src/server/graphics/android/default_framebuffer_factory.h 2013-05-29 15:28:27 +0000 | |||
1787 | +++ src/server/graphics/android/default_framebuffer_factory.h 2013-07-17 14:20:33 +0000 | |||
1788 | @@ -25,9 +25,10 @@ | |||
1789 | 25 | 25 | ||
1790 | 26 | namespace mir | 26 | namespace mir |
1791 | 27 | { | 27 | { |
1792 | 28 | namespace compositor { class Buffer; } | ||
1793 | 29 | namespace graphics | 28 | namespace graphics |
1794 | 30 | { | 29 | { |
1795 | 30 | class Buffer; | ||
1796 | 31 | |||
1797 | 31 | namespace android | 32 | namespace android |
1798 | 32 | { | 33 | { |
1799 | 33 | 34 | ||
1800 | @@ -43,11 +44,11 @@ | |||
1801 | 43 | private: | 44 | private: |
1802 | 44 | std::shared_ptr<GraphicBufferAllocator> const buffer_allocator; | 45 | std::shared_ptr<GraphicBufferAllocator> const buffer_allocator; |
1803 | 45 | 46 | ||
1805 | 46 | virtual std::vector<std::shared_ptr<compositor::Buffer>> create_buffers( | 47 | virtual std::vector<std::shared_ptr<graphics::Buffer>> create_buffers( |
1806 | 47 | std::shared_ptr<DisplaySupportProvider> const& info_provider) const; | 48 | std::shared_ptr<DisplaySupportProvider> const& info_provider) const; |
1807 | 48 | 49 | ||
1808 | 49 | virtual std::shared_ptr<FBSwapper> create_swapper( | 50 | virtual std::shared_ptr<FBSwapper> create_swapper( |
1810 | 50 | std::vector<std::shared_ptr<compositor::Buffer>> const& buffers) const; | 51 | std::vector<std::shared_ptr<graphics::Buffer>> const& buffers) const; |
1811 | 51 | }; | 52 | }; |
1812 | 52 | 53 | ||
1813 | 53 | } | 54 | } |
1814 | 54 | 55 | ||
1815 | === modified file 'src/server/graphics/android/display_support_provider.h' | |||
1816 | --- src/server/graphics/android/display_support_provider.h 2013-05-16 20:04:58 +0000 | |||
1817 | +++ src/server/graphics/android/display_support_provider.h 2013-07-17 14:20:33 +0000 | |||
1818 | @@ -25,12 +25,10 @@ | |||
1819 | 25 | 25 | ||
1820 | 26 | namespace mir | 26 | namespace mir |
1821 | 27 | { | 27 | { |
1823 | 28 | namespace compositor | 28 | namespace graphics |
1824 | 29 | { | 29 | { |
1825 | 30 | class Buffer; | 30 | class Buffer; |
1829 | 31 | } | 31 | |
1827 | 32 | namespace graphics | ||
1828 | 33 | { | ||
1830 | 34 | namespace android | 32 | namespace android |
1831 | 35 | { | 33 | { |
1832 | 36 | 34 | ||
1833 | @@ -44,7 +42,7 @@ | |||
1834 | 44 | virtual unsigned int number_of_framebuffers_available() const = 0; | 42 | virtual unsigned int number_of_framebuffers_available() const = 0; |
1835 | 45 | //this function schedules the next frontbuffer to be "buffer" parameter. depending on implementation, it may | 43 | //this function schedules the next frontbuffer to be "buffer" parameter. depending on implementation, it may |
1836 | 46 | //post immediately, or be deferred. | 44 | //post immediately, or be deferred. |
1838 | 47 | virtual void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer) = 0; | 45 | virtual void set_next_frontbuffer(std::shared_ptr<graphics::Buffer> const& buffer) = 0; |
1839 | 48 | virtual void sync_to_display(bool sync) = 0; | 46 | virtual void sync_to_display(bool sync) = 0; |
1840 | 49 | protected: | 47 | protected: |
1841 | 50 | DisplaySupportProvider() = default; | 48 | DisplaySupportProvider() = default; |
1842 | 51 | 49 | ||
1843 | === modified file 'src/server/graphics/android/fb_device.cpp' | |||
1844 | --- src/server/graphics/android/fb_device.cpp 2013-07-11 16:54:41 +0000 | |||
1845 | +++ src/server/graphics/android/fb_device.cpp 2013-07-17 14:20:33 +0000 | |||
1846 | @@ -16,7 +16,7 @@ | |||
1847 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
1848 | 17 | */ | 17 | */ |
1849 | 18 | 18 | ||
1851 | 19 | #include "mir/compositor/buffer.h" | 19 | #include "mir/graphics/buffer.h" |
1852 | 20 | 20 | ||
1853 | 21 | #include "fb_device.h" | 21 | #include "fb_device.h" |
1854 | 22 | #include "buffer.h" | 22 | #include "buffer.h" |
1855 | @@ -26,10 +26,10 @@ | |||
1856 | 26 | #include <boost/throw_exception.hpp> | 26 | #include <boost/throw_exception.hpp> |
1857 | 27 | #include <stdexcept> | 27 | #include <stdexcept> |
1858 | 28 | 28 | ||
1860 | 29 | namespace mc=mir::compositor; | 29 | namespace mg = mir::graphics; |
1861 | 30 | namespace mga=mir::graphics::android; | 30 | namespace mga=mir::graphics::android; |
1862 | 31 | namespace geom=mir::geometry; | 31 | namespace geom=mir::geometry; |
1864 | 32 | 32 | ||
1865 | 33 | mga::FBDevice::FBDevice(std::shared_ptr<framebuffer_device_t> const& fbdev) | 33 | mga::FBDevice::FBDevice(std::shared_ptr<framebuffer_device_t> const& fbdev) |
1866 | 34 | : fb_device(fbdev) | 34 | : fb_device(fbdev) |
1867 | 35 | { | 35 | { |
1868 | @@ -39,7 +39,7 @@ | |||
1869 | 39 | } | 39 | } |
1870 | 40 | } | 40 | } |
1871 | 41 | 41 | ||
1873 | 42 | void mga::FBDevice::set_next_frontbuffer(std::shared_ptr<mc::Buffer> const& buffer) | 42 | void mga::FBDevice::set_next_frontbuffer(std::shared_ptr<mg::Buffer> const& buffer) |
1874 | 43 | { | 43 | { |
1875 | 44 | auto handle = buffer->native_buffer_handle(); | 44 | auto handle = buffer->native_buffer_handle(); |
1876 | 45 | if (fb_device->post(fb_device.get(), handle->handle) != 0) | 45 | if (fb_device->post(fb_device.get(), handle->handle) != 0) |
1877 | 46 | 46 | ||
1878 | === modified file 'src/server/graphics/android/fb_device.h' | |||
1879 | --- src/server/graphics/android/fb_device.h 2013-05-16 20:04:58 +0000 | |||
1880 | +++ src/server/graphics/android/fb_device.h 2013-07-17 14:20:33 +0000 | |||
1881 | @@ -39,7 +39,7 @@ | |||
1882 | 39 | geometry::PixelFormat display_format() const; | 39 | geometry::PixelFormat display_format() const; |
1883 | 40 | unsigned int number_of_framebuffers_available() const; | 40 | unsigned int number_of_framebuffers_available() const; |
1884 | 41 | 41 | ||
1886 | 42 | void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer); | 42 | void set_next_frontbuffer(std::shared_ptr<graphics::Buffer> const& buffer); |
1887 | 43 | void sync_to_display(bool sync); | 43 | void sync_to_display(bool sync); |
1888 | 44 | private: | 44 | private: |
1889 | 45 | std::shared_ptr<framebuffer_device_t> const fb_device; | 45 | std::shared_ptr<framebuffer_device_t> const fb_device; |
1890 | 46 | 46 | ||
1891 | === modified file 'src/server/graphics/android/fb_simple_swapper.cpp' | |||
1892 | --- src/server/graphics/android/fb_simple_swapper.cpp 2013-05-02 00:34:03 +0000 | |||
1893 | +++ src/server/graphics/android/fb_simple_swapper.cpp 2013-07-17 14:20:33 +0000 | |||
1894 | @@ -22,10 +22,10 @@ | |||
1895 | 22 | #include <boost/throw_exception.hpp> | 22 | #include <boost/throw_exception.hpp> |
1896 | 23 | #include <stdexcept> | 23 | #include <stdexcept> |
1897 | 24 | 24 | ||
1899 | 25 | namespace mc=mir::compositor; | 25 | namespace mg = mir::graphics; |
1900 | 26 | namespace mga=mir::graphics::android; | 26 | namespace mga=mir::graphics::android; |
1901 | 27 | 27 | ||
1903 | 28 | std::shared_ptr<mc::Buffer> mga::FBSimpleSwapper::compositor_acquire() | 28 | std::shared_ptr<mg::Buffer> mga::FBSimpleSwapper::compositor_acquire() |
1904 | 29 | { | 29 | { |
1905 | 30 | std::unique_lock<std::mutex> lk(queue_lock); | 30 | std::unique_lock<std::mutex> lk(queue_lock); |
1906 | 31 | while (queue.empty()) | 31 | while (queue.empty()) |
1907 | @@ -38,7 +38,7 @@ | |||
1908 | 38 | return buffer; | 38 | return buffer; |
1909 | 39 | } | 39 | } |
1910 | 40 | 40 | ||
1912 | 41 | void mga::FBSimpleSwapper::compositor_release(std::shared_ptr<mc::Buffer> const& released_buffer) | 41 | void mga::FBSimpleSwapper::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer) |
1913 | 42 | { | 42 | { |
1914 | 43 | std::unique_lock<std::mutex> lk(queue_lock); | 43 | std::unique_lock<std::mutex> lk(queue_lock); |
1915 | 44 | 44 | ||
1916 | 45 | 45 | ||
1917 | === modified file 'src/server/graphics/android/fb_simple_swapper.h' | |||
1918 | --- src/server/graphics/android/fb_simple_swapper.h 2013-05-02 00:34:03 +0000 | |||
1919 | +++ src/server/graphics/android/fb_simple_swapper.h 2013-07-17 14:20:33 +0000 | |||
1920 | @@ -46,14 +46,14 @@ | |||
1921 | 46 | } | 46 | } |
1922 | 47 | } | 47 | } |
1923 | 48 | 48 | ||
1926 | 49 | std::shared_ptr<compositor::Buffer> compositor_acquire(); | 49 | std::shared_ptr<Buffer> compositor_acquire(); |
1927 | 50 | void compositor_release(std::shared_ptr<compositor::Buffer> const& released_buffer); | 50 | void compositor_release(std::shared_ptr<Buffer> const& released_buffer); |
1928 | 51 | 51 | ||
1929 | 52 | private: | 52 | private: |
1930 | 53 | std::mutex queue_lock; | 53 | std::mutex queue_lock; |
1931 | 54 | std::condition_variable cv; | 54 | std::condition_variable cv; |
1932 | 55 | 55 | ||
1934 | 56 | std::queue<std::shared_ptr<compositor::Buffer>> queue; | 56 | std::queue<std::shared_ptr<graphics::Buffer>> queue; |
1935 | 57 | }; | 57 | }; |
1936 | 58 | 58 | ||
1937 | 59 | } | 59 | } |
1938 | 60 | 60 | ||
1939 | === modified file 'src/server/graphics/android/fb_swapper.h' | |||
1940 | --- src/server/graphics/android/fb_swapper.h 2013-05-02 16:29:48 +0000 | |||
1941 | +++ src/server/graphics/android/fb_swapper.h 2013-07-17 14:20:33 +0000 | |||
1942 | @@ -24,24 +24,19 @@ | |||
1943 | 24 | 24 | ||
1944 | 25 | namespace mir | 25 | namespace mir |
1945 | 26 | { | 26 | { |
1946 | 27 | namespace compositor | ||
1947 | 28 | { | ||
1948 | 29 | class Buffer; | ||
1949 | 30 | } | ||
1950 | 31 | namespace graphics | 27 | namespace graphics |
1951 | 32 | { | 28 | { |
1952 | 29 | class Buffer; | ||
1953 | 30 | |||
1954 | 33 | namespace android | 31 | namespace android |
1955 | 34 | { | 32 | { |
1956 | 35 | |||
1957 | 36 | class Buffer; | ||
1958 | 37 | |||
1959 | 38 | //TODO: remove this interface. FBSimpleSwapper should inherit from mc::BufferSwapper | 33 | //TODO: remove this interface. FBSimpleSwapper should inherit from mc::BufferSwapper |
1960 | 39 | class FBSwapper{ | 34 | class FBSwapper{ |
1961 | 40 | public: | 35 | public: |
1962 | 41 | virtual ~FBSwapper() = default; | 36 | virtual ~FBSwapper() = default; |
1963 | 42 | 37 | ||
1966 | 43 | virtual std::shared_ptr<compositor::Buffer> compositor_acquire() = 0; | 38 | virtual std::shared_ptr<Buffer> compositor_acquire() = 0; |
1967 | 44 | virtual void compositor_release(std::shared_ptr<compositor::Buffer> const& released_buffer) = 0; | 39 | virtual void compositor_release(std::shared_ptr<Buffer> const& released_buffer) = 0; |
1968 | 45 | protected: | 40 | protected: |
1969 | 46 | FBSwapper() = default; | 41 | FBSwapper() = default; |
1970 | 47 | FBSwapper(FBSwapper const&) = delete; | 42 | FBSwapper(FBSwapper const&) = delete; |
1971 | 48 | 43 | ||
1972 | === modified file 'src/server/graphics/android/hwc10_device.cpp' | |||
1973 | --- src/server/graphics/android/hwc10_device.cpp 2013-05-17 20:43:23 +0000 | |||
1974 | +++ src/server/graphics/android/hwc10_device.cpp 2013-07-17 14:20:33 +0000 | |||
1975 | @@ -23,7 +23,7 @@ | |||
1976 | 23 | #include <boost/throw_exception.hpp> | 23 | #include <boost/throw_exception.hpp> |
1977 | 24 | #include <stdexcept> | 24 | #include <stdexcept> |
1978 | 25 | 25 | ||
1980 | 26 | namespace mc=mir::compositor; | 26 | namespace mg = mir::graphics; |
1981 | 27 | namespace mga=mir::graphics::android; | 27 | namespace mga=mir::graphics::android; |
1982 | 28 | namespace geom=mir::geometry; | 28 | namespace geom=mir::geometry; |
1983 | 29 | 29 | ||
1984 | @@ -55,7 +55,7 @@ | |||
1985 | 55 | return fb_device->number_of_framebuffers_available(); | 55 | return fb_device->number_of_framebuffers_available(); |
1986 | 56 | } | 56 | } |
1987 | 57 | 57 | ||
1989 | 58 | void mga::HWC10Device::set_next_frontbuffer(std::shared_ptr<mc::Buffer> const& buffer) | 58 | void mga::HWC10Device::set_next_frontbuffer(std::shared_ptr<mg::Buffer> const& buffer) |
1990 | 59 | { | 59 | { |
1991 | 60 | fb_device->set_next_frontbuffer(buffer); | 60 | fb_device->set_next_frontbuffer(buffer); |
1992 | 61 | } | 61 | } |
1993 | 62 | 62 | ||
1994 | === modified file 'src/server/graphics/android/hwc10_device.h' | |||
1995 | --- src/server/graphics/android/hwc10_device.h 2013-05-17 20:43:23 +0000 | |||
1996 | +++ src/server/graphics/android/hwc10_device.h 2013-07-17 14:20:33 +0000 | |||
1997 | @@ -40,7 +40,7 @@ | |||
1998 | 40 | geometry::Size display_size() const; | 40 | geometry::Size display_size() const; |
1999 | 41 | geometry::PixelFormat display_format() const; | 41 | geometry::PixelFormat display_format() const; |
2000 | 42 | unsigned int number_of_framebuffers_available() const; | 42 | unsigned int number_of_framebuffers_available() const; |
2002 | 43 | void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer); | 43 | void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer); |
2003 | 44 | void sync_to_display(bool sync); | 44 | void sync_to_display(bool sync); |
2004 | 45 | 45 | ||
2005 | 46 | void commit_frame(EGLDisplay dpy, EGLSurface sur); | 46 | void commit_frame(EGLDisplay dpy, EGLSurface sur); |
2006 | 47 | 47 | ||
2007 | === modified file 'src/server/graphics/android/hwc11_device.cpp' | |||
2008 | --- src/server/graphics/android/hwc11_device.cpp 2013-07-11 16:54:41 +0000 | |||
2009 | +++ src/server/graphics/android/hwc11_device.cpp 2013-07-17 14:20:33 +0000 | |||
2010 | @@ -23,7 +23,7 @@ | |||
2011 | 23 | #include <boost/throw_exception.hpp> | 23 | #include <boost/throw_exception.hpp> |
2012 | 24 | #include <stdexcept> | 24 | #include <stdexcept> |
2013 | 25 | 25 | ||
2015 | 26 | namespace mc=mir::compositor; | 26 | namespace mg = mir::graphics; |
2016 | 27 | namespace mga=mir::graphics::android; | 27 | namespace mga=mir::graphics::android; |
2017 | 28 | namespace geom=mir::geometry; | 28 | namespace geom=mir::geometry; |
2018 | 29 | 29 | ||
2019 | @@ -74,8 +74,8 @@ | |||
2020 | 74 | //us a hint to triple buffer. Taking this hint is currently not supported. | 74 | //us a hint to triple buffer. Taking this hint is currently not supported. |
2021 | 75 | return 2u; | 75 | return 2u; |
2022 | 76 | } | 76 | } |
2025 | 77 | 77 | ||
2026 | 78 | void mga::HWC11Device::set_next_frontbuffer(std::shared_ptr<mc::Buffer> const& buffer) | 78 | void mga::HWC11Device::set_next_frontbuffer(std::shared_ptr<mg::Buffer> const& buffer) |
2027 | 79 | { | 79 | { |
2028 | 80 | layer_organizer->set_fb_target(buffer); | 80 | layer_organizer->set_fb_target(buffer); |
2029 | 81 | 81 | ||
2030 | 82 | 82 | ||
2031 | === modified file 'src/server/graphics/android/hwc11_device.h' | |||
2032 | --- src/server/graphics/android/hwc11_device.h 2013-05-17 20:17:16 +0000 | |||
2033 | +++ src/server/graphics/android/hwc11_device.h 2013-07-17 14:20:33 +0000 | |||
2034 | @@ -25,6 +25,8 @@ | |||
2035 | 25 | { | 25 | { |
2036 | 26 | namespace graphics | 26 | namespace graphics |
2037 | 27 | { | 27 | { |
2038 | 28 | class Buffer; | ||
2039 | 29 | |||
2040 | 28 | namespace android | 30 | namespace android |
2041 | 29 | { | 31 | { |
2042 | 30 | class HWCLayerOrganizer; | 32 | class HWCLayerOrganizer; |
2043 | @@ -42,7 +44,7 @@ | |||
2044 | 42 | geometry::Size display_size() const; | 44 | geometry::Size display_size() const; |
2045 | 43 | geometry::PixelFormat display_format() const; | 45 | geometry::PixelFormat display_format() const; |
2046 | 44 | unsigned int number_of_framebuffers_available() const; | 46 | unsigned int number_of_framebuffers_available() const; |
2048 | 45 | void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer); | 47 | void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer); |
2049 | 46 | void sync_to_display(bool sync); | 48 | void sync_to_display(bool sync); |
2050 | 47 | 49 | ||
2051 | 48 | void commit_frame(EGLDisplay dpy, EGLSurface sur); | 50 | void commit_frame(EGLDisplay dpy, EGLSurface sur); |
2052 | 49 | 51 | ||
2053 | === modified file 'src/server/graphics/android/hwc_common_device.h' | |||
2054 | --- src/server/graphics/android/hwc_common_device.h 2013-05-16 19:04:50 +0000 | |||
2055 | +++ src/server/graphics/android/hwc_common_device.h 2013-07-17 14:20:33 +0000 | |||
2056 | @@ -47,7 +47,7 @@ | |||
2057 | 47 | unsigned int number_of_framebuffers_available() const; | 47 | unsigned int number_of_framebuffers_available() const; |
2058 | 48 | 48 | ||
2059 | 49 | virtual geometry::Size display_size() const = 0; | 49 | virtual geometry::Size display_size() const = 0; |
2061 | 50 | virtual void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer) = 0; | 50 | virtual void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer) = 0; |
2062 | 51 | virtual void commit_frame(EGLDisplay dpy, EGLSurface sur) = 0; | 51 | virtual void commit_frame(EGLDisplay dpy, EGLSurface sur) = 0; |
2063 | 52 | 52 | ||
2064 | 53 | void notify_vsync(); | 53 | void notify_vsync(); |
2065 | 54 | 54 | ||
2066 | === modified file 'src/server/graphics/android/hwc_device.h' | |||
2067 | --- src/server/graphics/android/hwc_device.h 2013-05-16 18:40:30 +0000 | |||
2068 | +++ src/server/graphics/android/hwc_device.h 2013-07-17 14:20:33 +0000 | |||
2069 | @@ -39,7 +39,7 @@ | |||
2070 | 39 | virtual geometry::Size display_size() const = 0; | 39 | virtual geometry::Size display_size() const = 0; |
2071 | 40 | virtual geometry::PixelFormat display_format() const = 0; | 40 | virtual geometry::PixelFormat display_format() const = 0; |
2072 | 41 | virtual unsigned int number_of_framebuffers_available() const = 0; | 41 | virtual unsigned int number_of_framebuffers_available() const = 0; |
2074 | 42 | virtual void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer) = 0; | 42 | virtual void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer) = 0; |
2075 | 43 | 43 | ||
2076 | 44 | virtual void commit_frame(EGLDisplay dpy, EGLSurface sur) = 0; | 44 | virtual void commit_frame(EGLDisplay dpy, EGLSurface sur) = 0; |
2077 | 45 | private: | 45 | private: |
2078 | 46 | 46 | ||
2079 | === modified file 'src/server/graphics/android/hwc_layerlist.cpp' | |||
2080 | --- src/server/graphics/android/hwc_layerlist.cpp 2013-07-10 17:06:37 +0000 | |||
2081 | +++ src/server/graphics/android/hwc_layerlist.cpp 2013-07-17 14:20:33 +0000 | |||
2082 | @@ -21,7 +21,7 @@ | |||
2083 | 21 | 21 | ||
2084 | 22 | #include <cstring> | 22 | #include <cstring> |
2085 | 23 | 23 | ||
2087 | 24 | namespace mc=mir::compositor; | 24 | namespace mg=mir::graphics; |
2088 | 25 | namespace mga=mir::graphics::android; | 25 | namespace mga=mir::graphics::android; |
2089 | 26 | namespace geom=mir::geometry; | 26 | namespace geom=mir::geometry; |
2090 | 27 | 27 | ||
2091 | @@ -95,7 +95,7 @@ | |||
2092 | 95 | return layer_list; | 95 | return layer_list; |
2093 | 96 | } | 96 | } |
2094 | 97 | 97 | ||
2096 | 98 | void mga::HWCLayerList::set_fb_target(std::shared_ptr<mc::Buffer> const& buffer) | 98 | void mga::HWCLayerList::set_fb_target(std::shared_ptr<mg::Buffer> const& buffer) |
2097 | 99 | { | 99 | { |
2098 | 100 | auto handle = buffer->native_buffer_handle(); | 100 | auto handle = buffer->native_buffer_handle(); |
2099 | 101 | 101 | ||
2100 | 102 | 102 | ||
2101 | === modified file 'src/server/graphics/android/hwc_layerlist.h' | |||
2102 | --- src/server/graphics/android/hwc_layerlist.h 2013-05-03 22:53:42 +0000 | |||
2103 | +++ src/server/graphics/android/hwc_layerlist.h 2013-07-17 14:20:33 +0000 | |||
2104 | @@ -26,15 +26,12 @@ | |||
2105 | 26 | #include <initializer_list> | 26 | #include <initializer_list> |
2106 | 27 | namespace mir | 27 | namespace mir |
2107 | 28 | { | 28 | { |
2109 | 29 | namespace compositor | 29 | namespace graphics |
2110 | 30 | { | 30 | { |
2111 | 31 | class Buffer; | 31 | class Buffer; |
2115 | 32 | } | 32 | |
2113 | 33 | namespace graphics | ||
2114 | 34 | { | ||
2116 | 35 | namespace android | 33 | namespace android |
2117 | 36 | { | 34 | { |
2118 | 37 | |||
2119 | 38 | class HWCDefaultLayer; | 35 | class HWCDefaultLayer; |
2120 | 39 | typedef struct std::vector<std::shared_ptr<HWCDefaultLayer>> LayerList; | 36 | typedef struct std::vector<std::shared_ptr<HWCDefaultLayer>> LayerList; |
2121 | 40 | 37 | ||
2122 | @@ -75,7 +72,7 @@ | |||
2123 | 75 | public: | 72 | public: |
2124 | 76 | virtual ~HWCLayerOrganizer() = default; | 73 | virtual ~HWCLayerOrganizer() = default; |
2125 | 77 | virtual const LayerList& native_list() const = 0; | 74 | virtual const LayerList& native_list() const = 0; |
2127 | 78 | virtual void set_fb_target(std::shared_ptr<compositor::Buffer> const&) = 0; | 75 | virtual void set_fb_target(std::shared_ptr<Buffer> const&) = 0; |
2128 | 79 | 76 | ||
2129 | 80 | protected: | 77 | protected: |
2130 | 81 | HWCLayerOrganizer() = default; | 78 | HWCLayerOrganizer() = default; |
2131 | @@ -90,7 +87,7 @@ | |||
2132 | 90 | HWCLayerList(); | 87 | HWCLayerList(); |
2133 | 91 | const LayerList& native_list() const; | 88 | const LayerList& native_list() const; |
2134 | 92 | 89 | ||
2136 | 93 | void set_fb_target(std::shared_ptr<compositor::Buffer> const&); | 90 | void set_fb_target(std::shared_ptr<Buffer> const&); |
2137 | 94 | 91 | ||
2138 | 95 | private: | 92 | private: |
2139 | 96 | LayerList layer_list; | 93 | LayerList layer_list; |
2140 | 97 | 94 | ||
2141 | === modified file 'src/server/graphics/android/internal_client_window.cpp' | |||
2142 | --- src/server/graphics/android/internal_client_window.cpp 2013-06-25 05:42:49 +0000 | |||
2143 | +++ src/server/graphics/android/internal_client_window.cpp 2013-07-17 14:20:33 +0000 | |||
2144 | @@ -17,7 +17,7 @@ | |||
2145 | 17 | */ | 17 | */ |
2146 | 18 | 18 | ||
2147 | 19 | #include "mir/frontend/surface.h" | 19 | #include "mir/frontend/surface.h" |
2149 | 20 | #include "mir/compositor/buffer.h" | 20 | #include "mir/graphics/buffer.h" |
2150 | 21 | #include "internal_client_window.h" | 21 | #include "internal_client_window.h" |
2151 | 22 | #include "interpreter_resource_cache.h" | 22 | #include "interpreter_resource_cache.h" |
2152 | 23 | #include "android_format_conversion-inl.h" | 23 | #include "android_format_conversion-inl.h" |
2153 | 24 | 24 | ||
2154 | === modified file 'src/server/graphics/android/interpreter_cache.cpp' | |||
2155 | --- src/server/graphics/android/interpreter_cache.cpp 2013-05-06 22:35:54 +0000 | |||
2156 | +++ src/server/graphics/android/interpreter_cache.cpp 2013-07-17 14:20:33 +0000 | |||
2157 | @@ -20,15 +20,15 @@ | |||
2158 | 20 | #include <boost/throw_exception.hpp> | 20 | #include <boost/throw_exception.hpp> |
2159 | 21 | #include <stdexcept> | 21 | #include <stdexcept> |
2160 | 22 | 22 | ||
2161 | 23 | namespace mg = mir::graphics; | ||
2162 | 23 | namespace mga=mir::graphics::android; | 24 | namespace mga=mir::graphics::android; |
2163 | 24 | namespace mc=mir::compositor; | ||
2164 | 25 | 25 | ||
2166 | 26 | void mga::InterpreterCache::store_buffer(std::shared_ptr<compositor::Buffer>const& buffer, ANativeWindowBuffer* key) | 26 | void mga::InterpreterCache::store_buffer(std::shared_ptr<mg::Buffer>const& buffer, ANativeWindowBuffer* key) |
2167 | 27 | { | 27 | { |
2168 | 28 | buffers_in_driver[key] = buffer; | 28 | buffers_in_driver[key] = buffer; |
2169 | 29 | } | 29 | } |
2170 | 30 | 30 | ||
2172 | 31 | std::shared_ptr<mc::Buffer> mga::InterpreterCache::retrieve_buffer(ANativeWindowBuffer* returned_handle) | 31 | std::shared_ptr<mg::Buffer> mga::InterpreterCache::retrieve_buffer(ANativeWindowBuffer* returned_handle) |
2173 | 32 | { | 32 | { |
2174 | 33 | auto buffer_it = buffers_in_driver.find(returned_handle); | 33 | auto buffer_it = buffers_in_driver.find(returned_handle); |
2175 | 34 | if (buffer_it == buffers_in_driver.end()) | 34 | if (buffer_it == buffers_in_driver.end()) |
2176 | 35 | 35 | ||
2177 | === modified file 'src/server/graphics/android/interpreter_cache.h' | |||
2178 | --- src/server/graphics/android/interpreter_cache.h 2013-05-09 18:46:57 +0000 | |||
2179 | +++ src/server/graphics/android/interpreter_cache.h 2013-07-17 14:20:33 +0000 | |||
2180 | @@ -33,11 +33,11 @@ | |||
2181 | 33 | public: | 33 | public: |
2182 | 34 | InterpreterCache() {} | 34 | InterpreterCache() {} |
2183 | 35 | 35 | ||
2186 | 36 | void store_buffer(std::shared_ptr<compositor::Buffer>const& buffer, ANativeWindowBuffer* key); | 36 | void store_buffer(std::shared_ptr<graphics::Buffer>const& buffer, ANativeWindowBuffer* key); |
2187 | 37 | std::shared_ptr<compositor::Buffer> retrieve_buffer(ANativeWindowBuffer* key); | 37 | std::shared_ptr<graphics::Buffer> retrieve_buffer(ANativeWindowBuffer* key); |
2188 | 38 | 38 | ||
2189 | 39 | private: | 39 | private: |
2191 | 40 | std::unordered_map<ANativeWindowBuffer*, std::shared_ptr<compositor::Buffer>> buffers_in_driver; | 40 | std::unordered_map<ANativeWindowBuffer*, std::shared_ptr<graphics::Buffer>> buffers_in_driver; |
2192 | 41 | }; | 41 | }; |
2193 | 42 | } | 42 | } |
2194 | 43 | } | 43 | } |
2195 | 44 | 44 | ||
2196 | === modified file 'src/server/graphics/android/interpreter_resource_cache.h' | |||
2197 | --- src/server/graphics/android/interpreter_resource_cache.h 2013-05-06 21:25:47 +0000 | |||
2198 | +++ src/server/graphics/android/interpreter_resource_cache.h 2013-07-17 14:20:33 +0000 | |||
2199 | @@ -23,12 +23,10 @@ | |||
2200 | 23 | 23 | ||
2201 | 24 | namespace mir | 24 | namespace mir |
2202 | 25 | { | 25 | { |
2204 | 26 | namespace compositor | 26 | namespace graphics |
2205 | 27 | { | 27 | { |
2206 | 28 | class Buffer; | 28 | class Buffer; |
2210 | 29 | } | 29 | |
2208 | 30 | namespace graphics | ||
2209 | 31 | { | ||
2211 | 32 | namespace android | 30 | namespace android |
2212 | 33 | { | 31 | { |
2213 | 34 | class InterpreterResourceCache | 32 | class InterpreterResourceCache |
2214 | @@ -36,8 +34,8 @@ | |||
2215 | 36 | public: | 34 | public: |
2216 | 37 | InterpreterResourceCache() {} | 35 | InterpreterResourceCache() {} |
2217 | 38 | 36 | ||
2220 | 39 | virtual void store_buffer(std::shared_ptr<compositor::Buffer>const& buffer, ANativeWindowBuffer* key) = 0; | 37 | virtual void store_buffer(std::shared_ptr<graphics::Buffer>const& buffer, ANativeWindowBuffer* key) = 0; |
2221 | 40 | virtual std::shared_ptr<compositor::Buffer> retrieve_buffer(ANativeWindowBuffer* key) = 0; | 38 | virtual std::shared_ptr<graphics::Buffer> retrieve_buffer(ANativeWindowBuffer* key) = 0; |
2222 | 41 | 39 | ||
2223 | 42 | protected: | 40 | protected: |
2224 | 43 | virtual ~InterpreterResourceCache() {} | 41 | virtual ~InterpreterResourceCache() {} |
2225 | 44 | 42 | ||
2226 | === modified file 'src/server/graphics/android/server_render_window.cpp' | |||
2227 | --- src/server/graphics/android/server_render_window.cpp 2013-05-17 20:17:16 +0000 | |||
2228 | +++ src/server/graphics/android/server_render_window.cpp 2013-07-17 14:20:33 +0000 | |||
2229 | @@ -17,7 +17,7 @@ | |||
2230 | 17 | * Kevin DuBois <kevin.dubois@canonical.com> | 17 | * Kevin DuBois <kevin.dubois@canonical.com> |
2231 | 18 | */ | 18 | */ |
2232 | 19 | 19 | ||
2234 | 20 | #include "mir/compositor/buffer.h" | 20 | #include "mir/graphics/buffer.h" |
2235 | 21 | #include "server_render_window.h" | 21 | #include "server_render_window.h" |
2236 | 22 | #include "display_support_provider.h" | 22 | #include "display_support_provider.h" |
2237 | 23 | #include "fb_swapper.h" | 23 | #include "fb_swapper.h" |
2238 | 24 | 24 | ||
2239 | === modified file 'src/server/graphics/gbm/gbm_buffer_allocator.cpp' | |||
2240 | --- src/server/graphics/gbm/gbm_buffer_allocator.cpp 2013-06-14 17:16:31 +0000 | |||
2241 | +++ src/server/graphics/gbm/gbm_buffer_allocator.cpp 2013-07-17 14:20:33 +0000 | |||
2242 | @@ -116,7 +116,7 @@ | |||
2243 | 116 | assert(buffer_initializer.get() != 0); | 116 | assert(buffer_initializer.get() != 0); |
2244 | 117 | } | 117 | } |
2245 | 118 | 118 | ||
2247 | 119 | std::shared_ptr<mc::Buffer> mgg::GBMBufferAllocator::alloc_buffer( | 119 | std::shared_ptr<mg::Buffer> mgg::GBMBufferAllocator::alloc_buffer( |
2248 | 120 | mc::BufferProperties const& buffer_properties) | 120 | mc::BufferProperties const& buffer_properties) |
2249 | 121 | { | 121 | { |
2250 | 122 | uint32_t bo_flags{GBM_BO_USE_RENDERING}; | 122 | uint32_t bo_flags{GBM_BO_USE_RENDERING}; |
2251 | @@ -141,7 +141,7 @@ | |||
2252 | 141 | new EGLImageBufferTextureBinder{bo, egl_extensions}}; | 141 | new EGLImageBufferTextureBinder{bo, egl_extensions}}; |
2253 | 142 | 142 | ||
2254 | 143 | /* Create the GBMBuffer */ | 143 | /* Create the GBMBuffer */ |
2256 | 144 | std::shared_ptr<mc::Buffer> buffer{new GBMBuffer{bo, std::move(texture_binder)}}; | 144 | std::shared_ptr<mg::Buffer> buffer{new GBMBuffer{bo, std::move(texture_binder)}}; |
2257 | 145 | 145 | ||
2258 | 146 | (*buffer_initializer)(*buffer); | 146 | (*buffer_initializer)(*buffer); |
2259 | 147 | 147 | ||
2260 | 148 | 148 | ||
2261 | === modified file 'src/server/graphics/gbm/gbm_buffer_allocator.h' | |||
2262 | --- src/server/graphics/gbm/gbm_buffer_allocator.h 2013-06-14 17:16:31 +0000 | |||
2263 | +++ src/server/graphics/gbm/gbm_buffer_allocator.h 2013-07-17 14:20:33 +0000 | |||
2264 | @@ -20,7 +20,7 @@ | |||
2265 | 20 | #define MIR_PLATFORM_GBM_GBM_BUFFER_ALLOCATOR_H_ | 20 | #define MIR_PLATFORM_GBM_GBM_BUFFER_ALLOCATOR_H_ |
2266 | 21 | 21 | ||
2267 | 22 | #include "mir/compositor/graphic_buffer_allocator.h" | 22 | #include "mir/compositor/graphic_buffer_allocator.h" |
2269 | 23 | #include "mir/compositor/buffer_id.h" | 23 | #include "mir/graphics/buffer_id.h" |
2270 | 24 | 24 | ||
2271 | 25 | #include <memory> | 25 | #include <memory> |
2272 | 26 | 26 | ||
2273 | @@ -41,7 +41,7 @@ | |||
2274 | 41 | GBMBufferAllocator(const std::shared_ptr<GBMPlatform>& platform, | 41 | GBMBufferAllocator(const std::shared_ptr<GBMPlatform>& platform, |
2275 | 42 | const std::shared_ptr<BufferInitializer>& buffer_initializer); | 42 | const std::shared_ptr<BufferInitializer>& buffer_initializer); |
2276 | 43 | 43 | ||
2278 | 44 | virtual std::shared_ptr<compositor::Buffer> alloc_buffer( | 44 | virtual std::shared_ptr<Buffer> alloc_buffer( |
2279 | 45 | compositor::BufferProperties const& buffer_properties); | 45 | compositor::BufferProperties const& buffer_properties); |
2280 | 46 | 46 | ||
2281 | 47 | std::vector<geometry::PixelFormat> supported_pixel_formats(); | 47 | std::vector<geometry::PixelFormat> supported_pixel_formats(); |
2282 | 48 | 48 | ||
2283 | === modified file 'src/server/graphics/gbm/gbm_platform.cpp' | |||
2284 | --- src/server/graphics/gbm/gbm_platform.cpp 2013-07-10 08:50:53 +0000 | |||
2285 | +++ src/server/graphics/gbm/gbm_platform.cpp 2013-07-17 14:20:33 +0000 | |||
2286 | @@ -120,7 +120,7 @@ | |||
2287 | 120 | } | 120 | } |
2288 | 121 | 121 | ||
2289 | 122 | void mgg::GBMPlatform::fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, | 122 | void mgg::GBMPlatform::fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, |
2291 | 123 | std::shared_ptr<compositor::Buffer> const& buffer) const | 123 | std::shared_ptr<Buffer> const& buffer) const |
2292 | 124 | { | 124 | { |
2293 | 125 | auto native_handle = buffer->native_buffer_handle(); | 125 | auto native_handle = buffer->native_buffer_handle(); |
2294 | 126 | for(auto i=0; i<native_handle->data_items; i++) | 126 | for(auto i=0; i<native_handle->data_items; i++) |
2295 | 127 | 127 | ||
2296 | === modified file 'src/server/graphics/gbm/gbm_platform.h' | |||
2297 | --- src/server/graphics/gbm/gbm_platform.h 2013-07-10 08:50:53 +0000 | |||
2298 | +++ src/server/graphics/gbm/gbm_platform.h 2013-07-17 14:20:33 +0000 | |||
2299 | @@ -52,7 +52,7 @@ | |||
2300 | 52 | std::shared_ptr<InternalClient> create_internal_client(); | 52 | std::shared_ptr<InternalClient> create_internal_client(); |
2301 | 53 | 53 | ||
2302 | 54 | void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, | 54 | void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer, |
2304 | 55 | std::shared_ptr<compositor::Buffer> const& buffer) const; | 55 | std::shared_ptr<Buffer> const& buffer) const; |
2305 | 56 | 56 | ||
2306 | 57 | /* From DRMAuthenticator */ | 57 | /* From DRMAuthenticator */ |
2307 | 58 | void drm_auth_magic(drm_magic_t magic); | 58 | void drm_auth_magic(drm_magic_t magic); |
2308 | 59 | 59 | ||
2309 | === modified file 'src/server/graphics/gbm/internal_native_display.cpp' | |||
2310 | --- src/server/graphics/gbm/internal_native_display.cpp 2013-06-13 21:24:29 +0000 | |||
2311 | +++ src/server/graphics/gbm/internal_native_display.cpp 2013-07-17 14:20:33 +0000 | |||
2312 | @@ -21,7 +21,7 @@ | |||
2313 | 21 | #include "mir/graphics/platform_ipc_package.h" | 21 | #include "mir/graphics/platform_ipc_package.h" |
2314 | 22 | #include "mir/graphics/platform.h" | 22 | #include "mir/graphics/platform.h" |
2315 | 23 | #include "mir/frontend/surface.h" | 23 | #include "mir/frontend/surface.h" |
2317 | 24 | #include "mir/compositor/buffer.h" | 24 | #include "mir/graphics/buffer.h" |
2318 | 25 | 25 | ||
2319 | 26 | #include "mir_toolkit/mesa/native_display.h" | 26 | #include "mir_toolkit/mesa/native_display.h" |
2320 | 27 | 27 | ||
2321 | 28 | 28 | ||
2322 | === modified file 'src/server/graphics/gbm/internal_native_surface.cpp' | |||
2323 | --- src/server/graphics/gbm/internal_native_surface.cpp 2013-06-25 05:42:49 +0000 | |||
2324 | +++ src/server/graphics/gbm/internal_native_surface.cpp 2013-07-17 14:20:33 +0000 | |||
2325 | @@ -17,7 +17,7 @@ | |||
2326 | 17 | */ | 17 | */ |
2327 | 18 | 18 | ||
2328 | 19 | #include "mir/frontend/surface.h" | 19 | #include "mir/frontend/surface.h" |
2330 | 20 | #include "mir/compositor/buffer.h" | 20 | #include "mir/graphics/buffer.h" |
2331 | 21 | #include "internal_native_surface.h" | 21 | #include "internal_native_surface.h" |
2332 | 22 | #include <cstring> | 22 | #include <cstring> |
2333 | 23 | namespace mgg = mir::graphics::gbm; | 23 | namespace mgg = mir::graphics::gbm; |
2334 | 24 | 24 | ||
2335 | === modified file 'src/server/graphics/gbm/internal_native_surface.h' | |||
2336 | --- src/server/graphics/gbm/internal_native_surface.h 2013-06-18 00:21:15 +0000 | |||
2337 | +++ src/server/graphics/gbm/internal_native_surface.h 2013-07-17 14:20:33 +0000 | |||
2338 | @@ -28,7 +28,7 @@ | |||
2339 | 28 | { | 28 | { |
2340 | 29 | class Surface; | 29 | class Surface; |
2341 | 30 | } | 30 | } |
2343 | 31 | namespace compositor | 31 | namespace graphics |
2344 | 32 | { | 32 | { |
2345 | 33 | class Buffer; | 33 | class Buffer; |
2346 | 34 | } | 34 | } |
2347 | @@ -53,7 +53,7 @@ | |||
2348 | 53 | MirSurfaceParameters* parameters); | 53 | MirSurfaceParameters* parameters); |
2349 | 54 | 54 | ||
2350 | 55 | std::shared_ptr<frontend::Surface> surface; | 55 | std::shared_ptr<frontend::Surface> surface; |
2352 | 56 | std::shared_ptr<compositor::Buffer> current_buffer; | 56 | std::shared_ptr<graphics::Buffer> current_buffer; |
2353 | 57 | }; | 57 | }; |
2354 | 58 | 58 | ||
2355 | 59 | } | 59 | } |
2356 | 60 | 60 | ||
2357 | === modified file 'src/server/graphics/gl_pixel_buffer.cpp' | |||
2358 | --- src/server/graphics/gl_pixel_buffer.cpp 2013-06-25 10:44:13 +0000 | |||
2359 | +++ src/server/graphics/gl_pixel_buffer.cpp 2013-07-17 14:20:33 +0000 | |||
2360 | @@ -18,7 +18,7 @@ | |||
2361 | 18 | 18 | ||
2362 | 19 | #include "mir/graphics/gl_context.h" | 19 | #include "mir/graphics/gl_context.h" |
2363 | 20 | #include "mir/graphics/gl_pixel_buffer.h" | 20 | #include "mir/graphics/gl_pixel_buffer.h" |
2365 | 21 | #include "mir/compositor/buffer.h" | 21 | #include "mir/graphics/buffer.h" |
2366 | 22 | 22 | ||
2367 | 23 | #include <stdexcept> | 23 | #include <stdexcept> |
2368 | 24 | #include <boost/throw_exception.hpp> | 24 | #include <boost/throw_exception.hpp> |
2369 | @@ -26,7 +26,6 @@ | |||
2370 | 26 | #include <GLES2/gl2ext.h> | 26 | #include <GLES2/gl2ext.h> |
2371 | 27 | 27 | ||
2372 | 28 | namespace mg = mir::graphics; | 28 | namespace mg = mir::graphics; |
2373 | 29 | namespace msh = mir::shell; | ||
2374 | 30 | namespace geom = mir::geometry; | 29 | namespace geom = mir::geometry; |
2375 | 31 | 30 | ||
2376 | 32 | namespace | 31 | namespace |
2377 | @@ -79,7 +78,7 @@ | |||
2378 | 79 | glBindFramebuffer(GL_FRAMEBUFFER, fbo); | 78 | glBindFramebuffer(GL_FRAMEBUFFER, fbo); |
2379 | 80 | } | 79 | } |
2380 | 81 | 80 | ||
2382 | 82 | void mg::GLPixelBuffer::fill_from(compositor::Buffer& buffer) | 81 | void mg::GLPixelBuffer::fill_from(Buffer& buffer) |
2383 | 83 | { | 82 | { |
2384 | 84 | auto width = buffer.size().width.as_uint32_t(); | 83 | auto width = buffer.size().width.as_uint32_t(); |
2385 | 85 | auto height = buffer.size().height.as_uint32_t(); | 84 | auto height = buffer.size().height.as_uint32_t(); |
2386 | 86 | 85 | ||
2387 | === modified file 'src/server/graphics/gl_renderer.cpp' | |||
2388 | --- src/server/graphics/gl_renderer.cpp 2013-07-12 22:04:13 +0000 | |||
2389 | +++ src/server/graphics/gl_renderer.cpp 2013-07-17 14:20:33 +0000 | |||
2390 | @@ -1,7 +1,7 @@ | |||
2391 | 1 | #include "mir/graphics/gl_renderer.h" | 1 | #include "mir/graphics/gl_renderer.h" |
2392 | 2 | #include "mir/graphics/compositing_criteria.h" | 2 | #include "mir/graphics/compositing_criteria.h" |
2393 | 3 | #include "mir/surfaces/buffer_stream.h" | 3 | #include "mir/surfaces/buffer_stream.h" |
2395 | 4 | #include "mir/compositor/buffer.h" | 4 | #include "mir/graphics/buffer.h" |
2396 | 5 | 5 | ||
2397 | 6 | #include <glm/gtc/matrix_transform.hpp> | 6 | #include <glm/gtc/matrix_transform.hpp> |
2398 | 7 | #include <glm/gtc/type_ptr.hpp> | 7 | #include <glm/gtc/type_ptr.hpp> |
2399 | 8 | 8 | ||
2400 | === modified file 'src/server/shell/surface.cpp' | |||
2401 | --- src/server/shell/surface.cpp 2013-07-09 18:55:47 +0000 | |||
2402 | +++ src/server/shell/surface.cpp 2013-07-17 14:20:33 +0000 | |||
2403 | @@ -31,6 +31,7 @@ | |||
2404 | 31 | 31 | ||
2405 | 32 | namespace msh = mir::shell; | 32 | namespace msh = mir::shell; |
2406 | 33 | namespace mc = mir::compositor; | 33 | namespace mc = mir::compositor; |
2407 | 34 | namespace mg = mir::graphics; | ||
2408 | 34 | namespace mi = mir::input; | 35 | namespace mi = mir::input; |
2409 | 35 | namespace ms = mir::surfaces; | 36 | namespace ms = mir::surfaces; |
2410 | 36 | namespace geom = mir::geometry; | 37 | namespace geom = mir::geometry; |
2411 | @@ -166,7 +167,7 @@ | |||
2412 | 166 | } | 167 | } |
2413 | 167 | } | 168 | } |
2414 | 168 | 169 | ||
2416 | 169 | std::shared_ptr<mc::Buffer> msh::Surface::advance_client_buffer() | 170 | std::shared_ptr<mg::Buffer> msh::Surface::advance_client_buffer() |
2417 | 170 | { | 171 | { |
2418 | 171 | if (auto const& s = surface.lock()) | 172 | if (auto const& s = surface.lock()) |
2419 | 172 | { | 173 | { |
2420 | @@ -187,7 +188,7 @@ | |||
2421 | 187 | } | 188 | } |
2422 | 188 | 189 | ||
2423 | 189 | void msh::Surface::with_most_recent_buffer_do( | 190 | void msh::Surface::with_most_recent_buffer_do( |
2425 | 190 | std::function<void(mc::Buffer&)> const& exec) | 191 | std::function<void(mg::Buffer&)> const& exec) |
2426 | 191 | { | 192 | { |
2427 | 192 | if (auto const& s = surface.lock()) | 193 | if (auto const& s = surface.lock()) |
2428 | 193 | { | 194 | { |
2429 | 194 | 195 | ||
2430 | === modified file 'src/server/shell/threaded_snapshot_strategy.cpp' | |||
2431 | --- src/server/shell/threaded_snapshot_strategy.cpp 2013-06-25 13:19:14 +0000 | |||
2432 | +++ src/server/shell/threaded_snapshot_strategy.cpp 2013-07-17 14:20:33 +0000 | |||
2433 | @@ -17,7 +17,7 @@ | |||
2434 | 17 | */ | 17 | */ |
2435 | 18 | 18 | ||
2436 | 19 | #include "mir/shell/threaded_snapshot_strategy.h" | 19 | #include "mir/shell/threaded_snapshot_strategy.h" |
2438 | 20 | #include "mir/shell/pixel_buffer.h" | 20 | #include "mir/graphics/pixel_buffer.h" |
2439 | 21 | #include "mir/shell/surface_buffer_access.h" | 21 | #include "mir/shell/surface_buffer_access.h" |
2440 | 22 | 22 | ||
2441 | 23 | #include <deque> | 23 | #include <deque> |
2442 | @@ -41,7 +41,7 @@ | |||
2443 | 41 | class SnapshottingFunctor | 41 | class SnapshottingFunctor |
2444 | 42 | { | 42 | { |
2445 | 43 | public: | 43 | public: |
2447 | 44 | SnapshottingFunctor(std::shared_ptr<PixelBuffer> const& pixels) | 44 | SnapshottingFunctor(std::shared_ptr<graphics::PixelBuffer> const& pixels) |
2448 | 45 | : running{true}, pixels{pixels} | 45 | : running{true}, pixels{pixels} |
2449 | 46 | { | 46 | { |
2450 | 47 | } | 47 | } |
2451 | @@ -72,7 +72,7 @@ | |||
2452 | 72 | void take_snapshot(WorkItem const& wi) | 72 | void take_snapshot(WorkItem const& wi) |
2453 | 73 | { | 73 | { |
2454 | 74 | wi.surface_buffer_access->with_most_recent_buffer_do( | 74 | wi.surface_buffer_access->with_most_recent_buffer_do( |
2456 | 75 | [this](compositor::Buffer& buffer) | 75 | [this](graphics::Buffer& buffer) |
2457 | 76 | { | 76 | { |
2458 | 77 | pixels->fill_from(buffer); | 77 | pixels->fill_from(buffer); |
2459 | 78 | }); | 78 | }); |
2460 | @@ -100,7 +100,7 @@ | |||
2461 | 100 | 100 | ||
2462 | 101 | private: | 101 | private: |
2463 | 102 | bool running; | 102 | bool running; |
2465 | 103 | std::shared_ptr<PixelBuffer> const pixels; | 103 | std::shared_ptr<graphics::PixelBuffer> const pixels; |
2466 | 104 | std::mutex work_mutex; | 104 | std::mutex work_mutex; |
2467 | 105 | std::condition_variable work_cv; | 105 | std::condition_variable work_cv; |
2468 | 106 | std::deque<WorkItem> work; | 106 | std::deque<WorkItem> work; |
2469 | @@ -110,7 +110,7 @@ | |||
2470 | 110 | } | 110 | } |
2471 | 111 | 111 | ||
2472 | 112 | msh::ThreadedSnapshotStrategy::ThreadedSnapshotStrategy( | 112 | msh::ThreadedSnapshotStrategy::ThreadedSnapshotStrategy( |
2474 | 113 | std::shared_ptr<PixelBuffer> const& pixels) | 113 | std::shared_ptr<graphics::PixelBuffer> const& pixels) |
2475 | 114 | : pixels{pixels}, | 114 | : pixels{pixels}, |
2476 | 115 | functor{new SnapshottingFunctor{pixels}}, | 115 | functor{new SnapshottingFunctor{pixels}}, |
2477 | 116 | thread{std::ref(*functor)} | 116 | thread{std::ref(*functor)} |
2478 | 117 | 117 | ||
2479 | === modified file 'src/server/surfaces/surface.cpp' | |||
2480 | --- src/server/surfaces/surface.cpp 2013-07-16 15:49:19 +0000 | |||
2481 | +++ src/server/surfaces/surface.cpp 2013-07-17 14:20:33 +0000 | |||
2482 | @@ -22,7 +22,7 @@ | |||
2483 | 22 | #include "mir/surfaces/surface_state.h" | 22 | #include "mir/surfaces/surface_state.h" |
2484 | 23 | #include "mir/surfaces/buffer_stream.h" | 23 | #include "mir/surfaces/buffer_stream.h" |
2485 | 24 | #include "mir/input/input_channel.h" | 24 | #include "mir/input/input_channel.h" |
2487 | 25 | #include "mir/compositor/buffer.h" | 25 | #include "mir/graphics/buffer.h" |
2488 | 26 | 26 | ||
2489 | 27 | #include <boost/throw_exception.hpp> | 27 | #include <boost/throw_exception.hpp> |
2490 | 28 | 28 | ||
2491 | @@ -104,7 +104,7 @@ | |||
2492 | 104 | return surface_buffer_stream->get_stream_pixel_format(); | 104 | return surface_buffer_stream->get_stream_pixel_format(); |
2493 | 105 | } | 105 | } |
2494 | 106 | 106 | ||
2496 | 107 | std::shared_ptr<mc::Buffer> ms::Surface::advance_client_buffer() | 107 | std::shared_ptr<mg::Buffer> ms::Surface::advance_client_buffer() |
2497 | 108 | { | 108 | { |
2498 | 109 | if (surface_in_startup) | 109 | if (surface_in_startup) |
2499 | 110 | { | 110 | { |
2500 | @@ -123,7 +123,7 @@ | |||
2501 | 123 | surface_buffer_stream->allow_framedropping(allow); | 123 | surface_buffer_stream->allow_framedropping(allow); |
2502 | 124 | } | 124 | } |
2503 | 125 | 125 | ||
2505 | 126 | std::shared_ptr<mc::Buffer> ms::Surface::compositor_buffer() const | 126 | std::shared_ptr<mg::Buffer> ms::Surface::compositor_buffer() const |
2506 | 127 | { | 127 | { |
2507 | 128 | return surface_buffer_stream->lock_back_buffer(); | 128 | return surface_buffer_stream->lock_back_buffer(); |
2508 | 129 | } | 129 | } |
2509 | 130 | 130 | ||
2510 | === modified file 'tests/integration-tests/client/test_client_render.cpp' | |||
2511 | --- tests/integration-tests/client/test_client_render.cpp 2013-07-11 16:54:41 +0000 | |||
2512 | +++ tests/integration-tests/client/test_client_render.cpp 2013-07-17 14:20:33 +0000 | |||
2513 | @@ -480,16 +480,16 @@ | |||
2514 | 480 | 480 | ||
2515 | 481 | geom::Size size; | 481 | geom::Size size; |
2516 | 482 | geom::PixelFormat pf; | 482 | geom::PixelFormat pf; |
2519 | 483 | mc::BufferID id1; | 483 | mg::BufferID id1; |
2520 | 484 | mc::BufferID id2; | 484 | mg::BufferID id2; |
2521 | 485 | std::shared_ptr<mtd::TestGrallocMapper> buffer_converter; | 485 | std::shared_ptr<mtd::TestGrallocMapper> buffer_converter; |
2522 | 486 | std::shared_ptr<mtf::Process> client_process; | 486 | std::shared_ptr<mtf::Process> client_process; |
2523 | 487 | 487 | ||
2524 | 488 | std::shared_ptr<MirNativeBuffer> handle; | 488 | std::shared_ptr<MirNativeBuffer> handle; |
2525 | 489 | std::shared_ptr<MirNativeBuffer> second_handle; | 489 | std::shared_ptr<MirNativeBuffer> second_handle; |
2526 | 490 | 490 | ||
2529 | 491 | std::shared_ptr<mc::Buffer> android_buffer; | 491 | std::shared_ptr<mg::Buffer> android_buffer; |
2530 | 492 | std::shared_ptr<mc::Buffer> second_android_buffer; | 492 | std::shared_ptr<mg::Buffer> second_android_buffer; |
2531 | 493 | std::shared_ptr<mga::AndroidGraphicBufferAllocator> allocator; | 493 | std::shared_ptr<mga::AndroidGraphicBufferAllocator> allocator; |
2532 | 494 | 494 | ||
2533 | 495 | static std::shared_ptr<mtf::Process> render_single_client_process; | 495 | static std::shared_ptr<mtf::Process> render_single_client_process; |
2534 | 496 | 496 | ||
2535 | === modified file 'tests/integration-tests/compositor/test_buffer_stream.cpp' | |||
2536 | --- tests/integration-tests/compositor/test_buffer_stream.cpp 2013-07-11 16:54:41 +0000 | |||
2537 | +++ tests/integration-tests/compositor/test_buffer_stream.cpp 2013-07-17 14:20:33 +0000 | |||
2538 | @@ -31,6 +31,7 @@ | |||
2539 | 31 | #include <chrono> | 31 | #include <chrono> |
2540 | 32 | 32 | ||
2541 | 33 | namespace mc = mir::compositor; | 33 | namespace mc = mir::compositor; |
2542 | 34 | namespace mg = mir::graphics; | ||
2543 | 34 | namespace ms = mir::surfaces; | 35 | namespace ms = mir::surfaces; |
2544 | 35 | namespace mt = mir::testing; | 36 | namespace mt = mir::testing; |
2545 | 36 | namespace mtd = mir::test::doubles; | 37 | namespace mtd = mir::test::doubles; |
2546 | @@ -43,7 +44,7 @@ | |||
2547 | 43 | { | 44 | { |
2548 | 44 | StubBufferAllocator() : id{1} {} | 45 | StubBufferAllocator() : id{1} {} |
2549 | 45 | 46 | ||
2551 | 46 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) | 47 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&) |
2552 | 47 | { | 48 | { |
2553 | 48 | mc::BufferProperties properties{geom::Size{id, id}, | 49 | mc::BufferProperties properties{geom::Size{id, id}, |
2554 | 49 | geom::PixelFormat::abgr_8888, | 50 | geom::PixelFormat::abgr_8888, |
2555 | @@ -156,7 +157,7 @@ | |||
2556 | 156 | namespace | 157 | namespace |
2557 | 157 | { | 158 | { |
2558 | 158 | 159 | ||
2560 | 159 | void client_request_loop(std::shared_ptr<mc::Buffer>& out_buffer, | 160 | void client_request_loop(std::shared_ptr<mg::Buffer>& out_buffer, |
2561 | 160 | mt::SynchronizerSpawned& synchronizer, | 161 | mt::SynchronizerSpawned& synchronizer, |
2562 | 161 | ms::BufferStream& stream) | 162 | ms::BufferStream& stream) |
2563 | 162 | { | 163 | { |
2564 | @@ -210,7 +211,7 @@ | |||
2565 | 210 | std::vector<std::unique_ptr<CompositorInfo>> compositors; | 211 | std::vector<std::unique_ptr<CompositorInfo>> compositors; |
2566 | 211 | 212 | ||
2567 | 212 | mt::Synchronizer client_sync; | 213 | mt::Synchronizer client_sync; |
2569 | 213 | std::shared_ptr<mc::Buffer> client_buffer; | 214 | std::shared_ptr<mg::Buffer> client_buffer; |
2570 | 214 | auto client_thread = std::thread(client_request_loop, std::ref(client_buffer), | 215 | auto client_thread = std::thread(client_request_loop, std::ref(client_buffer), |
2571 | 215 | std::ref(client_sync), std::ref(buffer_stream)); | 216 | std::ref(client_sync), std::ref(buffer_stream)); |
2572 | 216 | 217 | ||
2573 | 217 | 218 | ||
2574 | === modified file 'tests/integration-tests/compositor/test_stress_buffer_swapper.cpp' | |||
2575 | --- tests/integration-tests/compositor/test_stress_buffer_swapper.cpp 2013-05-29 23:49:32 +0000 | |||
2576 | +++ tests/integration-tests/compositor/test_stress_buffer_swapper.cpp 2013-07-17 14:20:33 +0000 | |||
2577 | @@ -20,12 +20,13 @@ | |||
2578 | 20 | #include "multithread_harness.h" | 20 | #include "multithread_harness.h" |
2579 | 21 | 21 | ||
2580 | 22 | #include "mir/compositor/buffer_swapper_multi.h" | 22 | #include "mir/compositor/buffer_swapper_multi.h" |
2582 | 23 | #include "mir/compositor/buffer_id.h" | 23 | #include "mir/graphics/buffer_id.h" |
2583 | 24 | 24 | ||
2584 | 25 | #include <thread> | 25 | #include <thread> |
2585 | 26 | #include <chrono> | 26 | #include <chrono> |
2586 | 27 | 27 | ||
2587 | 28 | namespace mc = mir::compositor; | 28 | namespace mc = mir::compositor; |
2588 | 29 | namespace mg = mir::graphics; | ||
2589 | 29 | namespace mt = mir::testing; | 30 | namespace mt = mir::testing; |
2590 | 30 | namespace geom = mir::geometry; | 31 | namespace geom = mir::geometry; |
2591 | 31 | namespace mtd = mir::test::doubles; | 32 | namespace mtd = mir::test::doubles; |
2592 | @@ -60,15 +61,15 @@ | |||
2593 | 60 | 61 | ||
2594 | 61 | void test_distinct_buffers(mc::BufferSwapper& swapper); | 62 | void test_distinct_buffers(mc::BufferSwapper& swapper); |
2595 | 62 | void test_valid_buffers(mc::BufferSwapper& swapper); | 63 | void test_valid_buffers(mc::BufferSwapper& swapper); |
2598 | 63 | void test_wait_situation(std::vector<std::shared_ptr<mc::Buffer>>& compositor_output_buffers, | 64 | void test_wait_situation(std::vector<std::shared_ptr<mg::Buffer>>& compositor_output_buffers, |
2599 | 64 | std::vector<std::shared_ptr<mc::Buffer>>& client_output_buffers, | 65 | std::vector<std::shared_ptr<mg::Buffer>>& client_output_buffers, |
2600 | 65 | mc::BufferSwapper& swapper, | 66 | mc::BufferSwapper& swapper, |
2601 | 66 | unsigned int number_of_client_requests_to_make); | 67 | unsigned int number_of_client_requests_to_make); |
2602 | 67 | void test_last_posted(mc::BufferSwapper& swapper); | 68 | void test_last_posted(mc::BufferSwapper& swapper); |
2603 | 68 | 69 | ||
2607 | 69 | std::shared_ptr<mc::Buffer> buffer_a; | 70 | std::shared_ptr<mg::Buffer> buffer_a; |
2608 | 70 | std::shared_ptr<mc::Buffer> buffer_b; | 71 | std::shared_ptr<mg::Buffer> buffer_b; |
2609 | 71 | std::shared_ptr<mc::Buffer> buffer_c; | 72 | std::shared_ptr<mg::Buffer> buffer_c; |
2610 | 72 | }; | 73 | }; |
2611 | 73 | 74 | ||
2612 | 74 | void main_test_loop_pause(std::chrono::microseconds duration) | 75 | void main_test_loop_pause(std::chrono::microseconds duration) |
2613 | @@ -76,7 +77,7 @@ | |||
2614 | 76 | std::this_thread::sleep_for(duration); | 77 | std::this_thread::sleep_for(duration); |
2615 | 77 | } | 78 | } |
2616 | 78 | 79 | ||
2618 | 79 | void client_request_loop(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, | 80 | void client_request_loop(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, |
2619 | 80 | mc::BufferSwapper& swapper) | 81 | mc::BufferSwapper& swapper) |
2620 | 81 | { | 82 | { |
2621 | 82 | for(;;) | 83 | for(;;) |
2622 | @@ -92,7 +93,7 @@ | |||
2623 | 92 | } | 93 | } |
2624 | 93 | } | 94 | } |
2625 | 94 | 95 | ||
2627 | 95 | void compositor_grab_loop(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, | 96 | void compositor_grab_loop(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, |
2628 | 96 | mc::BufferSwapper& swapper) | 97 | mc::BufferSwapper& swapper) |
2629 | 97 | { | 98 | { |
2630 | 98 | for(;;) | 99 | for(;;) |
2631 | @@ -111,8 +112,8 @@ | |||
2632 | 111 | buffer */ | 112 | buffer */ |
2633 | 112 | void BufferSwapperStress::test_distinct_buffers(mc::BufferSwapper& swapper) | 113 | void BufferSwapperStress::test_distinct_buffers(mc::BufferSwapper& swapper) |
2634 | 113 | { | 114 | { |
2637 | 114 | std::shared_ptr<mc::Buffer> compositor_buffer; | 115 | std::shared_ptr<mg::Buffer> compositor_buffer; |
2638 | 115 | std::shared_ptr<mc::Buffer> client_buffer; | 116 | std::shared_ptr<mg::Buffer> client_buffer; |
2639 | 116 | 117 | ||
2640 | 117 | thread1 = std::thread(compositor_grab_loop, std::ref(compositor_buffer), | 118 | thread1 = std::thread(compositor_grab_loop, std::ref(compositor_buffer), |
2641 | 118 | std::ref(compositor_controller), std::ref(swapper)); | 119 | std::ref(compositor_controller), std::ref(swapper)); |
2642 | @@ -140,18 +141,18 @@ | |||
2643 | 140 | 141 | ||
2644 | 141 | TEST_F(BufferSwapperStress, distinct_and_valid_double_buffers_in_client_and_compositor) | 142 | TEST_F(BufferSwapperStress, distinct_and_valid_double_buffers_in_client_and_compositor) |
2645 | 142 | { | 143 | { |
2647 | 143 | auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b}; | 144 | auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b}; |
2648 | 144 | mc::BufferSwapperMulti double_swapper(double_list, double_list.size()); | 145 | mc::BufferSwapperMulti double_swapper(double_list, double_list.size()); |
2649 | 145 | test_distinct_buffers(double_swapper); | 146 | test_distinct_buffers(double_swapper); |
2650 | 146 | } | 147 | } |
2651 | 147 | TEST_F(BufferSwapperStress, distinct_and_valid_triple_buffers_in_client_and_compositor) | 148 | TEST_F(BufferSwapperStress, distinct_and_valid_triple_buffers_in_client_and_compositor) |
2652 | 148 | { | 149 | { |
2654 | 149 | auto triple_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c}; | 150 | auto triple_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c}; |
2655 | 150 | mc::BufferSwapperMulti triple_swapper(triple_list, triple_list.size()); | 151 | mc::BufferSwapperMulti triple_swapper(triple_list, triple_list.size()); |
2656 | 151 | test_distinct_buffers(triple_swapper); | 152 | test_distinct_buffers(triple_swapper); |
2657 | 152 | } | 153 | } |
2658 | 153 | 154 | ||
2660 | 154 | void client_request_loop_finite(std::vector<std::shared_ptr<mc::Buffer>>& buffers, | 155 | void client_request_loop_finite(std::vector<std::shared_ptr<mg::Buffer>>& buffers, |
2661 | 155 | mt::SynchronizerSpawned& synchronizer, | 156 | mt::SynchronizerSpawned& synchronizer, |
2662 | 156 | mc::BufferSwapper& swapper, | 157 | mc::BufferSwapper& swapper, |
2663 | 157 | int const number_of_requests_to_make) | 158 | int const number_of_requests_to_make) |
2664 | @@ -167,7 +168,7 @@ | |||
2665 | 167 | synchronizer.child_enter_wait(); | 168 | synchronizer.child_enter_wait(); |
2666 | 168 | } | 169 | } |
2667 | 169 | 170 | ||
2669 | 170 | void compositor_grab(std::vector<std::shared_ptr<mc::Buffer>>& buffers, | 171 | void compositor_grab(std::vector<std::shared_ptr<mg::Buffer>>& buffers, |
2670 | 171 | mt::SynchronizerSpawned& synchronizer, | 172 | mt::SynchronizerSpawned& synchronizer, |
2671 | 172 | mc::BufferSwapper& swapper) | 173 | mc::BufferSwapper& swapper) |
2672 | 173 | { | 174 | { |
2673 | @@ -180,8 +181,8 @@ | |||
2674 | 180 | synchronizer.child_enter_wait(); | 181 | synchronizer.child_enter_wait(); |
2675 | 181 | } | 182 | } |
2676 | 182 | 183 | ||
2679 | 183 | void BufferSwapperStress::test_wait_situation(std::vector<std::shared_ptr<mc::Buffer>>& compositor_output_buffers, | 184 | void BufferSwapperStress::test_wait_situation(std::vector<std::shared_ptr<mg::Buffer>>& compositor_output_buffers, |
2680 | 184 | std::vector<std::shared_ptr<mc::Buffer>>& client_output_buffers, | 185 | std::vector<std::shared_ptr<mg::Buffer>>& client_output_buffers, |
2681 | 185 | mc::BufferSwapper& swapper, | 186 | mc::BufferSwapper& swapper, |
2682 | 186 | unsigned int const number_of_client_requests_to_make) | 187 | unsigned int const number_of_client_requests_to_make) |
2683 | 187 | { | 188 | { |
2684 | @@ -209,10 +210,10 @@ | |||
2685 | 209 | 210 | ||
2686 | 210 | TEST_F(BufferSwapperStress, double_test_wait_situation) | 211 | TEST_F(BufferSwapperStress, double_test_wait_situation) |
2687 | 211 | { | 212 | { |
2690 | 212 | std::vector<std::shared_ptr<mc::Buffer>> client_buffers; | 213 | std::vector<std::shared_ptr<mg::Buffer>> client_buffers; |
2691 | 213 | std::vector<std::shared_ptr<mc::Buffer>> compositor_buffers; | 214 | std::vector<std::shared_ptr<mg::Buffer>> compositor_buffers; |
2692 | 214 | /* a double buffered client should stall on the second request without the compositor running */ | 215 | /* a double buffered client should stall on the second request without the compositor running */ |
2694 | 215 | auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b}; | 216 | auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b}; |
2695 | 216 | mc::BufferSwapperMulti double_swapper(double_list, double_list.size()); | 217 | mc::BufferSwapperMulti double_swapper(double_list, double_list.size()); |
2696 | 217 | test_wait_situation(compositor_buffers, client_buffers, double_swapper, 2); | 218 | test_wait_situation(compositor_buffers, client_buffers, double_swapper, 2); |
2697 | 218 | 219 | ||
2698 | @@ -221,9 +222,9 @@ | |||
2699 | 221 | 222 | ||
2700 | 222 | TEST_F(BufferSwapperStress, triple_test_wait_situation) | 223 | TEST_F(BufferSwapperStress, triple_test_wait_situation) |
2701 | 223 | { | 224 | { |
2705 | 224 | std::vector<std::shared_ptr<mc::Buffer>> client_buffers; | 225 | std::vector<std::shared_ptr<mg::Buffer>> client_buffers; |
2706 | 225 | std::vector<std::shared_ptr<mc::Buffer>> compositor_buffers; | 226 | std::vector<std::shared_ptr<mg::Buffer>> compositor_buffers; |
2707 | 226 | auto triple_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c}; | 227 | auto triple_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c}; |
2708 | 227 | mc::BufferSwapperMulti triple_swapper(triple_list, triple_list.size()); | 228 | mc::BufferSwapperMulti triple_swapper(triple_list, triple_list.size()); |
2709 | 228 | /* a triple buffered client should stall on the third request without the compositor running */ | 229 | /* a triple buffered client should stall on the third request without the compositor running */ |
2710 | 229 | test_wait_situation(compositor_buffers, client_buffers, triple_swapper, 3); | 230 | test_wait_situation(compositor_buffers, client_buffers, triple_swapper, 3); |
2711 | @@ -231,7 +232,7 @@ | |||
2712 | 231 | EXPECT_EQ(client_buffers.at(0), compositor_buffers.at(0)); | 232 | EXPECT_EQ(client_buffers.at(0), compositor_buffers.at(0)); |
2713 | 232 | } | 233 | } |
2714 | 233 | 234 | ||
2716 | 234 | void client_request_loop_with_wait(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, | 235 | void client_request_loop_with_wait(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, |
2717 | 235 | mc::BufferSwapper& swapper) | 236 | mc::BufferSwapper& swapper) |
2718 | 236 | { | 237 | { |
2719 | 237 | bool wait_request = false; | 238 | bool wait_request = false; |
2720 | @@ -249,10 +250,10 @@ | |||
2721 | 249 | } | 250 | } |
2722 | 250 | } | 251 | } |
2723 | 251 | 252 | ||
2725 | 252 | void compositor_grab_loop_with_wait(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, | 253 | void compositor_grab_loop_with_wait(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer, |
2726 | 253 | mc::BufferSwapper& swapper) | 254 | mc::BufferSwapper& swapper) |
2727 | 254 | { | 255 | { |
2729 | 255 | std::shared_ptr<mc::Buffer> buffer_ref; | 256 | std::shared_ptr<mg::Buffer> buffer_ref; |
2730 | 256 | bool wait_request = false; | 257 | bool wait_request = false; |
2731 | 257 | for(;;) | 258 | for(;;) |
2732 | 258 | { | 259 | { |
2733 | @@ -274,8 +275,8 @@ | |||
2734 | 274 | 275 | ||
2735 | 275 | void BufferSwapperStress::test_last_posted(mc::BufferSwapper& swapper) | 276 | void BufferSwapperStress::test_last_posted(mc::BufferSwapper& swapper) |
2736 | 276 | { | 277 | { |
2739 | 277 | std::shared_ptr<mc::Buffer> compositor_buffer; | 278 | std::shared_ptr<mg::Buffer> compositor_buffer; |
2740 | 278 | std::shared_ptr<mc::Buffer> client_buffer; | 279 | std::shared_ptr<mg::Buffer> client_buffer; |
2741 | 279 | 280 | ||
2742 | 280 | thread1 = std::thread(compositor_grab_loop_with_wait, std::ref(compositor_buffer), std::ref(compositor_controller), std::ref(swapper)); | 281 | thread1 = std::thread(compositor_grab_loop_with_wait, std::ref(compositor_buffer), std::ref(compositor_controller), std::ref(swapper)); |
2743 | 281 | thread2 = std::thread(client_request_loop_with_wait, std::ref(client_buffer), std::ref(client_controller), std::ref(swapper)); | 282 | thread2 = std::thread(client_request_loop_with_wait, std::ref(client_buffer), std::ref(client_controller), std::ref(swapper)); |
2744 | @@ -301,7 +302,7 @@ | |||
2745 | 301 | 302 | ||
2746 | 302 | TEST_F(BufferSwapperStress, double_test_last_posted) | 303 | TEST_F(BufferSwapperStress, double_test_last_posted) |
2747 | 303 | { | 304 | { |
2749 | 304 | auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b}; | 305 | auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b}; |
2750 | 305 | mc::BufferSwapperMulti double_swapper(double_list, double_list.size()); | 306 | mc::BufferSwapperMulti double_swapper(double_list, double_list.size()); |
2751 | 306 | test_last_posted(double_swapper); | 307 | test_last_posted(double_swapper); |
2752 | 307 | } | 308 | } |
2753 | 308 | 309 | ||
2754 | === modified file 'tests/integration-tests/compositor/test_swapping_swappers.cpp' | |||
2755 | --- tests/integration-tests/compositor/test_swapping_swappers.cpp 2013-07-11 16:54:41 +0000 | |||
2756 | +++ tests/integration-tests/compositor/test_swapping_swappers.cpp 2013-07-17 14:20:33 +0000 | |||
2757 | @@ -32,6 +32,7 @@ | |||
2758 | 32 | #include <chrono> | 32 | #include <chrono> |
2759 | 33 | 33 | ||
2760 | 34 | namespace mc = mir::compositor; | 34 | namespace mc = mir::compositor; |
2761 | 35 | namespace mg = mir::graphics; | ||
2762 | 35 | namespace mt = mir::testing; | 36 | namespace mt = mir::testing; |
2763 | 36 | namespace geom = mir::geometry; | 37 | namespace geom = mir::geometry; |
2764 | 37 | namespace mtd = mir::test::doubles; | 38 | namespace mtd = mir::test::doubles; |
2765 | @@ -49,7 +50,7 @@ | |||
2766 | 49 | } | 50 | } |
2767 | 50 | ~MockBufferAllocator() noexcept{} | 51 | ~MockBufferAllocator() noexcept{} |
2768 | 51 | 52 | ||
2770 | 52 | MOCK_METHOD1(alloc_buffer, std::shared_ptr<mc::Buffer>(mc::BufferProperties const&)); | 53 | MOCK_METHOD1(alloc_buffer, std::shared_ptr<mg::Buffer>(mc::BufferProperties const&)); |
2771 | 53 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); | 54 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); |
2772 | 54 | }; | 55 | }; |
2773 | 55 | 56 | ||
2774 | 56 | 57 | ||
2775 | === modified file 'tests/integration-tests/graphics/gbm/test_buffer_integration.cpp' | |||
2776 | --- tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-07-11 16:54:41 +0000 | |||
2777 | +++ tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-07-17 14:20:33 +0000 | |||
2778 | @@ -20,7 +20,7 @@ | |||
2779 | 20 | #include "src/server/graphics/gbm/gbm_display.h" | 20 | #include "src/server/graphics/gbm/gbm_display.h" |
2780 | 21 | #include "src/server/graphics/gbm/gbm_buffer_allocator.h" | 21 | #include "src/server/graphics/gbm/gbm_buffer_allocator.h" |
2781 | 22 | #include "mir/compositor/buffer_basic.h" | 22 | #include "mir/compositor/buffer_basic.h" |
2783 | 23 | #include "mir/compositor/buffer_id.h" | 23 | #include "mir/graphics/buffer_id.h" |
2784 | 24 | #include "mir/compositor/buffer_properties.h" | 24 | #include "mir/compositor/buffer_properties.h" |
2785 | 25 | #include "mir/graphics/buffer_initializer.h" | 25 | #include "mir/graphics/buffer_initializer.h" |
2786 | 26 | #include "mir_test_doubles/stub_buffer.h" | 26 | #include "mir_test_doubles/stub_buffer.h" |
2787 | @@ -72,9 +72,9 @@ | |||
2788 | 72 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator | 72 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator |
2789 | 73 | { | 73 | { |
2790 | 74 | public: | 74 | public: |
2792 | 75 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) | 75 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&) |
2793 | 76 | { | 76 | { |
2795 | 77 | return std::shared_ptr<mc::Buffer>(new StubBufferThread()); | 77 | return std::shared_ptr<mg::Buffer>(new StubBufferThread()); |
2796 | 78 | } | 78 | } |
2797 | 79 | 79 | ||
2798 | 80 | std::vector<geom::PixelFormat> supported_pixel_formats() | 80 | std::vector<geom::PixelFormat> supported_pixel_formats() |
2799 | @@ -139,13 +139,13 @@ | |||
2800 | 139 | } | 139 | } |
2801 | 140 | 140 | ||
2802 | 141 | std::shared_ptr<mc::GraphicBufferAllocator> allocator; | 141 | std::shared_ptr<mc::GraphicBufferAllocator> allocator; |
2804 | 142 | std::shared_ptr<mc::Buffer> buffer; | 142 | std::shared_ptr<mg::Buffer> buffer; |
2805 | 143 | mc::BufferProperties buffer_properties; | 143 | mc::BufferProperties buffer_properties; |
2806 | 144 | }; | 144 | }; |
2807 | 145 | 145 | ||
2808 | 146 | struct BufferDestructorThread | 146 | struct BufferDestructorThread |
2809 | 147 | { | 147 | { |
2811 | 148 | BufferDestructorThread(std::shared_ptr<mc::Buffer> buffer) | 148 | BufferDestructorThread(std::shared_ptr<mg::Buffer> buffer) |
2812 | 149 | : buffer{std::move(buffer)} | 149 | : buffer{std::move(buffer)} |
2813 | 150 | { | 150 | { |
2814 | 151 | } | 151 | } |
2815 | @@ -157,12 +157,12 @@ | |||
2816 | 157 | ASSERT_EQ(EGL_SUCCESS, eglGetError()); | 157 | ASSERT_EQ(EGL_SUCCESS, eglGetError()); |
2817 | 158 | } | 158 | } |
2818 | 159 | 159 | ||
2820 | 160 | std::shared_ptr<mc::Buffer> buffer; | 160 | std::shared_ptr<mg::Buffer> buffer; |
2821 | 161 | }; | 161 | }; |
2822 | 162 | 162 | ||
2823 | 163 | struct BufferTextureInstantiatorThread | 163 | struct BufferTextureInstantiatorThread |
2824 | 164 | { | 164 | { |
2826 | 165 | BufferTextureInstantiatorThread(const std::shared_ptr<mc::Buffer>& buffer) | 165 | BufferTextureInstantiatorThread(const std::shared_ptr<mg::Buffer>& buffer) |
2827 | 166 | : buffer(buffer), exception_thrown(false) | 166 | : buffer(buffer), exception_thrown(false) |
2828 | 167 | { | 167 | { |
2829 | 168 | } | 168 | } |
2830 | @@ -183,7 +183,7 @@ | |||
2831 | 183 | ASSERT_NE(EGL_SUCCESS, eglGetError()); | 183 | ASSERT_NE(EGL_SUCCESS, eglGetError()); |
2832 | 184 | } | 184 | } |
2833 | 185 | 185 | ||
2835 | 186 | const std::shared_ptr<mc::Buffer>& buffer; | 186 | const std::shared_ptr<mg::Buffer>& buffer; |
2836 | 187 | bool exception_thrown; | 187 | bool exception_thrown; |
2837 | 188 | }; | 188 | }; |
2838 | 189 | 189 | ||
2839 | 190 | 190 | ||
2840 | === modified file 'tests/integration-tests/shell/test_session.cpp' | |||
2841 | --- tests/integration-tests/shell/test_session.cpp 2013-07-12 20:18:19 +0000 | |||
2842 | +++ tests/integration-tests/shell/test_session.cpp 2013-07-17 14:20:33 +0000 | |||
2843 | @@ -21,7 +21,7 @@ | |||
2844 | 21 | #include "mir/compositor/graphic_buffer_allocator.h" | 21 | #include "mir/compositor/graphic_buffer_allocator.h" |
2845 | 22 | #include "mir/compositor/compositor.h" | 22 | #include "mir/compositor/compositor.h" |
2846 | 23 | #include "mir/shell/application_session.h" | 23 | #include "mir/shell/application_session.h" |
2848 | 24 | #include "mir/shell/pixel_buffer.h" | 24 | #include "mir/graphics/pixel_buffer.h" |
2849 | 25 | #include "mir/shell/placement_strategy.h" | 25 | #include "mir/shell/placement_strategy.h" |
2850 | 26 | #include "mir/shell/surface.h" | 26 | #include "mir/shell/surface.h" |
2851 | 27 | #include "mir/shell/surface_creation_parameters.h" | 27 | #include "mir/shell/surface_creation_parameters.h" |
2852 | @@ -73,7 +73,7 @@ | |||
2853 | 73 | { | 73 | { |
2854 | 74 | struct StubBufferAllocator : public mc::GraphicBufferAllocator | 74 | struct StubBufferAllocator : public mc::GraphicBufferAllocator |
2855 | 75 | { | 75 | { |
2857 | 76 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const& buffer_properties) | 76 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const& buffer_properties) |
2858 | 77 | { | 77 | { |
2859 | 78 | return std::make_shared<mtd::StubBuffer>(buffer_properties); | 78 | return std::make_shared<mtd::StubBuffer>(buffer_properties); |
2860 | 79 | } | 79 | } |
2861 | @@ -106,11 +106,11 @@ | |||
2862 | 106 | } | 106 | } |
2863 | 107 | 107 | ||
2864 | 108 | 108 | ||
2866 | 109 | std::shared_ptr<msh::PixelBuffer> the_shell_pixel_buffer() override | 109 | std::shared_ptr<mg::PixelBuffer> the_shell_pixel_buffer() override |
2867 | 110 | { | 110 | { |
2869 | 111 | struct StubPixelBuffer : public msh::PixelBuffer | 111 | struct StubPixelBuffer : public mg::PixelBuffer |
2870 | 112 | { | 112 | { |
2872 | 113 | void fill_from(mc::Buffer&) {} | 113 | void fill_from(mg::Buffer&) {} |
2873 | 114 | void const* as_argb_8888() { return nullptr; } | 114 | void const* as_argb_8888() { return nullptr; } |
2874 | 115 | geom::Size size() const { return geom::Size(); } | 115 | geom::Size size() const { return geom::Size(); } |
2875 | 116 | geom::Stride stride() const { return geom::Stride(); } | 116 | geom::Stride stride() const { return geom::Stride(); } |
2876 | 117 | 117 | ||
2877 | === modified file 'tests/integration-tests/test_display_info.cpp' | |||
2878 | --- tests/integration-tests/test_display_info.cpp 2013-07-11 16:54:41 +0000 | |||
2879 | +++ tests/integration-tests/test_display_info.cpp 2013-07-17 14:20:33 +0000 | |||
2880 | @@ -17,7 +17,7 @@ | |||
2881 | 17 | */ | 17 | */ |
2882 | 18 | 18 | ||
2883 | 19 | #include "mir/graphics/display.h" | 19 | #include "mir/graphics/display.h" |
2885 | 20 | #include "mir/compositor/buffer.h" | 20 | #include "mir/graphics/buffer.h" |
2886 | 21 | #include "mir/compositor/graphic_buffer_allocator.h" | 21 | #include "mir/compositor/graphic_buffer_allocator.h" |
2887 | 22 | 22 | ||
2888 | 23 | #include "mir_test_framework/display_server_test_fixture.h" | 23 | #include "mir_test_framework/display_server_test_fixture.h" |
2889 | @@ -65,9 +65,9 @@ | |||
2890 | 65 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator | 65 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator |
2891 | 66 | { | 66 | { |
2892 | 67 | public: | 67 | public: |
2894 | 68 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) | 68 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&) |
2895 | 69 | { | 69 | { |
2897 | 70 | return std::shared_ptr<mc::Buffer>(new mtd::StubBuffer()); | 70 | return std::shared_ptr<mg::Buffer>(new mtd::StubBuffer()); |
2898 | 71 | } | 71 | } |
2899 | 72 | 72 | ||
2900 | 73 | std::vector<geom::PixelFormat> supported_pixel_formats() | 73 | std::vector<geom::PixelFormat> supported_pixel_formats() |
2901 | 74 | 74 | ||
2902 | === modified file 'tests/integration-tests/test_drm_auth_magic.cpp' | |||
2903 | --- tests/integration-tests/test_drm_auth_magic.cpp 2013-06-20 08:27:10 +0000 | |||
2904 | +++ tests/integration-tests/test_drm_auth_magic.cpp 2013-07-17 14:20:33 +0000 | |||
2905 | @@ -48,9 +48,9 @@ | |||
2906 | 48 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator | 48 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator |
2907 | 49 | { | 49 | { |
2908 | 50 | public: | 50 | public: |
2910 | 51 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) | 51 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&) |
2911 | 52 | { | 52 | { |
2913 | 53 | return std::shared_ptr<mc::Buffer>(new mtd::StubBuffer()); | 53 | return std::shared_ptr<mg::Buffer>(new mtd::StubBuffer()); |
2914 | 54 | } | 54 | } |
2915 | 55 | 55 | ||
2916 | 56 | std::vector<geom::PixelFormat> supported_pixel_formats() | 56 | std::vector<geom::PixelFormat> supported_pixel_formats() |
2917 | 57 | 57 | ||
2918 | === modified file 'tests/integration-tests/test_surfaceloop.cpp' | |||
2919 | --- tests/integration-tests/test_surfaceloop.cpp 2013-07-11 16:54:41 +0000 | |||
2920 | +++ tests/integration-tests/test_surfaceloop.cpp 2013-07-17 14:20:33 +0000 | |||
2921 | @@ -21,7 +21,7 @@ | |||
2922 | 21 | #include "src/server/compositor/switching_bundle.h" | 21 | #include "src/server/compositor/switching_bundle.h" |
2923 | 22 | #include "mir/compositor/buffer_swapper_multi.h" | 22 | #include "mir/compositor/buffer_swapper_multi.h" |
2924 | 23 | #include "mir/compositor/buffer_properties.h" | 23 | #include "mir/compositor/buffer_properties.h" |
2926 | 24 | #include "mir/compositor/buffer_id.h" | 24 | #include "mir/graphics/buffer_id.h" |
2927 | 25 | #include "mir/compositor/buffer_basic.h" | 25 | #include "mir/compositor/buffer_basic.h" |
2928 | 26 | #include "mir/graphics/display.h" | 26 | #include "mir/graphics/display.h" |
2929 | 27 | 27 | ||
2930 | @@ -68,7 +68,7 @@ | |||
2931 | 68 | 68 | ||
2932 | 69 | MOCK_METHOD1( | 69 | MOCK_METHOD1( |
2933 | 70 | alloc_buffer, | 70 | alloc_buffer, |
2935 | 71 | std::shared_ptr<mc::Buffer> (mc::BufferProperties const&)); | 71 | std::shared_ptr<mg::Buffer> (mc::BufferProperties const&)); |
2936 | 72 | 72 | ||
2937 | 73 | 73 | ||
2938 | 74 | std::vector<geom::PixelFormat> supported_pixel_formats() | 74 | std::vector<geom::PixelFormat> supported_pixel_formats() |
2939 | @@ -76,9 +76,9 @@ | |||
2940 | 76 | return std::vector<geom::PixelFormat>(); | 76 | return std::vector<geom::PixelFormat>(); |
2941 | 77 | } | 77 | } |
2942 | 78 | 78 | ||
2944 | 79 | std::unique_ptr<mc::Buffer> on_create_swapper(mc::BufferProperties const&) | 79 | std::unique_ptr<mg::Buffer> on_create_swapper(mc::BufferProperties const&) |
2945 | 80 | { | 80 | { |
2947 | 81 | return std::unique_ptr<mc::Buffer>(new mtd::StubBuffer(::buffer_properties)); | 81 | return std::unique_ptr<mg::Buffer>(new mtd::StubBuffer(::buffer_properties)); |
2948 | 82 | } | 82 | } |
2949 | 83 | 83 | ||
2950 | 84 | ~MockGraphicBufferAllocator() noexcept {} | 84 | ~MockGraphicBufferAllocator() noexcept {} |
2951 | @@ -235,7 +235,7 @@ | |||
2952 | 235 | actual = requested; | 235 | actual = requested; |
2953 | 236 | auto stub_buffer_a = std::make_shared<mtd::StubBuffer>(::buffer_properties); | 236 | auto stub_buffer_a = std::make_shared<mtd::StubBuffer>(::buffer_properties); |
2954 | 237 | auto stub_buffer_b = std::make_shared<mtd::StubBuffer>(::buffer_properties); | 237 | auto stub_buffer_b = std::make_shared<mtd::StubBuffer>(::buffer_properties); |
2956 | 238 | std::vector<std::shared_ptr<mc::Buffer>> list = {stub_buffer_a, stub_buffer_b}; | 238 | std::vector<std::shared_ptr<mg::Buffer>> list = {stub_buffer_a, stub_buffer_b}; |
2957 | 239 | return std::make_shared<mc::BufferSwapperMulti>(list, list.size()); | 239 | return std::make_shared<mc::BufferSwapperMulti>(list, list.size()); |
2958 | 240 | } | 240 | } |
2959 | 241 | 241 | ||
2960 | @@ -416,10 +416,10 @@ | |||
2961 | 416 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator | 416 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator |
2962 | 417 | { | 417 | { |
2963 | 418 | public: | 418 | public: |
2965 | 419 | virtual std::shared_ptr<mc::Buffer> alloc_buffer( | 419 | virtual std::shared_ptr<mg::Buffer> alloc_buffer( |
2966 | 420 | mc::BufferProperties const&) | 420 | mc::BufferProperties const&) |
2967 | 421 | { | 421 | { |
2969 | 422 | return std::unique_ptr<mc::Buffer>(new CountingStubBuffer()); | 422 | return std::unique_ptr<mg::Buffer>(new CountingStubBuffer()); |
2970 | 423 | } | 423 | } |
2971 | 424 | 424 | ||
2972 | 425 | std::vector<geom::PixelFormat> supported_pixel_formats() | 425 | std::vector<geom::PixelFormat> supported_pixel_formats() |
2973 | 426 | 426 | ||
2974 | === modified file 'tests/integration-tests/test_swapinterval.cpp' | |||
2975 | --- tests/integration-tests/test_swapinterval.cpp 2013-07-09 21:59:01 +0000 | |||
2976 | +++ tests/integration-tests/test_swapinterval.cpp 2013-07-17 14:20:33 +0000 | |||
2977 | @@ -56,8 +56,8 @@ | |||
2978 | 56 | { | 56 | { |
2979 | 57 | } | 57 | } |
2980 | 58 | 58 | ||
2983 | 59 | std::shared_ptr<mc::Buffer> secure_client_buffer() { return std::make_shared<mtd::StubBuffer>(); } | 59 | std::shared_ptr<mg::Buffer> secure_client_buffer() { return std::make_shared<mtd::StubBuffer>(); } |
2984 | 60 | std::shared_ptr<mc::Buffer> lock_back_buffer() { return std::make_shared<mtd::StubBuffer>(); } | 60 | std::shared_ptr<mg::Buffer> lock_back_buffer() { return std::make_shared<mtd::StubBuffer>(); } |
2985 | 61 | geom::PixelFormat get_stream_pixel_format() { return geom::PixelFormat::abgr_8888; } | 61 | geom::PixelFormat get_stream_pixel_format() { return geom::PixelFormat::abgr_8888; } |
2986 | 62 | geom::Size stream_size() { return geom::Size{}; } | 62 | geom::Size stream_size() { return geom::Size{}; } |
2987 | 63 | void force_requests_to_complete() {} | 63 | void force_requests_to_complete() {} |
2988 | 64 | 64 | ||
2989 | === modified file 'tests/mir_test_framework/testing_server_options.cpp' | |||
2990 | --- tests/mir_test_framework/testing_server_options.cpp 2013-07-12 21:48:58 +0000 | |||
2991 | +++ tests/mir_test_framework/testing_server_options.cpp 2013-07-17 14:20:33 +0000 | |||
2992 | @@ -54,9 +54,9 @@ | |||
2993 | 54 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator | 54 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator |
2994 | 55 | { | 55 | { |
2995 | 56 | public: | 56 | public: |
2997 | 57 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const& properties) | 57 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const& properties) |
2998 | 58 | { | 58 | { |
3000 | 59 | return std::unique_ptr<mc::Buffer>(new mtd::StubBuffer(properties)); | 59 | return std::unique_ptr<mg::Buffer>(new mtd::StubBuffer(properties)); |
3001 | 60 | } | 60 | } |
3002 | 61 | 61 | ||
3003 | 62 | std::vector<geom::PixelFormat> supported_pixel_formats() | 62 | std::vector<geom::PixelFormat> supported_pixel_formats() |
3004 | 63 | 63 | ||
3005 | === modified file 'tests/unit-tests/compositor/test_buffer_id.cpp' | |||
3006 | --- tests/unit-tests/compositor/test_buffer_id.cpp 2013-04-24 05:22:20 +0000 | |||
3007 | +++ tests/unit-tests/compositor/test_buffer_id.cpp 2013-07-17 14:20:33 +0000 | |||
3008 | @@ -16,18 +16,19 @@ | |||
3009 | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> | 16 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
3010 | 17 | */ | 17 | */ |
3011 | 18 | 18 | ||
3013 | 19 | #include "mir/compositor/buffer_id.h" | 19 | #include "mir/graphics/buffer_id.h" |
3014 | 20 | #include "mir_test_doubles/stub_buffer.h" | 20 | #include "mir_test_doubles/stub_buffer.h" |
3015 | 21 | 21 | ||
3016 | 22 | #include <gmock/gmock.h> | 22 | #include <gmock/gmock.h> |
3017 | 23 | #include <gtest/gtest.h> | 23 | #include <gtest/gtest.h> |
3018 | 24 | 24 | ||
3019 | 25 | namespace mc=mir::compositor; | 25 | namespace mc=mir::compositor; |
3020 | 26 | namespace mg = mir::graphics; | ||
3021 | 26 | 27 | ||
3022 | 27 | TEST(buffer_id, value_set ) | 28 | TEST(buffer_id, value_set ) |
3023 | 28 | { | 29 | { |
3024 | 29 | unsigned int id_as_int = 44; | 30 | unsigned int id_as_int = 44; |
3026 | 30 | mc::BufferID id{id_as_int}; | 31 | mg::BufferID id{id_as_int}; |
3027 | 31 | EXPECT_EQ(id_as_int, id.as_uint32_t()); | 32 | EXPECT_EQ(id_as_int, id.as_uint32_t()); |
3028 | 32 | } | 33 | } |
3029 | 33 | 34 | ||
3030 | @@ -36,8 +37,8 @@ | |||
3031 | 36 | unsigned int id_as_int0 = 44; | 37 | unsigned int id_as_int0 = 44; |
3032 | 37 | unsigned int id_as_int1 = 41; | 38 | unsigned int id_as_int1 = 41; |
3033 | 38 | 39 | ||
3036 | 39 | mc::BufferID id0{id_as_int0}; | 40 | mg::BufferID id0{id_as_int0}; |
3037 | 40 | mc::BufferID id1{id_as_int1}; | 41 | mg::BufferID id1{id_as_int1}; |
3038 | 41 | 42 | ||
3039 | 42 | EXPECT_EQ(id0, id0); | 43 | EXPECT_EQ(id0, id0); |
3040 | 43 | EXPECT_EQ(id1, id1); | 44 | EXPECT_EQ(id1, id1); |
3041 | @@ -50,8 +51,8 @@ | |||
3042 | 50 | unsigned int id_as_int0 = 44; | 51 | unsigned int id_as_int0 = 44; |
3043 | 51 | unsigned int id_as_int1 = 41; | 52 | unsigned int id_as_int1 = 41; |
3044 | 52 | 53 | ||
3047 | 53 | mc::BufferID id0{id_as_int0}; | 54 | mg::BufferID id0{id_as_int0}; |
3048 | 54 | mc::BufferID id1{id_as_int1}; | 55 | mg::BufferID id1{id_as_int1}; |
3049 | 55 | 56 | ||
3050 | 56 | EXPECT_LT(id1, id0); | 57 | EXPECT_LT(id1, id0); |
3051 | 57 | } | 58 | } |
3052 | @@ -60,14 +61,14 @@ | |||
3053 | 60 | { | 61 | { |
3054 | 61 | using mir::test::doubles::StubBuffer; | 62 | using mir::test::doubles::StubBuffer; |
3055 | 62 | int const ids = 542; | 63 | int const ids = 542; |
3057 | 63 | std::vector<mc::BufferID> generated_ids; | 64 | std::vector<mg::BufferID> generated_ids; |
3058 | 64 | 65 | ||
3059 | 65 | for (auto i=0; i < ids; i++) | 66 | for (auto i=0; i < ids; i++) |
3060 | 66 | generated_ids.push_back(StubBuffer().id()); | 67 | generated_ids.push_back(StubBuffer().id()); |
3061 | 67 | 68 | ||
3062 | 68 | while (!generated_ids.empty()) | 69 | while (!generated_ids.empty()) |
3063 | 69 | { | 70 | { |
3065 | 70 | mc::BufferID test_id = generated_ids.back(); | 71 | mg::BufferID test_id = generated_ids.back(); |
3066 | 71 | 72 | ||
3067 | 72 | generated_ids.pop_back(); | 73 | generated_ids.pop_back(); |
3068 | 73 | 74 | ||
3069 | 74 | 75 | ||
3070 | === modified file 'tests/unit-tests/compositor/test_buffer_swapper.cpp' | |||
3071 | --- tests/unit-tests/compositor/test_buffer_swapper.cpp 2013-06-12 16:15:05 +0000 | |||
3072 | +++ tests/unit-tests/compositor/test_buffer_swapper.cpp 2013-07-17 14:20:33 +0000 | |||
3073 | @@ -22,6 +22,7 @@ | |||
3074 | 22 | #include <gtest/gtest.h> | 22 | #include <gtest/gtest.h> |
3075 | 23 | 23 | ||
3076 | 24 | namespace mc = mir::compositor; | 24 | namespace mc = mir::compositor; |
3077 | 25 | namespace mg = mir::graphics; | ||
3078 | 25 | namespace geom = mir::geometry; | 26 | namespace geom = mir::geometry; |
3079 | 26 | namespace mtd = mir::test::doubles; | 27 | namespace mtd = mir::test::doubles; |
3080 | 27 | 28 | ||
3081 | @@ -34,14 +35,14 @@ | |||
3082 | 34 | buffer_c = std::make_shared<mtd::StubBuffer>(); | 35 | buffer_c = std::make_shared<mtd::StubBuffer>(); |
3083 | 35 | } | 36 | } |
3084 | 36 | 37 | ||
3088 | 37 | std::shared_ptr<mc::Buffer> buffer_a; | 38 | std::shared_ptr<mg::Buffer> buffer_a; |
3089 | 38 | std::shared_ptr<mc::Buffer> buffer_b; | 39 | std::shared_ptr<mg::Buffer> buffer_b; |
3090 | 39 | std::shared_ptr<mc::Buffer> buffer_c; | 40 | std::shared_ptr<mg::Buffer> buffer_c; |
3091 | 40 | }; | 41 | }; |
3092 | 41 | 42 | ||
3093 | 42 | TEST_F(BufferSwapperConstruction, basic_double_construction_vector) | 43 | TEST_F(BufferSwapperConstruction, basic_double_construction_vector) |
3094 | 43 | { | 44 | { |
3096 | 44 | std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; | 45 | std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; |
3097 | 45 | 46 | ||
3098 | 46 | auto use_count_before_a = buffer_a.use_count(); | 47 | auto use_count_before_a = buffer_a.use_count(); |
3099 | 47 | auto use_count_before_b = buffer_b.use_count(); | 48 | auto use_count_before_b = buffer_b.use_count(); |
3100 | @@ -56,7 +57,7 @@ | |||
3101 | 56 | 57 | ||
3102 | 57 | TEST_F(BufferSwapperConstruction, basic_double_construction_initializer) | 58 | TEST_F(BufferSwapperConstruction, basic_double_construction_initializer) |
3103 | 58 | { | 59 | { |
3105 | 59 | std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b}; | 60 | std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b}; |
3106 | 60 | 61 | ||
3107 | 61 | auto use_count_before_a = buffer_a.use_count(); | 62 | auto use_count_before_a = buffer_a.use_count(); |
3108 | 62 | auto use_count_before_b = buffer_b.use_count(); | 63 | auto use_count_before_b = buffer_b.use_count(); |
3109 | @@ -72,7 +73,7 @@ | |||
3110 | 72 | 73 | ||
3111 | 73 | TEST_F(BufferSwapperConstruction, basic_triple_construction_initializer) | 74 | TEST_F(BufferSwapperConstruction, basic_triple_construction_initializer) |
3112 | 74 | { | 75 | { |
3114 | 75 | std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; | 76 | std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; |
3115 | 76 | auto use_count_before_a = buffer_a.use_count(); | 77 | auto use_count_before_a = buffer_a.use_count(); |
3116 | 77 | auto use_count_before_b = buffer_b.use_count(); | 78 | auto use_count_before_b = buffer_b.use_count(); |
3117 | 78 | auto use_count_before_c = buffer_c.use_count(); | 79 | auto use_count_before_c = buffer_c.use_count(); |
3118 | @@ -88,7 +89,7 @@ | |||
3119 | 88 | 89 | ||
3120 | 89 | TEST_F(BufferSwapperConstruction, buffers_out_come_from_init_double) | 90 | TEST_F(BufferSwapperConstruction, buffers_out_come_from_init_double) |
3121 | 90 | { | 91 | { |
3123 | 91 | std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b}; | 92 | std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b}; |
3124 | 92 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); | 93 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); |
3125 | 93 | 94 | ||
3126 | 94 | auto buffer_1 = swapper.compositor_acquire(); | 95 | auto buffer_1 = swapper.compositor_acquire(); |
3127 | @@ -101,7 +102,7 @@ | |||
3128 | 101 | 102 | ||
3129 | 102 | TEST_F(BufferSwapperConstruction, buffers_out_come_from_init_triple) | 103 | TEST_F(BufferSwapperConstruction, buffers_out_come_from_init_triple) |
3130 | 103 | { | 104 | { |
3132 | 104 | std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; | 105 | std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; |
3133 | 105 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); | 106 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); |
3134 | 106 | 107 | ||
3135 | 107 | auto buffer_1 = swapper.compositor_acquire(); | 108 | auto buffer_1 = swapper.compositor_acquire(); |
3136 | @@ -118,11 +119,11 @@ | |||
3137 | 118 | 119 | ||
3138 | 119 | TEST_F(BufferSwapperConstruction, buffer_transfer_triple_all_owned) | 120 | TEST_F(BufferSwapperConstruction, buffer_transfer_triple_all_owned) |
3139 | 120 | { | 121 | { |
3141 | 121 | std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; | 122 | std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; |
3142 | 122 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); | 123 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); |
3143 | 123 | 124 | ||
3144 | 124 | size_t test_size; | 125 | size_t test_size; |
3146 | 125 | std::vector<std::shared_ptr<mc::Buffer>> list; | 126 | std::vector<std::shared_ptr<mg::Buffer>> list; |
3147 | 126 | swapper.end_responsibility(list, test_size); | 127 | swapper.end_responsibility(list, test_size); |
3148 | 127 | 128 | ||
3149 | 128 | auto res1 = std::find(list.begin(), list.end(), buffer_a); | 129 | auto res1 = std::find(list.begin(), list.end(), buffer_a); |
3150 | @@ -138,13 +139,13 @@ | |||
3151 | 138 | 139 | ||
3152 | 139 | TEST_F(BufferSwapperConstruction, buffer_transfer_triple_some_not_owned) | 140 | TEST_F(BufferSwapperConstruction, buffer_transfer_triple_some_not_owned) |
3153 | 140 | { | 141 | { |
3155 | 141 | std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; | 142 | std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c}; |
3156 | 142 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); | 143 | mc::BufferSwapperMulti swapper(buffers, buffers.size()); |
3157 | 143 | 144 | ||
3158 | 144 | auto acquired_buffer = swapper.client_acquire(); | 145 | auto acquired_buffer = swapper.client_acquire(); |
3159 | 145 | 146 | ||
3160 | 146 | size_t test_size; | 147 | size_t test_size; |
3162 | 147 | std::vector<std::shared_ptr<mc::Buffer>> list; | 148 | std::vector<std::shared_ptr<mg::Buffer>> list; |
3163 | 148 | swapper.end_responsibility(list, test_size); | 149 | swapper.end_responsibility(list, test_size); |
3164 | 149 | 150 | ||
3165 | 150 | auto res1 = std::find(list.begin(), list.end(), acquired_buffer); | 151 | auto res1 = std::find(list.begin(), list.end(), acquired_buffer); |
3166 | 151 | 152 | ||
3167 | === modified file 'tests/unit-tests/compositor/test_buffer_swapper_double.cpp' | |||
3168 | --- tests/unit-tests/compositor/test_buffer_swapper_double.cpp 2013-06-15 11:09:16 +0000 | |||
3169 | +++ tests/unit-tests/compositor/test_buffer_swapper_double.cpp 2013-07-17 14:20:33 +0000 | |||
3170 | @@ -20,7 +20,7 @@ | |||
3171 | 20 | #include "mir_test_doubles/stub_buffer.h" | 20 | #include "mir_test_doubles/stub_buffer.h" |
3172 | 21 | 21 | ||
3173 | 22 | #include "mir/compositor/buffer_swapper_multi.h" | 22 | #include "mir/compositor/buffer_swapper_multi.h" |
3175 | 23 | #include "mir/compositor/buffer_id.h" | 23 | #include "mir/graphics/buffer_id.h" |
3176 | 24 | 24 | ||
3177 | 25 | #include <gmock/gmock.h> | 25 | #include <gmock/gmock.h> |
3178 | 26 | #include <gtest/gtest.h> | 26 | #include <gtest/gtest.h> |
3179 | @@ -29,6 +29,7 @@ | |||
3180 | 29 | #include <thread> | 29 | #include <thread> |
3181 | 30 | 30 | ||
3182 | 31 | namespace mc = mir::compositor; | 31 | namespace mc = mir::compositor; |
3183 | 32 | namespace mg = mir::graphics; | ||
3184 | 32 | namespace geom = mir::geometry; | 33 | namespace geom = mir::geometry; |
3185 | 33 | namespace mtd = mir::test::doubles; | 34 | namespace mtd = mir::test::doubles; |
3186 | 34 | 35 | ||
3187 | @@ -41,13 +42,13 @@ | |||
3188 | 41 | buffer_a = std::make_shared<mtd::StubBuffer>(); | 42 | buffer_a = std::make_shared<mtd::StubBuffer>(); |
3189 | 42 | buffer_b = std::make_shared<mtd::StubBuffer>(); | 43 | buffer_b = std::make_shared<mtd::StubBuffer>(); |
3190 | 43 | 44 | ||
3192 | 44 | auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b}; | 45 | auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b}; |
3193 | 45 | swapper = std::make_shared<mc::BufferSwapperMulti>(double_list, double_list.size()); | 46 | swapper = std::make_shared<mc::BufferSwapperMulti>(double_list, double_list.size()); |
3194 | 46 | 47 | ||
3195 | 47 | } | 48 | } |
3196 | 48 | 49 | ||
3199 | 49 | std::shared_ptr<mc::Buffer> buffer_a; | 50 | std::shared_ptr<mg::Buffer> buffer_a; |
3200 | 50 | std::shared_ptr<mc::Buffer> buffer_b; | 51 | std::shared_ptr<mg::Buffer> buffer_b; |
3201 | 51 | 52 | ||
3202 | 52 | std::shared_ptr<mc::BufferSwapper> swapper; | 53 | std::shared_ptr<mc::BufferSwapper> swapper; |
3203 | 53 | }; | 54 | }; |
3204 | 54 | 55 | ||
3205 | === modified file 'tests/unit-tests/compositor/test_buffer_swapper_spin_triple.cpp' | |||
3206 | --- tests/unit-tests/compositor/test_buffer_swapper_spin_triple.cpp 2013-05-29 23:55:41 +0000 | |||
3207 | +++ tests/unit-tests/compositor/test_buffer_swapper_spin_triple.cpp 2013-07-17 14:20:33 +0000 | |||
3208 | @@ -26,6 +26,7 @@ | |||
3209 | 26 | #include <algorithm> | 26 | #include <algorithm> |
3210 | 27 | 27 | ||
3211 | 28 | namespace mc = mir::compositor; | 28 | namespace mc = mir::compositor; |
3212 | 29 | namespace mg = mir::graphics; | ||
3213 | 29 | namespace mtd = mir::test::doubles; | 30 | namespace mtd = mir::test::doubles; |
3214 | 30 | 31 | ||
3215 | 31 | namespace | 32 | namespace |
3216 | @@ -38,13 +39,13 @@ | |||
3217 | 38 | buffer_b{std::make_shared<mtd::StubBuffer>()}, | 39 | buffer_b{std::make_shared<mtd::StubBuffer>()}, |
3218 | 39 | buffer_c{std::make_shared<mtd::StubBuffer>()} | 40 | buffer_c{std::make_shared<mtd::StubBuffer>()} |
3219 | 40 | { | 41 | { |
3221 | 41 | auto list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c}; | 42 | auto list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c}; |
3222 | 42 | swapper = std::make_shared<mc::BufferSwapperSpin>(list, list.size()); | 43 | swapper = std::make_shared<mc::BufferSwapperSpin>(list, list.size()); |
3223 | 43 | } | 44 | } |
3224 | 44 | 45 | ||
3228 | 45 | std::shared_ptr<mc::Buffer> const buffer_a; | 46 | std::shared_ptr<mg::Buffer> const buffer_a; |
3229 | 46 | std::shared_ptr<mc::Buffer> const buffer_b; | 47 | std::shared_ptr<mg::Buffer> const buffer_b; |
3230 | 47 | std::shared_ptr<mc::Buffer> const buffer_c; | 48 | std::shared_ptr<mg::Buffer> const buffer_c; |
3231 | 48 | 49 | ||
3232 | 49 | std::shared_ptr<mc::BufferSwapper> swapper; | 50 | std::shared_ptr<mc::BufferSwapper> swapper; |
3233 | 50 | }; | 51 | }; |
3234 | @@ -53,7 +54,7 @@ | |||
3235 | 53 | 54 | ||
3236 | 54 | TEST_F(BufferSwapperSpinTriple, client_can_always_get_new_buffer) | 55 | TEST_F(BufferSwapperSpinTriple, client_can_always_get_new_buffer) |
3237 | 55 | { | 56 | { |
3239 | 56 | std::vector<std::shared_ptr<mc::Buffer>> expected_buffers; | 57 | std::vector<std::shared_ptr<mg::Buffer>> expected_buffers; |
3240 | 57 | 58 | ||
3241 | 58 | for (unsigned int i = 0; i < 10; i++) | 59 | for (unsigned int i = 0; i < 10; i++) |
3242 | 59 | { | 60 | { |
3243 | @@ -81,7 +82,7 @@ | |||
3244 | 81 | 82 | ||
3245 | 82 | TEST_F(BufferSwapperSpinTriple, client_can_always_get_new_buffer_while_compositor_has_one) | 83 | TEST_F(BufferSwapperSpinTriple, client_can_always_get_new_buffer_while_compositor_has_one) |
3246 | 83 | { | 84 | { |
3248 | 84 | std::vector<std::shared_ptr<mc::Buffer>> expected_buffers; | 85 | std::vector<std::shared_ptr<mg::Buffer>> expected_buffers; |
3249 | 85 | 86 | ||
3250 | 86 | auto comp_buf = swapper->compositor_acquire(); | 87 | auto comp_buf = swapper->compositor_acquire(); |
3251 | 87 | 88 | ||
3252 | @@ -165,7 +166,7 @@ | |||
3253 | 165 | swapper->compositor_release(comp_buf); | 166 | swapper->compositor_release(comp_buf); |
3254 | 166 | 167 | ||
3255 | 167 | /* After the release, the compositor's buffer should be available to the client */ | 168 | /* After the release, the compositor's buffer should be available to the client */ |
3257 | 168 | std::vector<std::shared_ptr<mc::Buffer>> client_buffers; | 169 | std::vector<std::shared_ptr<mg::Buffer>> client_buffers; |
3258 | 169 | 170 | ||
3259 | 170 | for (auto i = 0; i < 3; i++) | 171 | for (auto i = 0; i < 3; i++) |
3260 | 171 | { | 172 | { |
3261 | @@ -182,7 +183,7 @@ | |||
3262 | 182 | TEST_F(BufferSwapperSpinTriple, buffer_transfer_triple_all_owned) | 183 | TEST_F(BufferSwapperSpinTriple, buffer_transfer_triple_all_owned) |
3263 | 183 | { | 184 | { |
3264 | 184 | size_t test_size; | 185 | size_t test_size; |
3266 | 185 | std::vector<std::shared_ptr<mc::Buffer>> list; | 186 | std::vector<std::shared_ptr<mg::Buffer>> list; |
3267 | 186 | swapper->end_responsibility(list, test_size); | 187 | swapper->end_responsibility(list, test_size); |
3268 | 187 | 188 | ||
3269 | 188 | auto res1 = std::find(list.begin(), list.end(), buffer_a); | 189 | auto res1 = std::find(list.begin(), list.end(), buffer_a); |
3270 | @@ -201,7 +202,7 @@ | |||
3271 | 201 | auto acquired_buffer = swapper->client_acquire(); | 202 | auto acquired_buffer = swapper->client_acquire(); |
3272 | 202 | 203 | ||
3273 | 203 | size_t test_size; | 204 | size_t test_size; |
3275 | 204 | std::vector<std::shared_ptr<mc::Buffer>> list; | 205 | std::vector<std::shared_ptr<mg::Buffer>> list; |
3276 | 205 | swapper->end_responsibility(list, test_size); | 206 | swapper->end_responsibility(list, test_size); |
3277 | 206 | 207 | ||
3278 | 207 | auto res1 = std::find(list.begin(), list.end(), acquired_buffer); | 208 | auto res1 = std::find(list.begin(), list.end(), acquired_buffer); |
3279 | 208 | 209 | ||
3280 | === modified file 'tests/unit-tests/compositor/test_buffer_swapper_triple.cpp' | |||
3281 | --- tests/unit-tests/compositor/test_buffer_swapper_triple.cpp 2013-05-29 23:49:32 +0000 | |||
3282 | +++ tests/unit-tests/compositor/test_buffer_swapper_triple.cpp 2013-07-17 14:20:33 +0000 | |||
3283 | @@ -19,12 +19,13 @@ | |||
3284 | 19 | #include "mir_test_doubles/stub_buffer.h" | 19 | #include "mir_test_doubles/stub_buffer.h" |
3285 | 20 | 20 | ||
3286 | 21 | #include "mir/compositor/buffer_swapper_multi.h" | 21 | #include "mir/compositor/buffer_swapper_multi.h" |
3288 | 22 | #include "mir/compositor/buffer_id.h" | 22 | #include "mir/graphics/buffer_id.h" |
3289 | 23 | 23 | ||
3290 | 24 | #include <gmock/gmock.h> | 24 | #include <gmock/gmock.h> |
3291 | 25 | #include <gtest/gtest.h> | 25 | #include <gtest/gtest.h> |
3292 | 26 | 26 | ||
3293 | 27 | namespace mc = mir::compositor; | 27 | namespace mc = mir::compositor; |
3294 | 28 | namespace mg = mir::graphics; | ||
3295 | 28 | namespace geom = mir::geometry; | 29 | namespace geom = mir::geometry; |
3296 | 29 | namespace mtd = mir::test::doubles; | 30 | namespace mtd = mir::test::doubles; |
3297 | 30 | namespace | 31 | namespace |
3298 | @@ -38,14 +39,14 @@ | |||
3299 | 38 | buffer_b = std::make_shared<mtd::StubBuffer>(); | 39 | buffer_b = std::make_shared<mtd::StubBuffer>(); |
3300 | 39 | buffer_c = std::make_shared<mtd::StubBuffer>(); | 40 | buffer_c = std::make_shared<mtd::StubBuffer>(); |
3301 | 40 | 41 | ||
3303 | 41 | auto triple_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c}; | 42 | auto triple_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c}; |
3304 | 42 | swapper = std::make_shared<mc::BufferSwapperMulti>(triple_list, triple_list.size()); | 43 | swapper = std::make_shared<mc::BufferSwapperMulti>(triple_list, triple_list.size()); |
3305 | 43 | 44 | ||
3306 | 44 | } | 45 | } |
3307 | 45 | 46 | ||
3311 | 46 | std::shared_ptr<mc::Buffer> buffer_a; | 47 | std::shared_ptr<mg::Buffer> buffer_a; |
3312 | 47 | std::shared_ptr<mc::Buffer> buffer_b; | 48 | std::shared_ptr<mg::Buffer> buffer_b; |
3313 | 48 | std::shared_ptr<mc::Buffer> buffer_c; | 49 | std::shared_ptr<mg::Buffer> buffer_c; |
3314 | 49 | 50 | ||
3315 | 50 | std::shared_ptr<mc::BufferSwapper> swapper; | 51 | std::shared_ptr<mc::BufferSwapper> swapper; |
3316 | 51 | }; | 52 | }; |
3317 | 52 | 53 | ||
3318 | === modified file 'tests/unit-tests/compositor/test_swapper_factory.cpp' | |||
3319 | --- tests/unit-tests/compositor/test_swapper_factory.cpp 2013-07-11 16:54:41 +0000 | |||
3320 | +++ tests/unit-tests/compositor/test_swapper_factory.cpp 2013-07-17 14:20:33 +0000 | |||
3321 | @@ -28,6 +28,7 @@ | |||
3322 | 28 | #include <gtest/gtest.h> | 28 | #include <gtest/gtest.h> |
3323 | 29 | 29 | ||
3324 | 30 | namespace mc = mir::compositor; | 30 | namespace mc = mir::compositor; |
3325 | 31 | namespace mg = mir::graphics; | ||
3326 | 31 | namespace geom = mir::geometry; | 32 | namespace geom = mir::geometry; |
3327 | 32 | namespace mtd = mir::test::doubles; | 33 | namespace mtd = mir::test::doubles; |
3328 | 33 | 34 | ||
3329 | @@ -46,7 +47,7 @@ | |||
3330 | 46 | ON_CALL(*this, alloc_buffer(_)) | 47 | ON_CALL(*this, alloc_buffer(_)) |
3331 | 47 | .WillByDefault(Return(std::make_shared<mtd::StubBuffer>(properties))); | 48 | .WillByDefault(Return(std::make_shared<mtd::StubBuffer>(properties))); |
3332 | 48 | } | 49 | } |
3334 | 49 | MOCK_METHOD1(alloc_buffer, std::shared_ptr<mc::Buffer>(mc::BufferProperties const&)); | 50 | MOCK_METHOD1(alloc_buffer, std::shared_ptr<mg::Buffer>(mc::BufferProperties const&)); |
3335 | 50 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); | 51 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); |
3336 | 51 | 52 | ||
3337 | 52 | ~MockGraphicBufferAllocator() noexcept {} | 53 | ~MockGraphicBufferAllocator() noexcept {} |
3338 | @@ -148,7 +149,7 @@ | |||
3339 | 148 | using namespace testing; | 149 | using namespace testing; |
3340 | 149 | 150 | ||
3341 | 150 | mc::BufferProperties properties; | 151 | mc::BufferProperties properties; |
3343 | 151 | std::vector<std::shared_ptr<mc::Buffer>> list {}; | 152 | std::vector<std::shared_ptr<mg::Buffer>> list {}; |
3344 | 152 | size_t size = 3; | 153 | size_t size = 3; |
3345 | 153 | 154 | ||
3346 | 154 | EXPECT_CALL(*mock_buffer_allocator, alloc_buffer(properties)) | 155 | EXPECT_CALL(*mock_buffer_allocator, alloc_buffer(properties)) |
3347 | @@ -163,7 +164,7 @@ | |||
3348 | 163 | using namespace testing; | 164 | using namespace testing; |
3349 | 164 | 165 | ||
3350 | 165 | mc::BufferProperties properties; | 166 | mc::BufferProperties properties; |
3352 | 166 | std::vector<std::shared_ptr<mc::Buffer>> list; | 167 | std::vector<std::shared_ptr<mg::Buffer>> list; |
3353 | 167 | size_t size = 3; | 168 | size_t size = 3; |
3354 | 168 | 169 | ||
3355 | 169 | EXPECT_CALL(*mock_buffer_allocator, alloc_buffer(properties)) | 170 | EXPECT_CALL(*mock_buffer_allocator, alloc_buffer(properties)) |
3356 | @@ -182,7 +183,7 @@ | |||
3357 | 182 | auto buffer = std::make_shared<mtd::StubBuffer>(); | 183 | auto buffer = std::make_shared<mtd::StubBuffer>(); |
3358 | 183 | { | 184 | { |
3359 | 184 | size_t size = 3; | 185 | size_t size = 3; |
3361 | 185 | std::vector<std::shared_ptr<mc::Buffer>> list{buffer}; | 186 | std::vector<std::shared_ptr<mg::Buffer>> list{buffer}; |
3362 | 186 | 187 | ||
3363 | 187 | auto swapper = strategy.create_swapper_reuse_buffers( | 188 | auto swapper = strategy.create_swapper_reuse_buffers( |
3364 | 188 | properties, list, size, mc::SwapperType::synchronous); | 189 | properties, list, size, mc::SwapperType::synchronous); |
3365 | @@ -197,7 +198,7 @@ | |||
3366 | 197 | mc::SwapperFactory strategy(mock_buffer_allocator, 2); | 198 | mc::SwapperFactory strategy(mock_buffer_allocator, 2); |
3367 | 198 | 199 | ||
3368 | 199 | size_t size = 3; | 200 | size_t size = 3; |
3370 | 200 | std::vector<std::shared_ptr<mc::Buffer>> list{}; | 201 | std::vector<std::shared_ptr<mg::Buffer>> list{}; |
3371 | 201 | 202 | ||
3372 | 202 | EXPECT_THROW({ | 203 | EXPECT_THROW({ |
3373 | 203 | strategy.create_swapper_reuse_buffers( | 204 | strategy.create_swapper_reuse_buffers( |
3374 | @@ -214,7 +215,7 @@ | |||
3375 | 214 | mc::SwapperFactory strategy(mock_buffer_allocator); | 215 | mc::SwapperFactory strategy(mock_buffer_allocator); |
3376 | 215 | 216 | ||
3377 | 216 | size_t size = 2; | 217 | size_t size = 2; |
3379 | 217 | std::vector<std::shared_ptr<mc::Buffer>> list{}; | 218 | std::vector<std::shared_ptr<mg::Buffer>> list{}; |
3380 | 218 | auto swapper = strategy.create_swapper_reuse_buffers( | 219 | auto swapper = strategy.create_swapper_reuse_buffers( |
3381 | 219 | properties, list, size, mc::SwapperType::framedropping); | 220 | properties, list, size, mc::SwapperType::framedropping); |
3382 | 220 | } | 221 | } |
3383 | 221 | 222 | ||
3384 | === modified file 'tests/unit-tests/compositor/test_switching_bundle.cpp' | |||
3385 | --- tests/unit-tests/compositor/test_switching_bundle.cpp 2013-07-11 16:54:41 +0000 | |||
3386 | +++ tests/unit-tests/compositor/test_switching_bundle.cpp 2013-07-17 14:20:33 +0000 | |||
3387 | @@ -27,6 +27,7 @@ | |||
3388 | 27 | namespace geom=mir::geometry; | 27 | namespace geom=mir::geometry; |
3389 | 28 | namespace mtd=mir::test::doubles; | 28 | namespace mtd=mir::test::doubles; |
3390 | 29 | namespace mc=mir::compositor; | 29 | namespace mc=mir::compositor; |
3391 | 30 | namespace mg = mir::graphics; | ||
3392 | 30 | 31 | ||
3393 | 31 | struct SwitchingBundleTest : public ::testing::Test | 32 | struct SwitchingBundleTest : public ::testing::Test |
3394 | 32 | { | 33 | { |
3395 | @@ -47,7 +48,7 @@ | |||
3396 | 47 | std::shared_ptr<mtd::MockSwapperFactory> mock_swapper_factory; | 48 | std::shared_ptr<mtd::MockSwapperFactory> mock_swapper_factory; |
3397 | 48 | std::shared_ptr<mtd::MockSwapper> mock_default_swapper; | 49 | std::shared_ptr<mtd::MockSwapper> mock_default_swapper; |
3398 | 49 | std::shared_ptr<mtd::MockSwapper> mock_secondary_swapper; | 50 | std::shared_ptr<mtd::MockSwapper> mock_secondary_swapper; |
3400 | 50 | std::shared_ptr<mc::Buffer> stub_buffer; | 51 | std::shared_ptr<mg::Buffer> stub_buffer; |
3401 | 51 | mc::BufferProperties properties; | 52 | mc::BufferProperties properties; |
3402 | 52 | }; | 53 | }; |
3403 | 53 | 54 | ||
3404 | 54 | 55 | ||
3405 | === modified file 'tests/unit-tests/compositor/test_temporary_buffers.cpp' | |||
3406 | --- tests/unit-tests/compositor/test_temporary_buffers.cpp 2013-07-11 16:54:41 +0000 | |||
3407 | +++ tests/unit-tests/compositor/test_temporary_buffers.cpp 2013-07-17 14:20:33 +0000 | |||
3408 | @@ -25,6 +25,7 @@ | |||
3409 | 25 | #include <stdexcept> | 25 | #include <stdexcept> |
3410 | 26 | 26 | ||
3411 | 27 | namespace mtd=mir::test::doubles; | 27 | namespace mtd=mir::test::doubles; |
3412 | 28 | namespace mg = mir::graphics; | ||
3413 | 28 | namespace mc=mir::compositor; | 29 | namespace mc=mir::compositor; |
3414 | 29 | namespace geom=mir::geometry; | 30 | namespace geom=mir::geometry; |
3415 | 30 | 31 | ||
3416 | @@ -33,7 +34,7 @@ | |||
3417 | 33 | class TemporaryTestBuffer : public mc::TemporaryBuffer | 34 | class TemporaryTestBuffer : public mc::TemporaryBuffer |
3418 | 34 | { | 35 | { |
3419 | 35 | public: | 36 | public: |
3421 | 36 | TemporaryTestBuffer(const std::shared_ptr<mc::Buffer>& buf) | 37 | TemporaryTestBuffer(const std::shared_ptr<mg::Buffer>& buf) |
3422 | 37 | : TemporaryBuffer(buf) | 38 | : TemporaryBuffer(buf) |
3423 | 38 | { | 39 | { |
3424 | 39 | } | 40 | } |
3425 | @@ -43,8 +44,8 @@ | |||
3426 | 43 | { | 44 | { |
3427 | 44 | public: | 45 | public: |
3428 | 45 | ~MockBackBufferStrategy() noexcept {} | 46 | ~MockBackBufferStrategy() noexcept {} |
3431 | 46 | MOCK_METHOD0(acquire, std::shared_ptr<mc::Buffer>()); | 47 | MOCK_METHOD0(acquire, std::shared_ptr<mg::Buffer>()); |
3432 | 47 | MOCK_METHOD1(release, void(std::shared_ptr<mc::Buffer> const&)); | 48 | MOCK_METHOD1(release, void(std::shared_ptr<mg::Buffer> const&)); |
3433 | 48 | }; | 49 | }; |
3434 | 49 | 50 | ||
3435 | 50 | class TemporaryBuffersTest : public ::testing::Test | 51 | class TemporaryBuffersTest : public ::testing::Test |
3436 | 51 | 52 | ||
3437 | === modified file 'tests/unit-tests/frontend/test_client_buffer_tracker.cpp' | |||
3438 | --- tests/unit-tests/frontend/test_client_buffer_tracker.cpp 2013-04-24 05:22:20 +0000 | |||
3439 | +++ tests/unit-tests/frontend/test_client_buffer_tracker.cpp 2013-07-17 14:20:33 +0000 | |||
3440 | @@ -17,17 +17,17 @@ | |||
3441 | 17 | */ | 17 | */ |
3442 | 18 | 18 | ||
3443 | 19 | #include "../../src/server/frontend/client_buffer_tracker.h" | 19 | #include "../../src/server/frontend/client_buffer_tracker.h" |
3445 | 20 | #include "mir/compositor/buffer_id.h" | 20 | #include "mir/graphics/buffer_id.h" |
3446 | 21 | 21 | ||
3447 | 22 | #include <gtest/gtest.h> | 22 | #include <gtest/gtest.h> |
3448 | 23 | 23 | ||
3449 | 24 | namespace mf = mir::frontend; | 24 | namespace mf = mir::frontend; |
3451 | 25 | namespace mc = mir::compositor; | 25 | namespace mg = mir::graphics; |
3452 | 26 | 26 | ||
3453 | 27 | TEST(ClientBufferTracker, just_added_buffer_is_known_by_client) | 27 | TEST(ClientBufferTracker, just_added_buffer_is_known_by_client) |
3454 | 28 | { | 28 | { |
3455 | 29 | mf::ClientBufferTracker tracker(3); | 29 | mf::ClientBufferTracker tracker(3); |
3457 | 30 | mc::BufferID const id{5}; | 30 | mg::BufferID const id{5}; |
3458 | 31 | 31 | ||
3459 | 32 | tracker.add(id); | 32 | tracker.add(id); |
3460 | 33 | EXPECT_TRUE(tracker.client_has(id)); | 33 | EXPECT_TRUE(tracker.client_has(id)); |
3461 | @@ -37,17 +37,17 @@ | |||
3462 | 37 | { | 37 | { |
3463 | 38 | mf::ClientBufferTracker tracker(3); | 38 | mf::ClientBufferTracker tracker(3); |
3464 | 39 | 39 | ||
3467 | 40 | tracker.add(mc::BufferID{5}); | 40 | tracker.add(mg::BufferID{5}); |
3468 | 41 | EXPECT_FALSE(tracker.client_has(mc::BufferID{6})); | 41 | EXPECT_FALSE(tracker.client_has(mg::BufferID{6})); |
3469 | 42 | } | 42 | } |
3470 | 43 | 43 | ||
3471 | 44 | TEST(ClientBufferTracker, tracks_sequence_of_buffers) | 44 | TEST(ClientBufferTracker, tracks_sequence_of_buffers) |
3472 | 45 | { | 45 | { |
3473 | 46 | mf::ClientBufferTracker tracker(3); | 46 | mf::ClientBufferTracker tracker(3); |
3478 | 47 | mc::BufferID const one{1}; | 47 | mg::BufferID const one{1}; |
3479 | 48 | mc::BufferID const two{2}; | 48 | mg::BufferID const two{2}; |
3480 | 49 | mc::BufferID const three{3}; | 49 | mg::BufferID const three{3}; |
3481 | 50 | mc::BufferID const four{4}; | 50 | mg::BufferID const four{4}; |
3482 | 51 | 51 | ||
3483 | 52 | tracker.add(one); | 52 | tracker.add(one); |
3484 | 53 | tracker.add(two); | 53 | tracker.add(two); |
3485 | @@ -63,10 +63,10 @@ | |||
3486 | 63 | { | 63 | { |
3487 | 64 | mf::ClientBufferTracker tracker(3); | 64 | mf::ClientBufferTracker tracker(3); |
3488 | 65 | 65 | ||
3493 | 66 | mc::BufferID const one{1}; | 66 | mg::BufferID const one{1}; |
3494 | 67 | mc::BufferID const two{2}; | 67 | mg::BufferID const two{2}; |
3495 | 68 | mc::BufferID const three{3}; | 68 | mg::BufferID const three{3}; |
3496 | 69 | mc::BufferID const four{4}; | 69 | mg::BufferID const four{4}; |
3497 | 70 | 70 | ||
3498 | 71 | tracker.add(one); | 71 | tracker.add(one); |
3499 | 72 | tracker.add(two); | 72 | tracker.add(two); |
3500 | @@ -88,9 +88,9 @@ | |||
3501 | 88 | 88 | ||
3502 | 89 | TEST(ClientBufferTracker, tracks_correct_number_of_buffers) | 89 | TEST(ClientBufferTracker, tracks_correct_number_of_buffers) |
3503 | 90 | { | 90 | { |
3505 | 91 | mc::BufferID ids[10]; | 91 | mg::BufferID ids[10]; |
3506 | 92 | for (unsigned int i = 0; i < 10; ++i) | 92 | for (unsigned int i = 0; i < 10; ++i) |
3508 | 93 | ids[i] = mc::BufferID{i}; | 93 | ids[i] = mg::BufferID{i}; |
3509 | 94 | 94 | ||
3510 | 95 | for (unsigned int tracker_size = 2; tracker_size < 10; ++tracker_size) | 95 | for (unsigned int tracker_size = 2; tracker_size < 10; ++tracker_size) |
3511 | 96 | { | 96 | { |
3512 | 97 | 97 | ||
3513 | === modified file 'tests/unit-tests/frontend/test_session_mediator.cpp' | |||
3514 | --- tests/unit-tests/frontend/test_session_mediator.cpp 2013-07-15 09:29:14 +0000 | |||
3515 | +++ tests/unit-tests/frontend/test_session_mediator.cpp 2013-07-17 14:20:33 +0000 | |||
3516 | @@ -95,9 +95,9 @@ | |||
3517 | 95 | .WillByDefault(testing::Return(std::vector<geom::PixelFormat>())); | 95 | .WillByDefault(testing::Return(std::vector<geom::PixelFormat>())); |
3518 | 96 | } | 96 | } |
3519 | 97 | 97 | ||
3521 | 98 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) | 98 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&) |
3522 | 99 | { | 99 | { |
3524 | 100 | return std::shared_ptr<mc::Buffer>(); | 100 | return std::shared_ptr<mg::Buffer>(); |
3525 | 101 | } | 101 | } |
3526 | 102 | 102 | ||
3527 | 103 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); | 103 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); |
3528 | @@ -125,7 +125,7 @@ | |||
3529 | 125 | MOCK_METHOD0(get_ipc_package, std::shared_ptr<mg::PlatformIPCPackage>()); | 125 | MOCK_METHOD0(get_ipc_package, std::shared_ptr<mg::PlatformIPCPackage>()); |
3530 | 126 | MOCK_METHOD0(create_internal_client, std::shared_ptr<mg::InternalClient>()); | 126 | MOCK_METHOD0(create_internal_client, std::shared_ptr<mg::InternalClient>()); |
3531 | 127 | MOCK_CONST_METHOD2(fill_ipc_package, void(std::shared_ptr<mc::BufferIPCPacker> const&, | 127 | MOCK_CONST_METHOD2(fill_ipc_package, void(std::shared_ptr<mc::BufferIPCPacker> const&, |
3533 | 128 | std::shared_ptr<mc::Buffer> const&)); | 128 | std::shared_ptr<mg::Buffer> const&)); |
3534 | 129 | }; | 129 | }; |
3535 | 130 | 130 | ||
3536 | 131 | class NullEventSink : public mir::events::EventSink | 131 | class NullEventSink : public mir::events::EventSink |
3537 | @@ -377,16 +377,16 @@ | |||
3538 | 377 | 377 | ||
3539 | 378 | { | 378 | { |
3540 | 379 | EXPECT_CALL(*stubbed_session->mock_buffer, id()) | 379 | EXPECT_CALL(*stubbed_session->mock_buffer, id()) |
3545 | 380 | .WillOnce(Return(mc::BufferID{4})) | 380 | .WillOnce(Return(mg::BufferID{4})) |
3546 | 381 | .WillOnce(Return(mc::BufferID{5})) | 381 | .WillOnce(Return(mg::BufferID{5})) |
3547 | 382 | .WillOnce(Return(mc::BufferID{4})) | 382 | .WillOnce(Return(mg::BufferID{4})) |
3548 | 383 | .WillOnce(Return(mc::BufferID{5})); | 383 | .WillOnce(Return(mg::BufferID{5})); |
3549 | 384 | 384 | ||
3550 | 385 | mp::Surface surface_response; | 385 | mp::Surface surface_response; |
3551 | 386 | mp::SurfaceId buffer_request; | 386 | mp::SurfaceId buffer_request; |
3552 | 387 | mp::Buffer buffer_response[3]; | 387 | mp::Buffer buffer_response[3]; |
3553 | 388 | 388 | ||
3555 | 389 | std::shared_ptr<mc::Buffer> tmp_buffer = stubbed_session->mock_buffer; | 389 | std::shared_ptr<mg::Buffer> tmp_buffer = stubbed_session->mock_buffer; |
3556 | 390 | EXPECT_CALL(*graphics_platform, fill_ipc_package(_, tmp_buffer)) | 390 | EXPECT_CALL(*graphics_platform, fill_ipc_package(_, tmp_buffer)) |
3557 | 391 | .Times(2); | 391 | .Times(2); |
3558 | 392 | 392 | ||
3559 | 393 | 393 | ||
3560 | === modified file 'tests/unit-tests/frontend/test_session_mediator_android.cpp' | |||
3561 | --- tests/unit-tests/frontend/test_session_mediator_android.cpp 2013-07-08 21:49:48 +0000 | |||
3562 | +++ tests/unit-tests/frontend/test_session_mediator_android.cpp 2013-07-17 14:20:33 +0000 | |||
3563 | @@ -52,9 +52,9 @@ | |||
3564 | 52 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator | 52 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator |
3565 | 53 | { | 53 | { |
3566 | 54 | public: | 54 | public: |
3568 | 55 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) | 55 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&) |
3569 | 56 | { | 56 | { |
3571 | 57 | return std::shared_ptr<mc::Buffer>(); | 57 | return std::shared_ptr<mg::Buffer>(); |
3572 | 58 | } | 58 | } |
3573 | 59 | 59 | ||
3574 | 60 | virtual std::vector<geom::PixelFormat> supported_pixel_formats() | 60 | virtual std::vector<geom::PixelFormat> supported_pixel_formats() |
3575 | 61 | 61 | ||
3576 | === modified file 'tests/unit-tests/frontend/test_session_mediator_gbm.cpp' | |||
3577 | --- tests/unit-tests/frontend/test_session_mediator_gbm.cpp 2013-07-08 21:49:48 +0000 | |||
3578 | +++ tests/unit-tests/frontend/test_session_mediator_gbm.cpp 2013-07-17 14:20:33 +0000 | |||
3579 | @@ -51,9 +51,9 @@ | |||
3580 | 51 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator | 51 | class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator |
3581 | 52 | { | 52 | { |
3582 | 53 | public: | 53 | public: |
3584 | 54 | std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&) | 54 | std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&) |
3585 | 55 | { | 55 | { |
3587 | 56 | return std::shared_ptr<mc::Buffer>(); | 56 | return std::shared_ptr<mg::Buffer>(); |
3588 | 57 | } | 57 | } |
3589 | 58 | 58 | ||
3590 | 59 | virtual std::vector<geom::PixelFormat> supported_pixel_formats() | 59 | virtual std::vector<geom::PixelFormat> supported_pixel_formats() |
3591 | 60 | 60 | ||
3592 | === modified file 'tests/unit-tests/graphics/android/test_fb_simple_swapper.cpp' | |||
3593 | --- tests/unit-tests/graphics/android/test_fb_simple_swapper.cpp 2013-05-02 00:34:03 +0000 | |||
3594 | +++ tests/unit-tests/graphics/android/test_fb_simple_swapper.cpp 2013-07-17 14:20:33 +0000 | |||
3595 | @@ -26,6 +26,7 @@ | |||
3596 | 26 | #include <gtest/gtest.h> | 26 | #include <gtest/gtest.h> |
3597 | 27 | 27 | ||
3598 | 28 | namespace mc=mir::compositor; | 28 | namespace mc=mir::compositor; |
3599 | 29 | namespace mg=mir::graphics; | ||
3600 | 29 | namespace mga=mir::graphics::android; | 30 | namespace mga=mir::graphics::android; |
3601 | 30 | namespace mtd=mir::test::doubles; | 31 | namespace mtd=mir::test::doubles; |
3602 | 31 | 32 | ||
3603 | @@ -39,14 +40,14 @@ | |||
3604 | 39 | buffer3 = std::make_shared<mtd::MockBuffer>(); | 40 | buffer3 = std::make_shared<mtd::MockBuffer>(); |
3605 | 40 | } | 41 | } |
3606 | 41 | 42 | ||
3610 | 42 | std::shared_ptr<mc::Buffer> buffer1; | 43 | std::shared_ptr<mg::Buffer> buffer1; |
3611 | 43 | std::shared_ptr<mc::Buffer> buffer2; | 44 | std::shared_ptr<mg::Buffer> buffer2; |
3612 | 44 | std::shared_ptr<mc::Buffer> buffer3; | 45 | std::shared_ptr<mg::Buffer> buffer3; |
3613 | 45 | }; | 46 | }; |
3614 | 46 | 47 | ||
3615 | 47 | TEST_F(FBSimpleSwapperTest, simple_swaps_returns_valid) | 48 | TEST_F(FBSimpleSwapperTest, simple_swaps_returns_valid) |
3616 | 48 | { | 49 | { |
3618 | 49 | std::initializer_list<std::shared_ptr<mc::Buffer>> double_list{buffer1, buffer2}; | 50 | std::initializer_list<std::shared_ptr<mg::Buffer>> double_list{buffer1, buffer2}; |
3619 | 50 | mga::FBSimpleSwapper fb_swapper(double_list); | 51 | mga::FBSimpleSwapper fb_swapper(double_list); |
3620 | 51 | 52 | ||
3621 | 52 | auto test_buffer = fb_swapper.compositor_acquire(); | 53 | auto test_buffer = fb_swapper.compositor_acquire(); |
3622 | @@ -56,7 +57,7 @@ | |||
3623 | 56 | 57 | ||
3624 | 57 | TEST_F(FBSimpleSwapperTest, simple_swaps_return_aba_pattern) | 58 | TEST_F(FBSimpleSwapperTest, simple_swaps_return_aba_pattern) |
3625 | 58 | { | 59 | { |
3627 | 59 | std::initializer_list<std::shared_ptr<mc::Buffer>> double_list{buffer1, buffer2}; | 60 | std::initializer_list<std::shared_ptr<mg::Buffer>> double_list{buffer1, buffer2}; |
3628 | 60 | mga::FBSimpleSwapper fb_swapper(double_list); | 61 | mga::FBSimpleSwapper fb_swapper(double_list); |
3629 | 61 | 62 | ||
3630 | 62 | auto test_buffer_1 = fb_swapper.compositor_acquire(); | 63 | auto test_buffer_1 = fb_swapper.compositor_acquire(); |
3631 | @@ -74,7 +75,7 @@ | |||
3632 | 74 | 75 | ||
3633 | 75 | TEST_F(FBSimpleSwapperTest, triple_swaps_return_abcab_pattern) | 76 | TEST_F(FBSimpleSwapperTest, triple_swaps_return_abcab_pattern) |
3634 | 76 | { | 77 | { |
3636 | 77 | std::initializer_list<std::shared_ptr<mc::Buffer>> triple_list{buffer1, buffer2, buffer3}; | 78 | std::initializer_list<std::shared_ptr<mg::Buffer>> triple_list{buffer1, buffer2, buffer3}; |
3637 | 78 | mga::FBSimpleSwapper fb_swapper(triple_list); | 79 | mga::FBSimpleSwapper fb_swapper(triple_list); |
3638 | 79 | 80 | ||
3639 | 80 | auto test_buffer_1 = fb_swapper.compositor_acquire(); | 81 | auto test_buffer_1 = fb_swapper.compositor_acquire(); |
3640 | @@ -103,10 +104,10 @@ | |||
3641 | 103 | 104 | ||
3642 | 104 | TEST_F(FBSimpleSwapperTest, synctest) | 105 | TEST_F(FBSimpleSwapperTest, synctest) |
3643 | 105 | { | 106 | { |
3645 | 106 | std::vector<std::shared_ptr<mc::Buffer>> test_buffers{buffer1, buffer2}; | 107 | std::vector<std::shared_ptr<mg::Buffer>> test_buffers{buffer1, buffer2}; |
3646 | 107 | mga::FBSimpleSwapper fb_swapper(test_buffers); | 108 | mga::FBSimpleSwapper fb_swapper(test_buffers); |
3647 | 108 | 109 | ||
3649 | 109 | std::vector<std::shared_ptr<mc::Buffer>> blist; | 110 | std::vector<std::shared_ptr<mg::Buffer>> blist; |
3650 | 110 | std::mutex mut; | 111 | std::mutex mut; |
3651 | 111 | for(auto i=0u; i < 150; ++i) | 112 | for(auto i=0u; i < 150; ++i) |
3652 | 112 | { | 113 | { |
3653 | 113 | 114 | ||
3654 | === modified file 'tests/unit-tests/graphics/android/test_framebuffer_factory.cpp' | |||
3655 | --- tests/unit-tests/graphics/android/test_framebuffer_factory.cpp 2013-07-11 16:54:41 +0000 | |||
3656 | +++ tests/unit-tests/graphics/android/test_framebuffer_factory.cpp 2013-07-17 14:20:33 +0000 | |||
3657 | @@ -27,6 +27,7 @@ | |||
3658 | 27 | #include <gmock/gmock.h> | 27 | #include <gmock/gmock.h> |
3659 | 28 | #include <gtest/gtest.h> | 28 | #include <gtest/gtest.h> |
3660 | 29 | 29 | ||
3661 | 30 | namespace mg=mir::graphics; | ||
3662 | 30 | namespace mga=mir::graphics::android; | 31 | namespace mga=mir::graphics::android; |
3663 | 31 | namespace mtd=mir::test::doubles; | 32 | namespace mtd=mir::test::doubles; |
3664 | 32 | namespace mt=mir::test; | 33 | namespace mt=mir::test; |
3665 | @@ -39,7 +40,7 @@ | |||
3666 | 39 | class MockAndroidGraphicBufferAllocator : public mga::GraphicBufferAllocator | 40 | class MockAndroidGraphicBufferAllocator : public mga::GraphicBufferAllocator |
3667 | 40 | { | 41 | { |
3668 | 41 | public: | 42 | public: |
3670 | 42 | MOCK_METHOD1(alloc_buffer, std::shared_ptr<mc::Buffer>(mc::BufferProperties const&)); | 43 | MOCK_METHOD1(alloc_buffer, std::shared_ptr<mg::Buffer>(mc::BufferProperties const&)); |
3671 | 43 | MOCK_METHOD3(alloc_buffer_platform, std::shared_ptr<mga::Buffer>(geom::Size, geom::PixelFormat, mga::BufferUsage)); | 44 | MOCK_METHOD3(alloc_buffer_platform, std::shared_ptr<mga::Buffer>(geom::Size, geom::PixelFormat, mga::BufferUsage)); |
3672 | 44 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); | 45 | MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>()); |
3673 | 45 | 46 | ||
3674 | 46 | 47 | ||
3675 | === modified file 'tests/unit-tests/graphics/android/test_hwc10_device.cpp' | |||
3676 | --- tests/unit-tests/graphics/android/test_hwc10_device.cpp 2013-07-11 16:54:41 +0000 | |||
3677 | +++ tests/unit-tests/graphics/android/test_hwc10_device.cpp 2013-07-17 14:20:33 +0000 | |||
3678 | @@ -26,6 +26,7 @@ | |||
3679 | 26 | #include <stdexcept> | 26 | #include <stdexcept> |
3680 | 27 | 27 | ||
3681 | 28 | namespace mc=mir::compositor; | 28 | namespace mc=mir::compositor; |
3682 | 29 | namespace mg=mir::graphics; | ||
3683 | 29 | namespace mga=mir::graphics::android; | 30 | namespace mga=mir::graphics::android; |
3684 | 30 | namespace mtd=mir::test::doubles; | 31 | namespace mtd=mir::test::doubles; |
3685 | 31 | namespace geom=mir::geometry; | 32 | namespace geom=mir::geometry; |
3686 | @@ -90,7 +91,7 @@ | |||
3687 | 90 | 91 | ||
3688 | 91 | TEST_F(HWC10Device, hwc10_set_next_frontbuffer) | 92 | TEST_F(HWC10Device, hwc10_set_next_frontbuffer) |
3689 | 92 | { | 93 | { |
3691 | 93 | std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); | 94 | std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); |
3692 | 94 | EXPECT_CALL(*mock_fbdev, set_next_frontbuffer(mock_buffer)) | 95 | EXPECT_CALL(*mock_fbdev, set_next_frontbuffer(mock_buffer)) |
3693 | 95 | .Times(1); | 96 | .Times(1); |
3694 | 96 | 97 | ||
3695 | 97 | 98 | ||
3696 | === modified file 'tests/unit-tests/graphics/android/test_hwc11_device.cpp' | |||
3697 | --- tests/unit-tests/graphics/android/test_hwc11_device.cpp 2013-05-22 06:30:39 +0000 | |||
3698 | +++ tests/unit-tests/graphics/android/test_hwc11_device.cpp 2013-07-17 14:20:33 +0000 | |||
3699 | @@ -28,6 +28,7 @@ | |||
3700 | 28 | #include <stdexcept> | 28 | #include <stdexcept> |
3701 | 29 | 29 | ||
3702 | 30 | namespace mc=mir::compositor; | 30 | namespace mc=mir::compositor; |
3703 | 31 | namespace mg=mir::graphics; | ||
3704 | 31 | namespace mga=mir::graphics::android; | 32 | namespace mga=mir::graphics::android; |
3705 | 32 | namespace mtd=mir::test::doubles; | 33 | namespace mtd=mir::test::doubles; |
3706 | 33 | 34 | ||
3707 | @@ -258,7 +259,7 @@ | |||
3708 | 258 | 259 | ||
3709 | 259 | TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_adds_to_layerlist) | 260 | TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_adds_to_layerlist) |
3710 | 260 | { | 261 | { |
3712 | 261 | std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); | 262 | std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); |
3713 | 262 | EXPECT_CALL(*this->mock_organizer, set_fb_target(mock_buffer)) | 263 | EXPECT_CALL(*this->mock_organizer, set_fb_target(mock_buffer)) |
3714 | 263 | .Times(1); | 264 | .Times(1); |
3715 | 264 | 265 | ||
3716 | @@ -268,7 +269,7 @@ | |||
3717 | 268 | 269 | ||
3718 | 269 | TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_posts_vsync) | 270 | TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_posts_vsync) |
3719 | 270 | { | 271 | { |
3721 | 271 | std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); | 272 | std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); |
3722 | 272 | EXPECT_CALL(*this->mock_display_support_provider, set_next_frontbuffer(mock_buffer)) | 273 | EXPECT_CALL(*this->mock_display_support_provider, set_next_frontbuffer(mock_buffer)) |
3723 | 273 | .Times(1); | 274 | .Times(1); |
3724 | 274 | 275 | ||
3725 | @@ -278,7 +279,7 @@ | |||
3726 | 278 | 279 | ||
3727 | 279 | TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_posts_no_sync) | 280 | TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_posts_no_sync) |
3728 | 280 | { | 281 | { |
3730 | 281 | std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); | 282 | std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>(); |
3731 | 282 | EXPECT_CALL(*this->mock_display_support_provider, set_next_frontbuffer(mock_buffer)) | 283 | EXPECT_CALL(*this->mock_display_support_provider, set_next_frontbuffer(mock_buffer)) |
3732 | 283 | .Times(0); | 284 | .Times(0); |
3733 | 284 | 285 | ||
3734 | 285 | 286 | ||
3735 | === modified file 'tests/unit-tests/graphics/android/test_internal_client.cpp' | |||
3736 | --- tests/unit-tests/graphics/android/test_internal_client.cpp 2013-07-11 16:54:41 +0000 | |||
3737 | +++ tests/unit-tests/graphics/android/test_internal_client.cpp 2013-07-17 14:20:33 +0000 | |||
3738 | @@ -22,7 +22,7 @@ | |||
3739 | 22 | #include <gtest/gtest.h> | 22 | #include <gtest/gtest.h> |
3740 | 23 | 23 | ||
3741 | 24 | namespace geom=mir::geometry; | 24 | namespace geom=mir::geometry; |
3743 | 25 | namespace mc=mir::compositor; | 25 | namespace mg=mir::graphics; |
3744 | 26 | namespace mga=mir::graphics::android; | 26 | namespace mga=mir::graphics::android; |
3745 | 27 | 27 | ||
3746 | 28 | namespace | 28 | namespace |
3747 | @@ -43,9 +43,9 @@ | |||
3748 | 43 | { | 43 | { |
3749 | 44 | return geom::PixelFormat::xbgr_8888; | 44 | return geom::PixelFormat::xbgr_8888; |
3750 | 45 | } | 45 | } |
3752 | 46 | std::shared_ptr<mc::Buffer> advance_client_buffer() | 46 | std::shared_ptr<mg::Buffer> advance_client_buffer() |
3753 | 47 | { | 47 | { |
3755 | 48 | return std::shared_ptr<mc::Buffer>(); | 48 | return std::shared_ptr<mg::Buffer>(); |
3756 | 49 | } | 49 | } |
3757 | 50 | bool supports_input() const | 50 | bool supports_input() const |
3758 | 51 | { | 51 | { |
3759 | 52 | 52 | ||
3760 | === modified file 'tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp' | |||
3761 | --- tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp 2013-07-11 16:54:41 +0000 | |||
3762 | +++ tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp 2013-07-17 14:20:33 +0000 | |||
3763 | @@ -25,7 +25,7 @@ | |||
3764 | 25 | #include <gtest/gtest.h> | 25 | #include <gtest/gtest.h> |
3765 | 26 | #include <stdexcept> | 26 | #include <stdexcept> |
3766 | 27 | 27 | ||
3768 | 28 | namespace mc=mir::compositor; | 28 | namespace mg=mir::graphics; |
3769 | 29 | namespace mtd=mir::test::doubles; | 29 | namespace mtd=mir::test::doubles; |
3770 | 30 | namespace mga=mir::graphics::android; | 30 | namespace mga=mir::graphics::android; |
3771 | 31 | namespace geom=mir::geometry; | 31 | namespace geom=mir::geometry; |
3772 | @@ -40,7 +40,7 @@ | |||
3773 | 40 | MOCK_CONST_METHOD0(size, geom::Size()); | 40 | MOCK_CONST_METHOD0(size, geom::Size()); |
3774 | 41 | MOCK_CONST_METHOD0(pixel_format, geom::PixelFormat()); | 41 | MOCK_CONST_METHOD0(pixel_format, geom::PixelFormat()); |
3775 | 42 | 42 | ||
3777 | 43 | MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mc::Buffer>()); | 43 | MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mg::Buffer>()); |
3778 | 44 | 44 | ||
3779 | 45 | MOCK_CONST_METHOD0(supports_input, bool()); | 45 | MOCK_CONST_METHOD0(supports_input, bool()); |
3780 | 46 | MOCK_CONST_METHOD0(client_input_fd, int()); | 46 | MOCK_CONST_METHOD0(client_input_fd, int()); |
3781 | @@ -83,7 +83,7 @@ | |||
3782 | 83 | .Times(1); | 83 | .Times(1); |
3783 | 84 | EXPECT_CALL(*mock_buffer, native_buffer_handle()) | 84 | EXPECT_CALL(*mock_buffer, native_buffer_handle()) |
3784 | 85 | .Times(1); | 85 | .Times(1); |
3786 | 86 | std::shared_ptr<mc::Buffer> tmp = mock_buffer; | 86 | std::shared_ptr<mg::Buffer> tmp = mock_buffer; |
3787 | 87 | EXPECT_CALL(*mock_cache, store_buffer(tmp, stub_anw.get())) | 87 | EXPECT_CALL(*mock_cache, store_buffer(tmp, stub_anw.get())) |
3788 | 88 | .Times(1); | 88 | .Times(1); |
3789 | 89 | 89 | ||
3790 | 90 | 90 | ||
3791 | === modified file 'tests/unit-tests/graphics/android/test_server_interpreter.cpp' | |||
3792 | --- tests/unit-tests/graphics/android/test_server_interpreter.cpp 2013-07-11 16:54:41 +0000 | |||
3793 | +++ tests/unit-tests/graphics/android/test_server_interpreter.cpp 2013-07-17 14:20:33 +0000 | |||
3794 | @@ -29,6 +29,7 @@ | |||
3795 | 29 | 29 | ||
3796 | 30 | namespace mtd=mir::test::doubles; | 30 | namespace mtd=mir::test::doubles; |
3797 | 31 | namespace geom=mir::geometry; | 31 | namespace geom=mir::geometry; |
3798 | 32 | namespace mg=mir::graphics; | ||
3799 | 32 | namespace mga=mir::graphics::android; | 33 | namespace mga=mir::graphics::android; |
3800 | 33 | namespace mc=mir::compositor; | 34 | namespace mc=mir::compositor; |
3801 | 34 | 35 | ||
3802 | @@ -44,8 +45,8 @@ | |||
3803 | 44 | struct MockFBSwapper : public mga::FBSwapper | 45 | struct MockFBSwapper : public mga::FBSwapper |
3804 | 45 | { | 46 | { |
3805 | 46 | ~MockFBSwapper() noexcept {} | 47 | ~MockFBSwapper() noexcept {} |
3808 | 47 | MOCK_METHOD0(compositor_acquire, std::shared_ptr<mc::Buffer>()); | 48 | MOCK_METHOD0(compositor_acquire, std::shared_ptr<mg::Buffer>()); |
3809 | 48 | MOCK_METHOD1(compositor_release, void(std::shared_ptr<mc::Buffer> const& released_buffer)); | 49 | MOCK_METHOD1(compositor_release, void(std::shared_ptr<mg::Buffer> const& released_buffer)); |
3810 | 49 | }; | 50 | }; |
3811 | 50 | 51 | ||
3812 | 51 | struct ServerRenderWindowTest : public ::testing::Test | 52 | struct ServerRenderWindowTest : public ::testing::Test |
3813 | @@ -88,7 +89,7 @@ | |||
3814 | 88 | .Times(1) | 89 | .Times(1) |
3815 | 89 | .WillOnce(Return(stub_anw)); | 90 | .WillOnce(Return(stub_anw)); |
3816 | 90 | 91 | ||
3818 | 91 | std::shared_ptr<mc::Buffer> tmp = mock_buffer1; | 92 | std::shared_ptr<mg::Buffer> tmp = mock_buffer1; |
3819 | 92 | EXPECT_CALL(*mock_cache, store_buffer(tmp, stub_anw.get())) | 93 | EXPECT_CALL(*mock_cache, store_buffer(tmp, stub_anw.get())) |
3820 | 93 | .Times(1); | 94 | .Times(1); |
3821 | 94 | 95 | ||
3822 | @@ -115,7 +116,7 @@ | |||
3823 | 115 | render_window.driver_requests_buffer(); | 116 | render_window.driver_requests_buffer(); |
3824 | 116 | testing::Mock::VerifyAndClearExpectations(mock_swapper.get()); | 117 | testing::Mock::VerifyAndClearExpectations(mock_swapper.get()); |
3825 | 117 | 118 | ||
3827 | 118 | std::shared_ptr<mc::Buffer> buf1 = mock_buffer1; | 119 | std::shared_ptr<mg::Buffer> buf1 = mock_buffer1; |
3828 | 119 | EXPECT_CALL(*mock_swapper, compositor_release(buf1)) | 120 | EXPECT_CALL(*mock_swapper, compositor_release(buf1)) |
3829 | 120 | .Times(1); | 121 | .Times(1); |
3830 | 121 | EXPECT_CALL(*stub_sync, wait()) | 122 | EXPECT_CALL(*stub_sync, wait()) |
3831 | @@ -134,13 +135,13 @@ | |||
3832 | 134 | .WillOnce(Return(mock_buffer1)); | 135 | .WillOnce(Return(mock_buffer1)); |
3833 | 135 | mga::ServerRenderWindow render_window(mock_swapper, mock_display_poster, mock_cache); | 136 | mga::ServerRenderWindow render_window(mock_swapper, mock_display_poster, mock_cache); |
3834 | 136 | 137 | ||
3836 | 137 | mc::BufferID id{442}, returned_id; | 138 | mg::BufferID id{442}, returned_id; |
3837 | 138 | EXPECT_CALL(*mock_swapper, compositor_acquire()) | 139 | EXPECT_CALL(*mock_swapper, compositor_acquire()) |
3838 | 139 | .Times(1) | 140 | .Times(1) |
3839 | 140 | .WillOnce(Return(mock_buffer1)); | 141 | .WillOnce(Return(mock_buffer1)); |
3840 | 141 | EXPECT_CALL(*mock_swapper, compositor_release(_)) | 142 | EXPECT_CALL(*mock_swapper, compositor_release(_)) |
3841 | 142 | .Times(1); | 143 | .Times(1); |
3843 | 143 | std::shared_ptr<mc::Buffer> buf1 = mock_buffer1; | 144 | std::shared_ptr<mg::Buffer> buf1 = mock_buffer1; |
3844 | 144 | EXPECT_CALL(*mock_buffer1, native_buffer_handle()) | 145 | EXPECT_CALL(*mock_buffer1, native_buffer_handle()) |
3845 | 145 | .Times(1) | 146 | .Times(1) |
3846 | 146 | .WillOnce(Return(stub_anw)); | 147 | .WillOnce(Return(stub_anw)); |
3847 | 147 | 148 | ||
3848 | === modified file 'tests/unit-tests/graphics/gbm/test_internal_client.cpp' | |||
3849 | --- tests/unit-tests/graphics/gbm/test_internal_client.cpp 2013-06-20 08:27:10 +0000 | |||
3850 | +++ tests/unit-tests/graphics/gbm/test_internal_client.cpp 2013-07-17 14:20:33 +0000 | |||
3851 | @@ -25,7 +25,6 @@ | |||
3852 | 25 | #include <gtest/gtest.h> | 25 | #include <gtest/gtest.h> |
3853 | 26 | 26 | ||
3854 | 27 | namespace geom=mir::geometry; | 27 | namespace geom=mir::geometry; |
3855 | 28 | namespace mc=mir::compositor; | ||
3856 | 29 | namespace mgg=mir::graphics::gbm; | 28 | namespace mgg=mir::graphics::gbm; |
3857 | 30 | namespace mtd=mir::test::doubles; | 29 | namespace mtd=mir::test::doubles; |
3858 | 31 | 30 | ||
3859 | 32 | 31 | ||
3860 | === modified file 'tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp' | |||
3861 | --- tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp 2013-07-11 16:54:41 +0000 | |||
3862 | +++ tests/unit-tests/graphics/gbm/test_internal_native_surface.cpp 2013-07-17 14:20:33 +0000 | |||
3863 | @@ -50,7 +50,7 @@ | |||
3864 | 50 | MOCK_METHOD0(force_requests_to_complete, void()); | 50 | MOCK_METHOD0(force_requests_to_complete, void()); |
3865 | 51 | MOCK_CONST_METHOD0(size, geom::Size()); | 51 | MOCK_CONST_METHOD0(size, geom::Size()); |
3866 | 52 | MOCK_CONST_METHOD0(pixel_format, geom::PixelFormat()); | 52 | MOCK_CONST_METHOD0(pixel_format, geom::PixelFormat()); |
3868 | 53 | MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mc::Buffer>()); | 53 | MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mg::Buffer>()); |
3869 | 54 | MOCK_CONST_METHOD0(supports_input, bool()); | 54 | MOCK_CONST_METHOD0(supports_input, bool()); |
3870 | 55 | MOCK_CONST_METHOD0(client_input_fd, int()); | 55 | MOCK_CONST_METHOD0(client_input_fd, int()); |
3871 | 56 | MOCK_METHOD2(configure, int(MirSurfaceAttrib, int)); | 56 | MOCK_METHOD2(configure, int(MirSurfaceAttrib, int)); |
3872 | 57 | 57 | ||
3873 | === modified file 'tests/unit-tests/shell/test_application_session.cpp' | |||
3874 | --- tests/unit-tests/shell/test_application_session.cpp 2013-07-01 06:36:33 +0000 | |||
3875 | +++ tests/unit-tests/shell/test_application_session.cpp 2013-07-17 14:20:33 +0000 | |||
3876 | @@ -17,7 +17,7 @@ | |||
3877 | 17 | */ | 17 | */ |
3878 | 18 | 18 | ||
3879 | 19 | #include "mir/shell/application_session.h" | 19 | #include "mir/shell/application_session.h" |
3881 | 20 | #include "mir/compositor/buffer.h" | 20 | #include "mir/graphics/buffer.h" |
3882 | 21 | #include "mir/shell/surface_creation_parameters.h" | 21 | #include "mir/shell/surface_creation_parameters.h" |
3883 | 22 | #include "mir_test/fake_shared.h" | 22 | #include "mir_test/fake_shared.h" |
3884 | 23 | #include "mir_test_doubles/mock_surface_factory.h" | 23 | #include "mir_test_doubles/mock_surface_factory.h" |
3885 | 24 | 24 | ||
3886 | === modified file 'tests/unit-tests/shell/test_surface.cpp' | |||
3887 | --- tests/unit-tests/shell/test_surface.cpp 2013-07-12 20:33:47 +0000 | |||
3888 | +++ tests/unit-tests/shell/test_surface.cpp 2013-07-17 14:20:33 +0000 | |||
3889 | @@ -40,6 +40,7 @@ | |||
3890 | 40 | namespace msh = mir::shell; | 40 | namespace msh = mir::shell; |
3891 | 41 | namespace mf = mir::frontend; | 41 | namespace mf = mir::frontend; |
3892 | 42 | namespace mc = mir::compositor; | 42 | namespace mc = mir::compositor; |
3893 | 43 | namespace mg = mir::graphics; | ||
3894 | 43 | namespace mi = mir::input; | 44 | namespace mi = mir::input; |
3895 | 44 | namespace geom = mir::geometry; | 45 | namespace geom = mir::geometry; |
3896 | 45 | namespace mt = mir::test; | 46 | namespace mt = mir::test; |
3897 | @@ -484,10 +485,10 @@ | |||
3898 | 484 | mt::fake_shared(surface_builder), | 485 | mt::fake_shared(surface_builder), |
3899 | 485 | msh::a_surface()); | 486 | msh::a_surface()); |
3900 | 486 | 487 | ||
3902 | 487 | mc::Buffer* buf_ptr{nullptr}; | 488 | mg::Buffer* buf_ptr{nullptr}; |
3903 | 488 | 489 | ||
3904 | 489 | test.with_most_recent_buffer_do( | 490 | test.with_most_recent_buffer_do( |
3906 | 490 | [&](mc::Buffer& buffer) | 491 | [&](mg::Buffer& buffer) |
3907 | 491 | { | 492 | { |
3908 | 492 | buf_ptr = &buffer; | 493 | buf_ptr = &buffer; |
3909 | 493 | }); | 494 | }); |
3910 | 494 | 495 | ||
3911 | === modified file 'tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp' | |||
3912 | --- tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-07-11 16:54:41 +0000 | |||
3913 | +++ tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-07-17 14:20:33 +0000 | |||
3914 | @@ -17,9 +17,9 @@ | |||
3915 | 17 | */ | 17 | */ |
3916 | 18 | 18 | ||
3917 | 19 | #include "mir/shell/threaded_snapshot_strategy.h" | 19 | #include "mir/shell/threaded_snapshot_strategy.h" |
3919 | 20 | #include "mir/shell/pixel_buffer.h" | 20 | #include "mir/graphics/pixel_buffer.h" |
3920 | 21 | #include "mir/shell/surface_buffer_access.h" | 21 | #include "mir/shell/surface_buffer_access.h" |
3922 | 22 | #include "mir/compositor/buffer.h" | 22 | #include "mir/graphics/buffer.h" |
3923 | 23 | 23 | ||
3924 | 24 | #include "mir_test_doubles/stub_buffer.h" | 24 | #include "mir_test_doubles/stub_buffer.h" |
3925 | 25 | #include "mir_test/fake_shared.h" | 25 | #include "mir_test/fake_shared.h" |
3926 | @@ -32,6 +32,7 @@ | |||
3927 | 32 | #include <atomic> | 32 | #include <atomic> |
3928 | 33 | 33 | ||
3929 | 34 | namespace mc = mir::compositor; | 34 | namespace mc = mir::compositor; |
3930 | 35 | namespace mg = mir::graphics; | ||
3931 | 35 | namespace msh = mir::shell; | 36 | namespace msh = mir::shell; |
3932 | 36 | namespace mt = mir::test; | 37 | namespace mt = mir::test; |
3933 | 37 | namespace mtd = mir::test::doubles; | 38 | namespace mtd = mir::test::doubles; |
3934 | @@ -43,7 +44,7 @@ | |||
3935 | 43 | ~StubSurfaceBufferAccess() noexcept {} | 44 | ~StubSurfaceBufferAccess() noexcept {} |
3936 | 44 | 45 | ||
3937 | 45 | void with_most_recent_buffer_do( | 46 | void with_most_recent_buffer_do( |
3939 | 46 | std::function<void(mc::Buffer&)> const& exec) | 47 | std::function<void(mg::Buffer&)> const& exec) |
3940 | 47 | { | 48 | { |
3941 | 48 | exec(buffer); | 49 | exec(buffer); |
3942 | 49 | } | 50 | } |
3943 | @@ -51,12 +52,12 @@ | |||
3944 | 51 | mtd::StubBuffer buffer; | 52 | mtd::StubBuffer buffer; |
3945 | 52 | }; | 53 | }; |
3946 | 53 | 54 | ||
3948 | 54 | class MockPixelBuffer : public msh::PixelBuffer | 55 | class MockPixelBuffer : public mg::PixelBuffer |
3949 | 55 | { | 56 | { |
3950 | 56 | public: | 57 | public: |
3951 | 57 | ~MockPixelBuffer() noexcept {} | 58 | ~MockPixelBuffer() noexcept {} |
3952 | 58 | 59 | ||
3954 | 59 | MOCK_METHOD1(fill_from, void(mc::Buffer& buffer)); | 60 | MOCK_METHOD1(fill_from, void(mg::Buffer& buffer)); |
3955 | 60 | MOCK_METHOD0(as_argb_8888, void const*()); | 61 | MOCK_METHOD0(as_argb_8888, void const*()); |
3956 | 61 | MOCK_CONST_METHOD0(size, geom::Size()); | 62 | MOCK_CONST_METHOD0(size, geom::Size()); |
3957 | 62 | MOCK_CONST_METHOD0(stride, geom::Stride()); | 63 | MOCK_CONST_METHOD0(stride, geom::Stride()); |
3958 | 63 | 64 | ||
3959 | === modified file 'tests/unit-tests/surfaces/test_surface_stack.cpp' | |||
3960 | --- tests/unit-tests/surfaces/test_surface_stack.cpp 2013-07-12 21:48:58 +0000 | |||
3961 | +++ tests/unit-tests/surfaces/test_surface_stack.cpp 2013-07-17 14:20:33 +0000 | |||
3962 | @@ -65,10 +65,10 @@ | |||
3963 | 65 | class NullBufferBundle : public mc::BufferBundle | 65 | class NullBufferBundle : public mc::BufferBundle |
3964 | 66 | { | 66 | { |
3965 | 67 | public: | 67 | public: |
3970 | 68 | virtual std::shared_ptr<mc::Buffer> client_acquire() { return std::shared_ptr<mc::Buffer>(); } | 68 | virtual std::shared_ptr<mg::Buffer> client_acquire() { return std::shared_ptr<mg::Buffer>(); } |
3971 | 69 | virtual void client_release(std::shared_ptr<mc::Buffer> const&) {} | 69 | virtual void client_release(std::shared_ptr<mg::Buffer> const&) {} |
3972 | 70 | virtual std::shared_ptr<mc::Buffer> compositor_acquire(){ return std::shared_ptr<mc::Buffer>(); }; | 70 | virtual std::shared_ptr<mg::Buffer> compositor_acquire(){ return std::shared_ptr<mg::Buffer>(); }; |
3973 | 71 | virtual void compositor_release(std::shared_ptr<mc::Buffer> const&){} | 71 | virtual void compositor_release(std::shared_ptr<mg::Buffer> const&){} |
3974 | 72 | virtual void force_client_abort() {} | 72 | virtual void force_client_abort() {} |
3975 | 73 | void force_requests_to_complete() {} | 73 | void force_requests_to_complete() {} |
3976 | 74 | virtual void allow_framedropping(bool) {} | 74 | virtual void allow_framedropping(bool) {} |
PASSED: Continuous integration, rev:858 jenkins. qa.ubuntu. com/job/ mir-ci/ 1026/ jenkins. qa.ubuntu. com/job/ mir-android- saucy-i386- build/1332 jenkins. qa.ubuntu. com/job/ mir-clang- saucy-amd64- build/1217 jenkins. qa.ubuntu. com/job/ mir-saucy- amd64-ci/ 264 jenkins. qa.ubuntu. com/job/ mir-saucy- amd64-ci/ 264/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-vm- ci-build/ ./distribution= quantal, flavor= amd64/655
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ mir-ci/ 1026/rebuild
http://