Mir

Merge lp:~alan-griffiths/mir/move-graphicsplatform-dependencies-to-graphics into lp:~mir-team/mir/trunk

Proposed by Alan Griffiths
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
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.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
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"...

review: Needs Information
Revision history for this message
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 :/

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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.

review: Needs Fixing
Revision history for this message
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.

review: Needs Fixing
Revision history for this message
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).

Revision history for this message
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.)

Revision history for this message
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

Revision history for this message
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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
860. By Alan Griffiths

merge lp:mir

861. By Alan Griffiths

merge lp:mir

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
862. By Alan Griffiths

Move IntWrapper to LGPL

Revision history for this message
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.

Revision history for this message
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_buffer.cpp/.h code out of graphics as it is platform independent gl code.

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.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 */
6
7 #include "buffer_render_target.h"
8-#include "mir/compositor/buffer.h"
9+#include "mir/graphics/buffer.h"
10
11 #include <GLES2/gl2ext.h>
12 #include <stdexcept>
13
14 namespace geom = mir::geometry;
15-namespace mc = mir::compositor;
16+namespace mg = mir::graphics;
17 namespace mt = mir::tools;
18
19-mt::BufferRenderTarget::BufferRenderTarget(mc::Buffer& buffer)
20+mt::BufferRenderTarget::BufferRenderTarget(mg::Buffer& buffer)
21 : buffer(buffer)
22 {
23 resources.setup(buffer);
24@@ -55,7 +55,7 @@
25 glDeleteFramebuffers(1, &fbo);
26 }
27
28-void mt::BufferRenderTarget::Resources::setup(mc::Buffer& buffer)
29+void mt::BufferRenderTarget::Resources::setup(mg::Buffer& buffer)
30 {
31 geom::Size buf_size = buffer.size();
32
33
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
39 namespace mir
40 {
41-namespace compositor
42+namespace graphics
43 {
44 class Buffer;
45 }
46@@ -35,7 +35,7 @@
47 class BufferRenderTarget
48 {
49 public:
50- BufferRenderTarget(mir::compositor::Buffer& buffer);
51+ BufferRenderTarget(mir::graphics::Buffer& buffer);
52 ~BufferRenderTarget();
53
54 void make_current();
55@@ -49,7 +49,7 @@
56 {
57 }
58 ~Resources();
59- void setup(mir::compositor::Buffer& buffer);
60+ void setup(mir::graphics::Buffer& buffer);
61
62 GLuint fbo;
63 GLuint color_tex;
64@@ -57,7 +57,7 @@
65 };
66
67 Resources resources;
68- mir::compositor::Buffer& buffer;
69+ mir::graphics::Buffer& buffer;
70 };
71
72 }
73
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 {
79 }
80
81- void operator()(mc::Buffer& buffer)
82+ void operator()(mg::Buffer& buffer)
83 {
84 mt::BufferRenderTarget brt{buffer};
85 brt.make_current();
86
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
92 namespace mir
93 {
94+namespace graphics { class Buffer; }
95+
96 namespace compositor
97 {
98-
99-class Buffer;
100-
101 class BackBufferStrategy
102 {
103 public:
104 virtual ~BackBufferStrategy() = default;
105
106- virtual std::shared_ptr<Buffer> acquire() = 0;
107- virtual void release(std::shared_ptr<Buffer> const& buffer) = 0;
108+ virtual std::shared_ptr<graphics::Buffer> acquire() = 0;
109+ virtual void release(std::shared_ptr<graphics::Buffer> const& buffer) = 0;
110
111 protected:
112 BackBufferStrategy() = default;
113
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 #ifndef MIR_COMPOSITOR_BUFFER_ALLOCATION_STRATEGY_H_
119 #define MIR_COMPOSITOR_BUFFER_ALLOCATION_STRATEGY_H_
120
121-#include "mir/compositor/buffer.h"
122+#include "mir/graphics/buffer.h"
123
124 #include <vector>
125 #include <memory>
126@@ -46,7 +46,7 @@
127 {
128 public:
129 virtual std::shared_ptr<BufferSwapper> create_swapper_reuse_buffers(BufferProperties const&,
130- std::vector<std::shared_ptr<Buffer>>&, size_t, SwapperType) const = 0;
131+ std::vector<std::shared_ptr<graphics::Buffer>>&, size_t, SwapperType) const = 0;
132 virtual std::shared_ptr<BufferSwapper> create_swapper_new_buffers(
133 BufferProperties& actual_properties, BufferProperties const& requested_properties, SwapperType) const = 0;
134
135
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 #ifndef MIR_COMPOSITOR_BUFFER_BASIC_H_
141 #define MIR_COMPOSITOR_BUFFER_BASIC_H_
142
143-#include "mir/compositor/buffer.h"
144-#include "mir/compositor/buffer_id.h"
145+#include "mir/graphics/buffer.h"
146+#include "mir/graphics/buffer_id.h"
147
148 namespace mir
149 {
150 namespace compositor
151 {
152
153-class BufferBasic : public Buffer
154+class BufferBasic : public graphics::Buffer
155 {
156 public:
157 BufferBasic();
158
159- BufferID id() const
160+ graphics::BufferID id() const
161 {
162 return buffer_id;
163 }
164
165 private:
166- BufferID const buffer_id;
167+ graphics::BufferID const buffer_id;
168 };
169
170 }
171
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 #ifndef MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_
177 #define MIR_COMPOSITOR_BUFFER_STREAM_FACTORY_H_
178
179-#include "mir/compositor/buffer.h"
180+#include "mir/graphics/buffer.h"
181 #include "mir/surfaces/buffer_stream_factory.h"
182
183 #include <memory>
184
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 BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& swapper);
190 ~BufferStreamSurfaces();
191
192- std::shared_ptr<Buffer> secure_client_buffer();
193+ std::shared_ptr<graphics::Buffer> secure_client_buffer();
194
195- std::shared_ptr<Buffer> lock_back_buffer();
196+ std::shared_ptr<graphics::Buffer> lock_back_buffer();
197
198 geometry::PixelFormat get_stream_pixel_format();
199 geometry::Size stream_size();
200
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
206 namespace mir
207 {
208+namespace graphics { class Buffer; }
209+
210 namespace compositor
211 {
212-class Buffer;
213-
214 class BufferSwapper
215 {
216 public:
217@@ -41,12 +41,12 @@
218 *
219 * May throw a mc::BufferSwapperRequestAbortedException.
220 */
221- virtual std::shared_ptr<Buffer> client_acquire() = 0;
222+ virtual std::shared_ptr<graphics::Buffer> client_acquire() = 0;
223
224 /**
225 * Releases a client buffer, making it available to the compositor.
226 */
227- virtual void client_release(std::shared_ptr<Buffer> const& queued_buffer) = 0;
228+ virtual void client_release(std::shared_ptr<graphics::Buffer> const& queued_buffer) = 0;
229
230 /**
231 * Acquires the last posted buffer.
232@@ -61,12 +61,12 @@
233 *
234 * May throw a mc::BufferSwapperOutOfBuffersException.
235 */
236- virtual std::shared_ptr<Buffer> compositor_acquire() = 0;
237+ virtual std::shared_ptr<graphics::Buffer> compositor_acquire() = 0;
238
239 /**
240 * Releases a compositor buffer, making it available to the client.
241 */
242- virtual void compositor_release(std::shared_ptr<Buffer> const& released_buffer) = 0;
243+ virtual void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer) = 0;
244
245 /**
246 * Forces client requests on the buffer swapper to abort.
247@@ -110,7 +110,7 @@
248 * After the completion of this call, neither the client, nor the compositor can
249 * continue to request or return buffers to this swapper.
250 */
251- virtual void end_responsibility(std::vector<std::shared_ptr<Buffer>>& buffers, size_t& original_size) = 0;
252+ virtual void end_responsibility(std::vector<std::shared_ptr<graphics::Buffer>>& buffers, size_t& original_size) = 0;
253
254 /**
255 * If the swapper has been used, and you want to preserve the buffers that have been used,
256
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 namespace compositor
262 {
263
264-class Buffer;
265-
266 class BufferSwapperMulti : public BufferSwapper
267 {
268 public:
269- explicit BufferSwapperMulti(std::vector<std::shared_ptr<compositor::Buffer>>& buffer_list, size_t swapper_size);
270+ explicit BufferSwapperMulti(std::vector<std::shared_ptr<graphics::Buffer>>& buffer_list, size_t swapper_size);
271
272- std::shared_ptr<Buffer> client_acquire();
273- void client_release(std::shared_ptr<Buffer> const& queued_buffer);
274- std::shared_ptr<Buffer> compositor_acquire();
275- void compositor_release(std::shared_ptr<Buffer> const& released_buffer);
276+ std::shared_ptr<graphics::Buffer> client_acquire();
277+ void client_release(std::shared_ptr<graphics::Buffer> const& queued_buffer);
278+ std::shared_ptr<graphics::Buffer> compositor_acquire();
279+ void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer);
280
281 void force_client_abort();
282 void force_requests_to_complete();
283- void end_responsibility(std::vector<std::shared_ptr<Buffer>>&, size_t&);
284+ void end_responsibility(std::vector<std::shared_ptr<graphics::Buffer>>&, size_t&);
285
286 private:
287 std::mutex swapper_mutex;
288 std::condition_variable client_available_cv;
289
290- std::deque<std::shared_ptr<Buffer>> client_queue;
291- std::deque<std::shared_ptr<Buffer>> compositor_queue;
292+ std::deque<std::shared_ptr<graphics::Buffer>> client_queue;
293+ std::deque<std::shared_ptr<graphics::Buffer>> compositor_queue;
294 unsigned int in_use_by_client;
295 unsigned int const swapper_size;
296 int clients_trying_to_acquire;
297
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 class BufferSwapperSpin : public BufferSwapper
303 {
304 public:
305- BufferSwapperSpin(std::vector<std::shared_ptr<compositor::Buffer>>& buffer_list, size_t swapper_size);
306+ BufferSwapperSpin(std::vector<std::shared_ptr<graphics::Buffer>>& buffer_list, size_t swapper_size);
307
308- std::shared_ptr<Buffer> client_acquire();
309- void client_release(std::shared_ptr<Buffer> const& queued_buffer);
310- std::shared_ptr<Buffer> compositor_acquire();
311- void compositor_release(std::shared_ptr<Buffer> const& released_buffer);
312+ std::shared_ptr<graphics::Buffer> client_acquire();
313+ void client_release(std::shared_ptr<graphics::Buffer> const& queued_buffer);
314+ std::shared_ptr<graphics::Buffer> compositor_acquire();
315+ void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer);
316
317 void force_client_abort();
318 void force_requests_to_complete();
319- void end_responsibility(std::vector<std::shared_ptr<Buffer>>&, size_t&);
320+ void end_responsibility(std::vector<std::shared_ptr<graphics::Buffer>>&, size_t&);
321
322 private:
323 std::mutex swapper_mutex;
324
325- std::deque<std::shared_ptr<Buffer>> buffer_queue;
326+ std::deque<std::shared_ptr<graphics::Buffer>> buffer_queue;
327 unsigned int in_use_by_client;
328 bool client_submitted_new_buffer;
329 size_t const swapper_size;
330
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 #ifndef MIR_COMPOSITOR_GRAPHIC_BUFFER_ALLOCATOR_H_
336 #define MIR_COMPOSITOR_GRAPHIC_BUFFER_ALLOCATOR_H_
337
338-#include "mir/compositor/buffer.h"
339+#include "mir/graphics/buffer.h"
340
341 #include <vector>
342 #include <memory>
343@@ -44,7 +44,7 @@
344 *
345 * \param [in] buffer_properties the properties the allocated buffer should have
346 */
347- virtual std::shared_ptr<Buffer> alloc_buffer(
348+ virtual std::shared_ptr<graphics::Buffer> alloc_buffer(
349 BufferProperties const& buffer_properties) = 0;
350
351 /**
352
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 {
358 namespace compositor
359 {
360-
361-class Buffer;
362 class BufferBundle;
363
364 namespace detail
365@@ -38,7 +36,7 @@
366
367 struct AcquiredBufferInfo
368 {
369- std::weak_ptr<Buffer> buffer;
370+ std::weak_ptr<graphics::Buffer> buffer;
371 bool partly_released;
372 int use_count;
373 };
374@@ -50,12 +48,12 @@
375 public:
376 MultiAcquisitionBackBufferStrategy(std::shared_ptr<BufferBundle> const& buffer_bundle);
377
378- std::shared_ptr<Buffer> acquire();
379- void release(std::shared_ptr<Buffer> const& buffer);
380+ std::shared_ptr<graphics::Buffer> acquire();
381+ void release(std::shared_ptr<graphics::Buffer> const& buffer);
382
383 private:
384 std::vector<detail::AcquiredBufferInfo>::iterator find_info(
385- std::shared_ptr<Buffer> const& buffer);
386+ std::shared_ptr<graphics::Buffer> const& buffer);
387
388 std::shared_ptr<BufferBundle> const buffer_bundle;
389 std::vector<detail::AcquiredBufferInfo> acquired_buffers;
390
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 int number_of_buffers);
396
397 std::shared_ptr<BufferSwapper> create_swapper_reuse_buffers(BufferProperties const&,
398- std::vector<std::shared_ptr<Buffer>>&, size_t, SwapperType) const;
399+ std::vector<std::shared_ptr<graphics::Buffer>>&, size_t, SwapperType) const;
400 std::shared_ptr<BufferSwapper> create_swapper_new_buffers(
401 BufferProperties& actual_properties, BufferProperties const& requested_properties, SwapperType) const;
402
403 private:
404 void change_swapper_size(
405- std::vector<std::shared_ptr<Buffer>>&, size_t const, size_t, BufferProperties const&) const;
406+ std::vector<std::shared_ptr<graphics::Buffer>>&, size_t const, size_t, BufferProperties const&) const;
407
408 std::shared_ptr<GraphicBufferAllocator> const gr_allocator;
409 unsigned int const synchronous_number_of_buffers;
410
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 class SessionListener;
416 class FocusController;
417 class SessionManager;
418-class PixelBuffer;
419 class SnapshotStrategy;
420 }
421 namespace time
422@@ -82,6 +81,7 @@
423 class Display;
424 class ViewableArea;
425 class BufferInitializer;
426+class PixelBuffer;
427 class DisplayReport;
428 }
429 namespace input
430@@ -164,7 +164,7 @@
431 virtual std::shared_ptr<shell::FocusSequence> the_shell_focus_sequence();
432 virtual std::shared_ptr<shell::PlacementStrategy> the_shell_placement_strategy();
433 virtual std::shared_ptr<shell::SessionListener> the_shell_session_listener();
434- virtual std::shared_ptr<shell::PixelBuffer> the_shell_pixel_buffer();
435+ virtual std::shared_ptr<graphics::PixelBuffer> the_shell_pixel_buffer();
436 virtual std::shared_ptr<shell::SnapshotStrategy> the_shell_snapshot_strategy();
437 /** @} */
438
439@@ -248,7 +248,7 @@
440 CachedPtr<shell::FocusSequence> shell_focus_sequence;
441 CachedPtr<shell::PlacementStrategy> shell_placement_strategy;
442 CachedPtr<shell::SessionListener> shell_session_listener;
443- CachedPtr<shell::PixelBuffer> shell_pixel_buffer;
444+ CachedPtr<graphics::PixelBuffer> shell_pixel_buffer;
445 CachedPtr<shell::SnapshotStrategy> shell_snapshot_strategy;
446 CachedPtr<compositor::CompositingStrategy> compositing_strategy;
447 CachedPtr<compositor::OverlayRenderer> overlay_renderer;
448
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 }
454 namespace graphics
455 {
456+class Buffer;
457 class Platform;
458 class ViewableArea;
459 }
460
461 namespace compositor
462 {
463-class Buffer;
464 class GraphicBufferAllocator;
465 }
466
467@@ -123,7 +123,7 @@
468 std::shared_ptr<ResourceCache> const resource_cache;
469 std::shared_ptr<ClientBufferTracker> const client_tracker;
470
471- std::shared_ptr<compositor::Buffer> client_buffer_resource;
472+ std::shared_ptr<graphics::Buffer> client_buffer_resource;
473
474 std::mutex session_mutex;
475 std::shared_ptr<Session> session;
476
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
482 namespace mir
483 {
484-namespace compositor
485+namespace graphics
486 {
487 class Buffer;
488 }
489@@ -53,7 +53,7 @@
490 virtual geometry::Size size() const = 0;
491 virtual geometry::PixelFormat pixel_format() const = 0;
492
493- virtual std::shared_ptr<compositor::Buffer> advance_client_buffer() = 0;
494+ virtual std::shared_ptr<graphics::Buffer> advance_client_buffer() = 0;
495
496 virtual bool supports_input() const = 0;
497 virtual int client_input_fd() const = 0;
498
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
504 namespace mir
505 {
506-namespace compositor
507+namespace graphics
508 {
509-struct BufferIPCPackage;
510 class BufferID;
511
512 class Buffer : public surfaces::GraphicRegion
513
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 *
519 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
520 */
521-#ifndef MIR_COMPOSITOR_BUFFER_ID_H_
522-#define MIR_COMPOSITOR_BUFFER_ID_H_
523+#ifndef MIR_GRAPHICS_BUFFER_ID_H_
524+#define MIR_GRAPHICS_BUFFER_ID_H_
525
526 #include <cstdint>
527
528 namespace mir
529 {
530-namespace compositor
531+namespace graphics
532 {
533 class BufferID
534 {
535@@ -53,4 +53,4 @@
536
537 }
538 }
539-#endif /* MIR_COMPOSITOR_BUFFER_ID_H_ */
540+#endif /* MIR_GRAPHICS_BUFFER_ID_H_ */
541
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
547 namespace mir
548 {
549-namespace compositor
550+namespace graphics
551 {
552 class Buffer;
553-}
554-namespace graphics
555-{
556
557 /**
558 * Interface to buffer initialization.
559@@ -37,7 +34,7 @@
560 virtual ~BufferInitializer() {}
561
562 /** Operator to call to initialize a buffer. */
563- virtual void operator()(compositor::Buffer& buffer) = 0;
564+ virtual void operator()(Buffer& buffer) = 0;
565
566 protected:
567 BufferInitializer() = default;
568@@ -48,7 +45,7 @@
569 class NullBufferInitializer : public BufferInitializer
570 {
571 public:
572- void operator()(compositor::Buffer& /*buffer*/) {}
573+ void operator()(Buffer& /*buffer*/) {}
574 };
575
576 }
577
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 #ifndef MIR_GRAPHICS_GL_PIXEL_BUFFER_H_
583 #define MIR_GRAPHICS_GL_PIXEL_BUFFER_H_
584
585-#include "mir/shell/pixel_buffer.h"
586+#include "mir/graphics/pixel_buffer.h"
587
588 #include <memory>
589 #include <vector>
590@@ -30,17 +30,17 @@
591 {
592 namespace graphics
593 {
594-
595+class Buffer;
596 class GLContext;
597
598 /** Extracts the pixels from a compositor::Buffer using GL facilities. */
599-class GLPixelBuffer : public shell::PixelBuffer
600+class GLPixelBuffer : public PixelBuffer
601 {
602 public:
603 GLPixelBuffer(std::unique_ptr<GLContext> gl_context);
604 ~GLPixelBuffer() noexcept;
605
606- void fill_from(compositor::Buffer& buffer);
607+ void fill_from(Buffer& buffer);
608 void const* as_argb_8888();
609 geometry::Size size() const;
610 geometry::Stride stride() const;
611
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 * Authored By: Alexandros Frantzis <alexandros.frantzis@canonical.com>
617 */
618
619-#ifndef MIR_SHELL_PIXEL_BUFFER_H_
620-#define MIR_SHELL_PIXEL_BUFFER_H_
621+#ifndef MIR_GRAPHICS_PIXEL_BUFFER_H_
622+#define MIR_GRAPHICS_PIXEL_BUFFER_H_
623
624 #include "mir/geometry/size.h"
625 #include "mir/geometry/dimensions.h"
626
627 namespace mir
628 {
629-namespace compositor
630+namespace graphics
631 {
632 class Buffer;
633-}
634-namespace shell
635-{
636
637 /**
638 * Interface for extracting the pixels from a compositor::Buffer.
639@@ -44,7 +41,7 @@
640 *
641 * \param [in] buffer the buffer to get the pixels of
642 */
643- virtual void fill_from(compositor::Buffer& buffer) = 0;
644+ virtual void fill_from(Buffer& buffer) = 0;
645
646 /**
647 * The pixels in 0xAARRGGBB format.
648@@ -75,4 +72,4 @@
649 }
650 }
651
652-#endif /* MIR_SHELL_PIXEL_BUFFER_H_ */
653+#endif /* MIR_GRAPHICS_PIXEL_BUFFER_H_ */
654
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 namespace compositor
660 {
661 class GraphicBufferAllocator;
662-class Buffer;
663 class BufferIPCPacker;
664 }
665 namespace options
666@@ -44,6 +43,7 @@
667 namespace graphics
668 {
669
670+class Buffer;
671 class Display;
672 struct PlatformIPCPackage;
673 class BufferInitializer;
674@@ -102,7 +102,7 @@
675 * \param [in] buffer the buffer to fill the IPC package for
676 */
677 virtual void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer,
678- std::shared_ptr<compositor::Buffer> const& buffer) const = 0;
679+ std::shared_ptr<graphics::Buffer> const& buffer) const = 0;
680
681 /**
682 * Creates the in-process client support object.
683
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 virtual geometry::PixelFormat pixel_format() const;
689
690 virtual void with_most_recent_buffer_do(
691- std::function<void(compositor::Buffer&)> const& exec);
692- virtual std::shared_ptr<compositor::Buffer> advance_client_buffer();
693+ std::function<void(graphics::Buffer&)> const& exec);
694+ virtual std::shared_ptr<graphics::Buffer> advance_client_buffer();
695
696 virtual bool supports_input() const;
697 virtual int client_input_fd() const;
698
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
704 namespace mir
705 {
706-namespace compositor
707+namespace graphics
708 {
709 class Buffer;
710 }
711@@ -36,7 +36,7 @@
712 virtual ~SurfaceBufferAccess() = default;
713
714 virtual void with_most_recent_buffer_do(
715- std::function<void(compositor::Buffer&)> const& exec) = 0;
716+ std::function<void(graphics::Buffer&)> const& exec) = 0;
717
718 protected:
719 SurfaceBufferAccess() = default;
720
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
726 namespace mir
727 {
728+namespace graphics
729+{
730+class PixelBuffer;
731+}
732+
733 namespace shell
734 {
735-
736-class PixelBuffer;
737 class SnapshottingFunctor;
738
739 class ThreadedSnapshotStrategy : public SnapshotStrategy
740 {
741 public:
742- ThreadedSnapshotStrategy(std::shared_ptr<PixelBuffer> const& pixels);
743+ ThreadedSnapshotStrategy(std::shared_ptr<graphics::PixelBuffer> const& pixels);
744 ~ThreadedSnapshotStrategy() noexcept;
745
746 void take_snapshot_of(
747@@ -44,7 +47,7 @@
748 SnapshotCallback const& snapshot_taken);
749
750 private:
751- std::shared_ptr<PixelBuffer> const pixels;
752+ std::shared_ptr<graphics::PixelBuffer> const pixels;
753 std::unique_ptr<SnapshottingFunctor> functor;
754 std::thread thread;
755 };
756
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
762 #include "mir/geometry/size.h"
763 #include "mir/geometry/pixel_format.h"
764-#include "mir/compositor/buffer_id.h"
765+#include "mir/graphics/buffer_id.h"
766
767 #include <memory>
768
769 namespace mir
770 {
771-namespace compositor
772+namespace graphics
773 {
774 class Buffer;
775 }
776@@ -41,8 +41,8 @@
777 public:
778 virtual ~BufferStream() {/* TODO: make nothrow */}
779
780- virtual std::shared_ptr<compositor::Buffer> secure_client_buffer() = 0;
781- virtual std::shared_ptr<compositor::Buffer> lock_back_buffer() = 0;
782+ virtual std::shared_ptr<graphics::Buffer> secure_client_buffer() = 0;
783+ virtual std::shared_ptr<graphics::Buffer> lock_back_buffer() = 0;
784 virtual geometry::PixelFormat get_stream_pixel_format() = 0;
785 virtual geometry::Size stream_size() = 0;
786 virtual void allow_framedropping(bool) = 0;
787
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 {
793 namespace compositor
794 {
795-class Buffer;
796 class GraphicRegion;
797 struct BufferIPCPackage;
798-class BufferID;
799+}
800+namespace graphics
801+{
802+class Buffer;
803 }
804 namespace input
805 {
806@@ -75,8 +77,8 @@
807
808 geometry::PixelFormat pixel_format() const;
809
810- std::shared_ptr<compositor::Buffer> compositor_buffer() const;
811- std::shared_ptr<compositor::Buffer> advance_client_buffer();
812+ std::shared_ptr<graphics::Buffer> compositor_buffer() const;
813+ std::shared_ptr<graphics::Buffer> advance_client_buffer();
814 void force_requests_to_complete();
815 void flag_for_render();
816
817
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 /*
823- * Copyright © 2012 Canonical Ltd.
824+ * Copyright © 2012, 2013 Canonical Ltd.
825 *
826 * This program is free software: you can redistribute it and/or modify it
827- * under the terms of the GNU General Public License version 3,
828+ * under the terms of the GNU Lesser General Public License version 3,
829 * as published by the Free Software Foundation.
830 *
831 * This program is distributed in the hope that it will be useful,
832 * but WITHOUT ANY WARRANTY; without even the implied warranty of
833- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
834- * GNU General Public License for more details.
835+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
836+ * GNU Lesser General Public License for more details.
837 *
838- * You should have received a copy of the GNU General Public License
839- * along with this program. If not, see <http://www.gnu.org/licenses/>.
840+ * You should have received a copy of the GNU Lesser General Public License
841+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
842 *
843 * Authored By: Alan Griffiths <alan@octopull.co.uk>
844 */
845
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
851 #include "mir/compositor/buffer_basic.h"
852 #include "mir/geometry/size.h"
853-#include "mir/compositor/buffer_id.h"
854+#include "mir/graphics/buffer_id.h"
855
856 #include <gmock/gmock.h>
857 #include <gtest/gtest.h>
858@@ -33,7 +33,7 @@
859 namespace doubles
860 {
861
862-struct MockBuffer : public compositor::Buffer
863+struct MockBuffer : public graphics::Buffer
864 {
865 public:
866 MockBuffer()
867@@ -53,7 +53,7 @@
868 .WillByDefault(Return(pf));
869
870 ON_CALL(*this, id())
871- .WillByDefault(Return(compositor::BufferID{4}));
872+ .WillByDefault(Return(graphics::BufferID{4}));
873 ON_CALL(*this, native_buffer_handle())
874 .WillByDefault(Return(std::shared_ptr<MirNativeBuffer>()));
875 }
876@@ -64,7 +64,7 @@
877 MOCK_CONST_METHOD0(native_buffer_handle, std::shared_ptr<MirNativeBuffer>());
878
879 MOCK_METHOD0(bind_to_texture, void());
880- MOCK_CONST_METHOD0(id, compositor::BufferID());
881+ MOCK_CONST_METHOD0(id, graphics::BufferID());
882 };
883
884 }
885
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 ~MockBufferBundle() noexcept
891 {}
892
893- MOCK_METHOD0(client_acquire, std::shared_ptr<compositor::Buffer>());
894- MOCK_METHOD1(client_release, void(std::shared_ptr<compositor::Buffer> const&));
895- MOCK_METHOD0(compositor_acquire, std::shared_ptr<compositor::Buffer>());
896- MOCK_METHOD1(compositor_release, void(std::shared_ptr<compositor::Buffer> const&));
897+ MOCK_METHOD0(client_acquire, std::shared_ptr<graphics::Buffer>());
898+ MOCK_METHOD1(client_release, void(std::shared_ptr<graphics::Buffer> const&));
899+ MOCK_METHOD0(compositor_acquire, std::shared_ptr<graphics::Buffer>());
900+ MOCK_METHOD1(compositor_release, void(std::shared_ptr<graphics::Buffer> const&));
901 MOCK_METHOD1(allow_framedropping, void(bool));
902 MOCK_CONST_METHOD0(properties, compositor::BufferProperties());
903 MOCK_METHOD0(force_client_abort, void());
904
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 class MockBufferInitializer : public graphics::BufferInitializer
910 {
911 public:
912- MOCK_METHOD1(operator_call, void(compositor::Buffer& buffer));
913+ MOCK_METHOD1(operator_call, void(graphics::Buffer& buffer));
914
915- void operator()(compositor::Buffer& buffer)
916+ void operator()(graphics::Buffer& buffer)
917 {
918 operator_call(buffer);
919 }
920
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 {
926 struct MockBufferStream : public surfaces::BufferStream
927 {
928- MOCK_METHOD0(secure_client_buffer, std::shared_ptr<compositor::Buffer>());
929- MOCK_METHOD0(lock_back_buffer, std::shared_ptr<compositor::Buffer>());
930+ MOCK_METHOD0(secure_client_buffer, std::shared_ptr<graphics::Buffer>());
931+ MOCK_METHOD0(lock_back_buffer, std::shared_ptr<graphics::Buffer>());
932
933 MOCK_METHOD0(get_stream_pixel_format, geometry::PixelFormat());
934 MOCK_METHOD0(stream_size, geometry::Size());
935
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 MOCK_CONST_METHOD0(display_size, geometry::Size());
941 MOCK_CONST_METHOD0(display_format, geometry::PixelFormat());
942 MOCK_CONST_METHOD0(number_of_framebuffers_available, unsigned int());
943- MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::compositor::Buffer> const&));
944+ MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::graphics::Buffer> const&));
945 MOCK_METHOD1(sync_to_display, void(bool));
946 };
947 }
948
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 MOCK_CONST_METHOD0(display_size, geometry::Size());
954 MOCK_CONST_METHOD0(display_format, geometry::PixelFormat());
955 MOCK_CONST_METHOD0(number_of_framebuffers_available, unsigned int());
956- MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::compositor::Buffer> const&));
957+ MOCK_METHOD1(set_next_frontbuffer, void(std::shared_ptr<mir::graphics::Buffer> const&));
958 MOCK_METHOD1(sync_to_display, void(bool));
959 };
960
961
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 {
967 ~MockHWCOrganizer() noexcept {}
968 MOCK_CONST_METHOD0(native_list, graphics::android::LayerList const&());
969- MOCK_METHOD1(set_fb_target, void(std::shared_ptr<compositor::Buffer> const&));
970+ MOCK_METHOD1(set_fb_target, void(std::shared_ptr<graphics::Buffer> const&));
971 };
972
973 }
974
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 {
980 struct MockInterpreterResourceCache : public graphics::android::InterpreterResourceCache
981 {
982- MOCK_METHOD2(store_buffer, void(std::shared_ptr<compositor::Buffer>const&, ANativeWindowBuffer*));
983- MOCK_METHOD1(retrieve_buffer, std::shared_ptr<compositor::Buffer>(ANativeWindowBuffer*));
984+ MOCK_METHOD2(store_buffer, void(std::shared_ptr<graphics::Buffer>const&, ANativeWindowBuffer*));
985+ MOCK_METHOD1(retrieve_buffer, std::shared_ptr<graphics::Buffer>(ANativeWindowBuffer*));
986 };
987 }
988 }
989
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
995 MOCK_METHOD0(destroy, void());
996 MOCK_METHOD0(force_requests_to_complete, void());
997- MOCK_METHOD0(advance_client_buffer, std::shared_ptr<compositor::Buffer>());
998+ MOCK_METHOD0(advance_client_buffer, std::shared_ptr<graphics::Buffer>());
999
1000 MOCK_CONST_METHOD0(name, std::string());
1001 MOCK_CONST_METHOD0(size, geometry::Size());
1002
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 MockSwapper() {}
1008 ~MockSwapper() noexcept {}
1009
1010- MockSwapper(std::shared_ptr<compositor::Buffer> buffer)
1011+ MockSwapper(std::shared_ptr<graphics::Buffer> buffer)
1012 : default_buffer(buffer)
1013 {
1014 using namespace testing;
1015@@ -46,17 +46,17 @@
1016 .WillByDefault(Return(default_buffer));
1017 }
1018
1019- MOCK_METHOD0(client_acquire, std::shared_ptr<compositor::Buffer>());
1020- MOCK_METHOD1(client_release, void(std::shared_ptr<compositor::Buffer> const&));
1021- MOCK_METHOD0(compositor_acquire, std::shared_ptr<compositor::Buffer>());
1022- MOCK_METHOD1(compositor_release, void(std::shared_ptr<compositor::Buffer> const&));
1023+ MOCK_METHOD0(client_acquire, std::shared_ptr<graphics::Buffer>());
1024+ MOCK_METHOD1(client_release, void(std::shared_ptr<graphics::Buffer> const&));
1025+ MOCK_METHOD0(compositor_acquire, std::shared_ptr<graphics::Buffer>());
1026+ MOCK_METHOD1(compositor_release, void(std::shared_ptr<graphics::Buffer> const&));
1027 MOCK_METHOD0(force_client_abort, void());
1028 MOCK_METHOD0(force_requests_to_complete, void());
1029
1030- MOCK_METHOD2(end_responsibility, void(std::vector<std::shared_ptr<compositor::Buffer>>&, size_t&));
1031+ MOCK_METHOD2(end_responsibility, void(std::vector<std::shared_ptr<graphics::Buffer>>&, size_t&));
1032
1033 private:
1034- std::shared_ptr<compositor::Buffer> default_buffer;
1035+ std::shared_ptr<graphics::Buffer> default_buffer;
1036 };
1037
1038 }
1039
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
1045 MOCK_CONST_METHOD4(create_swapper_reuse_buffers,
1046 std::shared_ptr<compositor::BufferSwapper>(compositor::BufferProperties const&,
1047- std::vector<std::shared_ptr<compositor::Buffer>>&, size_t, compositor::SwapperType));
1048+ std::vector<std::shared_ptr<graphics::Buffer>>&, size_t, compositor::SwapperType));
1049 MOCK_CONST_METHOD3(create_swapper_new_buffers,
1050 std::shared_ptr<compositor::BufferSwapper>(
1051 compositor::BufferProperties&, compositor::BufferProperties const&, compositor::SwapperType));
1052
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 }
1058
1059 void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const&,
1060- std::shared_ptr<compositor::Buffer> const&) const
1061+ std::shared_ptr<graphics::Buffer> const&) const
1062 {
1063 }
1064 };
1065
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 #include "mir/compositor/buffer_basic.h"
1071 #include "mir/compositor/buffer_properties.h"
1072 #include "mir/geometry/size.h"
1073-#include "mir/compositor/buffer_id.h"
1074+#include "mir/graphics/buffer_id.h"
1075
1076 namespace mir
1077 {
1078
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 stub_client_buffer = std::make_shared<StubBuffer>();
1084 stub_compositor_buffer = std::make_shared<StubBuffer>();
1085 }
1086- std::shared_ptr<compositor::Buffer> secure_client_buffer()
1087+ std::shared_ptr<graphics::Buffer> secure_client_buffer()
1088 {
1089 return stub_client_buffer;
1090 }
1091
1092- std::shared_ptr<compositor::Buffer> lock_back_buffer()
1093+ std::shared_ptr<graphics::Buffer> lock_back_buffer()
1094 {
1095 return stub_compositor_buffer;
1096 }
1097@@ -65,8 +65,8 @@
1098 {
1099 }
1100
1101- std::shared_ptr<compositor::Buffer> stub_client_buffer;
1102- std::shared_ptr<compositor::Buffer> stub_compositor_buffer;
1103+ std::shared_ptr<graphics::Buffer> stub_client_buffer;
1104+ std::shared_ptr<graphics::Buffer> stub_compositor_buffer;
1105 };
1106
1107 }
1108
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 return geometry::PixelFormat();
1114 }
1115
1116- std::shared_ptr<compositor::Buffer> advance_client_buffer()
1117+ std::shared_ptr<graphics::Buffer> advance_client_buffer()
1118 {
1119- return std::shared_ptr<compositor::Buffer>();
1120+ return std::shared_ptr<graphics::Buffer>();
1121 }
1122
1123 virtual int configure(MirSurfaceAttrib, int)
1124
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 #include "mir/compositor/buffer_basic.h"
1130 #include <atomic>
1131
1132+namespace mg = mir::graphics;
1133+
1134 namespace mir
1135 {
1136 namespace compositor
1137 {
1138 namespace
1139 {
1140-BufferID generate_next_buffer_id()
1141+mg::BufferID generate_next_buffer_id()
1142 {
1143 static std::atomic<uint32_t> next_id{0};
1144
1145- auto id = BufferID(next_id.fetch_add(1));
1146+ auto id = mg::BufferID(next_id.fetch_add(1));
1147
1148 // Avoid returning an "invalid" id. (Not sure we need invalid ids)
1149- while (!id.is_valid()) id = BufferID(next_id.fetch_add(1));
1150+ while (!id.is_valid()) id = mg::BufferID(next_id.fetch_add(1));
1151
1152 return id;
1153 }
1154
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
1160 namespace mir
1161 {
1162+namespace graphics { class Buffer; }
1163+
1164 namespace compositor
1165 {
1166-class Buffer;
1167
1168 class BufferBundle
1169 {
1170 public:
1171 virtual ~BufferBundle() noexcept {}
1172- virtual std::shared_ptr<Buffer> client_acquire() = 0;
1173- virtual void client_release(std::shared_ptr<Buffer> const&) = 0;
1174- virtual std::shared_ptr<Buffer> compositor_acquire() = 0;
1175- virtual void compositor_release(std::shared_ptr<Buffer> const&) = 0;
1176+ virtual std::shared_ptr<graphics::Buffer> client_acquire() = 0;
1177+ virtual void client_release(std::shared_ptr<graphics::Buffer> const&) = 0;
1178+ virtual std::shared_ptr<graphics::Buffer> compositor_acquire() = 0;
1179+ virtual void compositor_release(std::shared_ptr<graphics::Buffer> const&) = 0;
1180
1181 virtual BufferProperties properties() const = 0;
1182 virtual void allow_framedropping(bool dropping_allowed) = 0;
1183
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 #include "mir/compositor/buffer_stream_surfaces.h"
1189 #include "mir/compositor/buffer_properties.h"
1190 #include "switching_bundle.h"
1191-#include "mir/compositor/buffer.h"
1192-#include "mir/compositor/buffer_id.h"
1193+#include "mir/graphics/buffer.h"
1194+#include "mir/graphics/buffer_id.h"
1195 #include "mir/compositor/graphic_buffer_allocator.h"
1196 #include "mir/graphics/display.h"
1197
1198
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 #include "temporary_buffers.h"
1204
1205 namespace mc = mir::compositor;
1206+namespace mg = mir::graphics;
1207 namespace geom = mir::geometry;
1208
1209 mc::BufferStreamSurfaces::BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& buffer_bundle)
1210@@ -38,12 +39,12 @@
1211 {
1212 }
1213
1214-std::shared_ptr<mc::Buffer> mc::BufferStreamSurfaces::lock_back_buffer()
1215+std::shared_ptr<mg::Buffer> mc::BufferStreamSurfaces::lock_back_buffer()
1216 {
1217 return std::make_shared<mc::TemporaryCompositorBuffer>(back_buffer_strategy);
1218 }
1219
1220-std::shared_ptr<mc::Buffer> mc::BufferStreamSurfaces::secure_client_buffer()
1221+std::shared_ptr<mg::Buffer> mc::BufferStreamSurfaces::secure_client_buffer()
1222 {
1223 return std::make_shared<mc::TemporaryClientBuffer>(buffer_bundle);
1224 }
1225
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 #include <boost/throw_exception.hpp>
1231
1232 namespace mc = mir::compositor;
1233+namespace mg = mir::graphics;
1234
1235-mc::BufferSwapperMulti::BufferSwapperMulti(std::vector<std::shared_ptr<compositor::Buffer>>& buffer_list, size_t swapper_size)
1236+mc::BufferSwapperMulti::BufferSwapperMulti(std::vector<std::shared_ptr<mg::Buffer>>& buffer_list, size_t swapper_size)
1237 : in_use_by_client(0),
1238 swapper_size(swapper_size),
1239 clients_trying_to_acquire(0),
1240@@ -39,7 +40,7 @@
1241 }
1242 }
1243
1244-std::shared_ptr<mc::Buffer> mc::BufferSwapperMulti::client_acquire()
1245+std::shared_ptr<mg::Buffer> mc::BufferSwapperMulti::client_acquire()
1246 {
1247 std::unique_lock<std::mutex> lk(swapper_mutex);
1248
1249@@ -71,7 +72,7 @@
1250 return dequeued_buffer;
1251 }
1252
1253-void mc::BufferSwapperMulti::client_release(std::shared_ptr<Buffer> const& queued_buffer)
1254+void mc::BufferSwapperMulti::client_release(std::shared_ptr<mg::Buffer> const& queued_buffer)
1255 {
1256 std::unique_lock<std::mutex> lk(swapper_mutex);
1257
1258@@ -87,11 +88,11 @@
1259 */
1260 }
1261
1262-std::shared_ptr<mc::Buffer> mc::BufferSwapperMulti::compositor_acquire()
1263+std::shared_ptr<mg::Buffer> mc::BufferSwapperMulti::compositor_acquire()
1264 {
1265 std::unique_lock<std::mutex> lk(swapper_mutex);
1266
1267- std::shared_ptr<mc::Buffer> dequeued_buffer;
1268+ std::shared_ptr<mg::Buffer> dequeued_buffer;
1269
1270 if (!compositor_queue.empty())
1271 {
1272@@ -111,7 +112,7 @@
1273 return dequeued_buffer;
1274 }
1275
1276-void mc::BufferSwapperMulti::compositor_release(std::shared_ptr<Buffer> const& released_buffer)
1277+void mc::BufferSwapperMulti::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer)
1278 {
1279 std::unique_lock<std::mutex> lk(swapper_mutex);
1280 client_queue.push_back(released_buffer);
1281@@ -152,7 +153,7 @@
1282 }
1283
1284
1285-void mc::BufferSwapperMulti::end_responsibility(std::vector<std::shared_ptr<Buffer>>& buffers,
1286+void mc::BufferSwapperMulti::end_responsibility(std::vector<std::shared_ptr<mg::Buffer>>& buffers,
1287 size_t& size)
1288 {
1289 std::unique_lock<std::mutex> lk(swapper_mutex);
1290
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 #include "mir/compositor/buffer_swapper_spin.h"
1296
1297 namespace mc = mir::compositor;
1298-
1299+namespace mg = mir::graphics;
1300
1301 mc::BufferSwapperSpin::BufferSwapperSpin(
1302- std::vector<std::shared_ptr<mc::Buffer>>& buffer_list, size_t swapper_size)
1303+ std::vector<std::shared_ptr<mg::Buffer>>& buffer_list, size_t swapper_size)
1304 : buffer_queue{buffer_list.begin(), buffer_list.end()},
1305 in_use_by_client{0},
1306 swapper_size{swapper_size}
1307@@ -34,7 +34,7 @@
1308 }
1309 }
1310
1311-std::shared_ptr<mc::Buffer> mc::BufferSwapperSpin::client_acquire()
1312+std::shared_ptr<mg::Buffer> mc::BufferSwapperSpin::client_acquire()
1313 {
1314 std::lock_guard<std::mutex> lg{swapper_mutex};
1315
1316@@ -54,7 +54,7 @@
1317 return dequeued_buffer;
1318 }
1319
1320-void mc::BufferSwapperSpin::client_release(std::shared_ptr<Buffer> const& queued_buffer)
1321+void mc::BufferSwapperSpin::client_release(std::shared_ptr<mg::Buffer> const& queued_buffer)
1322 {
1323 std::lock_guard<std::mutex> lg{swapper_mutex};
1324
1325@@ -63,7 +63,7 @@
1326 client_submitted_new_buffer = true;
1327 }
1328
1329-std::shared_ptr<mc::Buffer> mc::BufferSwapperSpin::compositor_acquire()
1330+std::shared_ptr<mg::Buffer> mc::BufferSwapperSpin::compositor_acquire()
1331 {
1332 std::lock_guard<std::mutex> lg{swapper_mutex};
1333
1334@@ -74,7 +74,7 @@
1335 return dequeued_buffer;
1336 }
1337
1338-void mc::BufferSwapperSpin::compositor_release(std::shared_ptr<Buffer> const& released_buffer)
1339+void mc::BufferSwapperSpin::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer)
1340 {
1341 std::lock_guard<std::mutex> lg{swapper_mutex};
1342
1343@@ -99,7 +99,7 @@
1344 }
1345
1346
1347-void mc::BufferSwapperSpin::end_responsibility(std::vector<std::shared_ptr<Buffer>>& buffers,
1348+void mc::BufferSwapperSpin::end_responsibility(std::vector<std::shared_ptr<mg::Buffer>>& buffers,
1349 size_t& size)
1350 {
1351 std::lock_guard<std::mutex> lg{swapper_mutex};
1352
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 #include <algorithm>
1358
1359 namespace mc = mir::compositor;
1360+namespace mg = mir::graphics;
1361
1362 mc::MultiAcquisitionBackBufferStrategy::MultiAcquisitionBackBufferStrategy(
1363 std::shared_ptr<BufferBundle> const& buffer_bundle)
1364@@ -30,7 +31,7 @@
1365 {
1366 }
1367
1368-std::shared_ptr<mc::Buffer> mc::MultiAcquisitionBackBufferStrategy::acquire()
1369+std::shared_ptr<mg::Buffer> mc::MultiAcquisitionBackBufferStrategy::acquire()
1370 {
1371 std::lock_guard<std::mutex> lg{mutex};
1372
1373@@ -41,7 +42,7 @@
1374 return info.partly_released == false;
1375 });
1376
1377- std::shared_ptr<mc::Buffer> buffer;
1378+ std::shared_ptr<mg::Buffer> buffer;
1379
1380 if (iter != acquired_buffers.end())
1381 {
1382@@ -78,7 +79,7 @@
1383 return buffer;
1384 }
1385
1386-void mc::MultiAcquisitionBackBufferStrategy::release(std::shared_ptr<Buffer> const& buffer)
1387+void mc::MultiAcquisitionBackBufferStrategy::release(std::shared_ptr<mg::Buffer> const& buffer)
1388 {
1389 std::lock_guard<std::mutex> lg{mutex};
1390
1391@@ -108,7 +109,7 @@
1392 }
1393
1394 std::vector<mc::detail::AcquiredBufferInfo>::iterator
1395-mc::MultiAcquisitionBackBufferStrategy::find_info(std::shared_ptr<Buffer> const& buffer)
1396+mc::MultiAcquisitionBackBufferStrategy::find_info(std::shared_ptr<mg::Buffer> const& buffer)
1397 {
1398 return std::find_if(acquired_buffers.begin(), acquired_buffers.end(),
1399 [&buffer] (detail::AcquiredBufferInfo const& info)
1400
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 #include "mir/compositor/graphic_buffer_allocator.h"
1406 #include "mir/compositor/buffer_swapper_multi.h"
1407 #include "mir/compositor/buffer_swapper_spin.h"
1408-#include "mir/compositor/buffer_id.h"
1409+#include "mir/graphics/buffer_id.h"
1410 #include "mir/geometry/dimensions.h"
1411 #include "switching_bundle.h"
1412
1413@@ -31,6 +31,7 @@
1414 #include <cassert>
1415
1416 namespace mc = mir::compositor;
1417+namespace mg = mir::graphics;
1418
1419 mc::SwapperFactory::SwapperFactory(
1420 std::shared_ptr<GraphicBufferAllocator> const& gr_alloc,
1421@@ -48,7 +49,7 @@
1422 }
1423
1424 void mc::SwapperFactory::change_swapper_size(
1425- std::vector<std::shared_ptr<mc::Buffer>>& list,
1426+ std::vector<std::shared_ptr<mg::Buffer>>& list,
1427 size_t const desired_size, size_t current_size, BufferProperties const& buffer_properties) const
1428 {
1429 while (current_size < desired_size)
1430@@ -72,7 +73,7 @@
1431 }
1432
1433 std::shared_ptr<mc::BufferSwapper> mc::SwapperFactory::create_swapper_reuse_buffers(
1434- BufferProperties const& buffer_properties, std::vector<std::shared_ptr<Buffer>>& list,
1435+ BufferProperties const& buffer_properties, std::vector<std::shared_ptr<mg::Buffer>>& list,
1436 size_t buffer_num, SwapperType type) const
1437 {
1438 if (type == mc::SwapperType::synchronous)
1439@@ -91,7 +92,7 @@
1440 BufferProperties& actual_buffer_properties,
1441 BufferProperties const& requested_buffer_properties, SwapperType type) const
1442 {
1443- std::vector<std::shared_ptr<mc::Buffer>> list;
1444+ std::vector<std::shared_ptr<mg::Buffer>> list;
1445 std::shared_ptr<mc::BufferSwapper> new_swapper;
1446
1447 if (type == mc::SwapperType::synchronous)
1448
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 #include <boost/throw_exception.hpp>
1454
1455 namespace mc=mir::compositor;
1456+namespace mg = mir::graphics;
1457
1458 mc::SwitchingBundle::SwitchingBundle(
1459 std::shared_ptr<BufferAllocationStrategy> const& swapper_factory, BufferProperties const& property_request)
1460@@ -34,12 +35,12 @@
1461 {
1462 }
1463
1464-std::shared_ptr<mc::Buffer> mc::SwitchingBundle::client_acquire()
1465+std::shared_ptr<mg::Buffer> mc::SwitchingBundle::client_acquire()
1466 {
1467 /* lock is for use of 'swapper' below' */
1468 std::unique_lock<mc::ReadLock> lk(rw_lock);
1469
1470- std::shared_ptr<mc::Buffer> buffer = nullptr;
1471+ std::shared_ptr<mg::Buffer> buffer = nullptr;
1472 while (!buffer)
1473 {
1474 try
1475@@ -55,19 +56,19 @@
1476 return buffer;
1477 }
1478
1479-void mc::SwitchingBundle::client_release(std::shared_ptr<mc::Buffer> const& released_buffer)
1480+void mc::SwitchingBundle::client_release(std::shared_ptr<mg::Buffer> const& released_buffer)
1481 {
1482 std::unique_lock<mc::ReadLock> lk(rw_lock);
1483 return swapper->client_release(released_buffer);
1484 }
1485
1486-std::shared_ptr<mc::Buffer> mc::SwitchingBundle::compositor_acquire()
1487+std::shared_ptr<mg::Buffer> mc::SwitchingBundle::compositor_acquire()
1488 {
1489 std::unique_lock<mc::ReadLock> lk(rw_lock);
1490 return swapper->compositor_acquire();
1491 }
1492
1493-void mc::SwitchingBundle::compositor_release(std::shared_ptr<mc::Buffer> const& released_buffer)
1494+void mc::SwitchingBundle::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer)
1495 {
1496 std::unique_lock<mc::ReadLock> lk(rw_lock);
1497 return swapper->compositor_release(released_buffer);
1498@@ -87,7 +88,7 @@
1499 }
1500
1501 std::unique_lock<mc::WriteLock> lk(rw_lock);
1502- std::vector<std::shared_ptr<mc::Buffer>> list{};
1503+ std::vector<std::shared_ptr<mg::Buffer>> list{};
1504 size_t size = 0;
1505 swapper->end_responsibility(list, size);
1506
1507
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
1513 BufferProperties properties() const;
1514
1515- std::shared_ptr<Buffer> client_acquire();
1516- void client_release(std::shared_ptr<Buffer> const&);
1517- std::shared_ptr<Buffer> compositor_acquire();
1518- void compositor_release(std::shared_ptr<Buffer> const& released_buffer);
1519+ std::shared_ptr<graphics::Buffer> client_acquire();
1520+ void client_release(std::shared_ptr<graphics::Buffer> const&);
1521+ std::shared_ptr<graphics::Buffer> compositor_acquire();
1522+ void compositor_release(std::shared_ptr<graphics::Buffer> const& released_buffer);
1523 void force_requests_to_complete();
1524 void allow_framedropping(bool dropping_allowed);
1525
1526
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 #include "temporary_buffers.h"
1532
1533 namespace mc=mir::compositor;
1534+namespace mg=mir::graphics;
1535 namespace geom=mir::geometry;
1536
1537-mc::TemporaryBuffer::TemporaryBuffer(std::shared_ptr<Buffer> const& real_buffer)
1538+mc::TemporaryBuffer::TemporaryBuffer(std::shared_ptr<mg::Buffer> const& real_buffer)
1539 : buffer(real_buffer)
1540 {
1541 }
1542@@ -69,7 +70,7 @@
1543 return buffer->pixel_format();
1544 }
1545
1546-mc::BufferID mc::TemporaryBuffer::id() const
1547+mg::BufferID mc::TemporaryBuffer::id() const
1548 {
1549 return buffer->id();
1550 }
1551
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 #ifndef MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_
1557 #define MIR_COMPOSITOR_TEMPORARY_BUFFERS_H_
1558
1559-#include "mir/compositor/buffer.h"
1560-#include "mir/compositor/buffer_id.h"
1561+#include "mir/graphics/buffer.h"
1562+#include "mir/graphics/buffer_id.h"
1563+
1564+namespace mg = mir::graphics;
1565
1566 namespace mir
1567 {
1568 namespace compositor
1569 {
1570
1571-class BufferID;
1572 class BufferBundle;
1573 class BackBufferStrategy;
1574
1575-class TemporaryBuffer : public Buffer
1576+class TemporaryBuffer : public mg::Buffer
1577 {
1578 public:
1579 geometry::Size size() const;
1580 geometry::Stride stride() const;
1581 geometry::PixelFormat pixel_format() const;
1582- BufferID id() const;
1583+ mg::BufferID id() const;
1584 void bind_to_texture();
1585 std::shared_ptr<MirNativeBuffer> native_buffer_handle() const;
1586
1587 protected:
1588- explicit TemporaryBuffer(std::shared_ptr<Buffer> const& real_buffer);
1589- std::shared_ptr<Buffer> const buffer;
1590+ explicit TemporaryBuffer(std::shared_ptr<mg::Buffer> const& real_buffer);
1591+ std::shared_ptr<mg::Buffer> const buffer;
1592 };
1593
1594 class TemporaryClientBuffer : public TemporaryBuffer
1595
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 });
1601 }
1602
1603-std::shared_ptr<msh::PixelBuffer>
1604+std::shared_ptr<mg::PixelBuffer>
1605 mir::DefaultServerConfiguration::the_shell_pixel_buffer()
1606 {
1607 return shell_pixel_buffer(
1608
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 #include <algorithm>
1614
1615 #include "client_buffer_tracker.h"
1616-#include "mir/compositor/buffer_id.h"
1617+#include "mir/graphics/buffer_id.h"
1618
1619 namespace mf = mir::frontend;
1620-namespace mc = mir::compositor;
1621+namespace mg = mir::graphics;
1622
1623 mf::ClientBufferTracker::ClientBufferTracker(unsigned int client_cache_size)
1624 : ids(),
1625@@ -30,7 +30,7 @@
1626 {
1627 }
1628
1629-void mf::ClientBufferTracker::add(mc::BufferID const& id)
1630+void mf::ClientBufferTracker::add(mg::BufferID const& id)
1631 {
1632 auto existing_id = std::find(ids.begin(), ids.end(), id);
1633
1634@@ -47,7 +47,7 @@
1635 ids.pop_back();
1636 }
1637
1638-bool mf::ClientBufferTracker::client_has(mc::BufferID const& id) const
1639+bool mf::ClientBufferTracker::client_has(mg::BufferID const& id) const
1640 {
1641 return std::find(ids.begin(), ids.end(), id) != ids.end();
1642 }
1643
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 namespace mir
1649 {
1650
1651-namespace compositor
1652+namespace graphics
1653 {
1654 class BufferID;
1655 }
1656@@ -48,11 +48,11 @@
1657 /// Add a BufferID to the list of buffers known by the client.
1658 ///
1659 /// Typically this should be done just prior to or just after sending the buffer information
1660- void add(compositor::BufferID const& id);
1661- bool client_has(compositor::BufferID const& id) const;
1662+ void add(graphics::BufferID const& id);
1663+ bool client_has(graphics::BufferID const& id) const;
1664 private:
1665
1666- std::list<compositor::BufferID> ids;
1667+ std::list<graphics::BufferID> ids;
1668 unsigned int const cache_size;
1669 };
1670
1671
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 #include "mir/shell/surface_creation_parameters.h"
1677 #include "mir/frontend/resource_cache.h"
1678 #include "mir_toolkit/common.h"
1679-#include "mir/compositor/buffer_id.h"
1680-#include "mir/compositor/buffer.h"
1681+#include "mir/graphics/buffer_id.h"
1682+#include "mir/graphics/buffer.h"
1683 #include "mir/surfaces/buffer_stream.h"
1684 #include "mir/compositor/graphic_buffer_allocator.h"
1685 #include "mir/geometry/dimensions.h"
1686
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 alloc_device = std::shared_ptr<mga::GraphicAllocAdaptor>(new AndroidAllocAdaptor(alloc_dev_ptr));
1692 }
1693
1694-std::shared_ptr<mc::Buffer> mga::AndroidGraphicBufferAllocator::alloc_buffer(
1695+std::shared_ptr<mg::Buffer> mga::AndroidGraphicBufferAllocator::alloc_buffer(
1696 mc::BufferProperties const& buffer_properties)
1697 {
1698 auto usage = convert_from_compositor_usage(buffer_properties.usage);
1699
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 AndroidGraphicBufferAllocator(
1705 std::shared_ptr<BufferInitializer> const& buffer_initializer);
1706
1707- std::shared_ptr<compositor::Buffer> alloc_buffer(
1708+ std::shared_ptr<graphics::Buffer> alloc_buffer(
1709 compositor::BufferProperties const& buffer_properties);
1710
1711 std::shared_ptr<Buffer> alloc_buffer_platform(
1712
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 #include "internal_client.h"
1718 #include "mir/graphics/platform_ipc_package.h"
1719 #include "mir/graphics/buffer_initializer.h"
1720-#include "mir/compositor/buffer_id.h"
1721+#include "mir/graphics/buffer_id.h"
1722 #include "mir/compositor/buffer_ipc_packer.h"
1723 #include "mir/options/option.h"
1724
1725@@ -78,7 +78,7 @@
1726 }
1727
1728 void mga::AndroidPlatform::fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer,
1729- std::shared_ptr<mc::Buffer> const& buffer) const
1730+ std::shared_ptr<mg::Buffer> const& buffer) const
1731 {
1732 auto native_buffer = buffer->native_buffer_handle();
1733 auto buffer_handle = native_buffer->handle;
1734
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 std::shared_ptr<PlatformIPCPackage> get_ipc_package();
1740 std::shared_ptr<InternalClient> create_internal_client();
1741 void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer,
1742- std::shared_ptr<compositor::Buffer> const& buffer) const;
1743+ std::shared_ptr<graphics::Buffer> const& buffer) const;
1744
1745 private:
1746 // TODO a design that has this and create_buffer_allocator is missing simplicity
1747
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 #include <stdexcept>
1753 #include <vector>
1754
1755+namespace mg = mir::graphics;
1756 namespace mga=mir::graphics::android;
1757 namespace mc=mir::compositor;
1758
1759@@ -39,13 +40,13 @@
1760 {
1761 }
1762
1763-std::vector<std::shared_ptr<mc::Buffer>> mga::DefaultFramebufferFactory::create_buffers(
1764+std::vector<std::shared_ptr<mg::Buffer>> mga::DefaultFramebufferFactory::create_buffers(
1765 std::shared_ptr<DisplaySupportProvider> const& info_provider) const
1766 {
1767 auto size = info_provider->display_size();
1768 auto pf = info_provider->display_format();
1769 auto num_framebuffers = info_provider->number_of_framebuffers_available();
1770- std::vector<std::shared_ptr<mc::Buffer>> buffers;
1771+ std::vector<std::shared_ptr<mg::Buffer>> buffers;
1772 for (auto i = 0u; i < num_framebuffers; ++i)
1773 {
1774 buffers.push_back(buffer_allocator->alloc_buffer_platform(size, pf, mga::BufferUsage::use_framebuffer_gles));
1775@@ -54,7 +55,7 @@
1776 }
1777
1778 std::shared_ptr<mga::FBSwapper> mga::DefaultFramebufferFactory::create_swapper(
1779- std::vector<std::shared_ptr<mc::Buffer>> const& buffers) const
1780+ std::vector<std::shared_ptr<mg::Buffer>> const& buffers) const
1781 {
1782 return std::make_shared<mga::FBSimpleSwapper>(buffers);
1783 }
1784
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
1790 namespace mir
1791 {
1792-namespace compositor { class Buffer; }
1793 namespace graphics
1794 {
1795+class Buffer;
1796+
1797 namespace android
1798 {
1799
1800@@ -43,11 +44,11 @@
1801 private:
1802 std::shared_ptr<GraphicBufferAllocator> const buffer_allocator;
1803
1804- virtual std::vector<std::shared_ptr<compositor::Buffer>> create_buffers(
1805+ virtual std::vector<std::shared_ptr<graphics::Buffer>> create_buffers(
1806 std::shared_ptr<DisplaySupportProvider> const& info_provider) const;
1807
1808 virtual std::shared_ptr<FBSwapper> create_swapper(
1809- std::vector<std::shared_ptr<compositor::Buffer>> const& buffers) const;
1810+ std::vector<std::shared_ptr<graphics::Buffer>> const& buffers) const;
1811 };
1812
1813 }
1814
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
1820 namespace mir
1821 {
1822-namespace compositor
1823+namespace graphics
1824 {
1825 class Buffer;
1826-}
1827-namespace graphics
1828-{
1829+
1830 namespace android
1831 {
1832
1833@@ -44,7 +42,7 @@
1834 virtual unsigned int number_of_framebuffers_available() const = 0;
1835 //this function schedules the next frontbuffer to be "buffer" parameter. depending on implementation, it may
1836 //post immediately, or be deferred.
1837- virtual void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer) = 0;
1838+ virtual void set_next_frontbuffer(std::shared_ptr<graphics::Buffer> const& buffer) = 0;
1839 virtual void sync_to_display(bool sync) = 0;
1840 protected:
1841 DisplaySupportProvider() = default;
1842
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 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
1848 */
1849
1850-#include "mir/compositor/buffer.h"
1851+#include "mir/graphics/buffer.h"
1852
1853 #include "fb_device.h"
1854 #include "buffer.h"
1855@@ -26,10 +26,10 @@
1856 #include <boost/throw_exception.hpp>
1857 #include <stdexcept>
1858
1859-namespace mc=mir::compositor;
1860+namespace mg = mir::graphics;
1861 namespace mga=mir::graphics::android;
1862 namespace geom=mir::geometry;
1863-
1864+
1865 mga::FBDevice::FBDevice(std::shared_ptr<framebuffer_device_t> const& fbdev)
1866 : fb_device(fbdev)
1867 {
1868@@ -39,7 +39,7 @@
1869 }
1870 }
1871
1872-void mga::FBDevice::set_next_frontbuffer(std::shared_ptr<mc::Buffer> const& buffer)
1873+void mga::FBDevice::set_next_frontbuffer(std::shared_ptr<mg::Buffer> const& buffer)
1874 {
1875 auto handle = buffer->native_buffer_handle();
1876 if (fb_device->post(fb_device.get(), handle->handle) != 0)
1877
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 geometry::PixelFormat display_format() const;
1883 unsigned int number_of_framebuffers_available() const;
1884
1885- void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer);
1886+ void set_next_frontbuffer(std::shared_ptr<graphics::Buffer> const& buffer);
1887 void sync_to_display(bool sync);
1888 private:
1889 std::shared_ptr<framebuffer_device_t> const fb_device;
1890
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 #include <boost/throw_exception.hpp>
1896 #include <stdexcept>
1897
1898-namespace mc=mir::compositor;
1899+namespace mg = mir::graphics;
1900 namespace mga=mir::graphics::android;
1901
1902-std::shared_ptr<mc::Buffer> mga::FBSimpleSwapper::compositor_acquire()
1903+std::shared_ptr<mg::Buffer> mga::FBSimpleSwapper::compositor_acquire()
1904 {
1905 std::unique_lock<std::mutex> lk(queue_lock);
1906 while (queue.empty())
1907@@ -38,7 +38,7 @@
1908 return buffer;
1909 }
1910
1911-void mga::FBSimpleSwapper::compositor_release(std::shared_ptr<mc::Buffer> const& released_buffer)
1912+void mga::FBSimpleSwapper::compositor_release(std::shared_ptr<mg::Buffer> const& released_buffer)
1913 {
1914 std::unique_lock<std::mutex> lk(queue_lock);
1915
1916
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 }
1922 }
1923
1924- std::shared_ptr<compositor::Buffer> compositor_acquire();
1925- void compositor_release(std::shared_ptr<compositor::Buffer> const& released_buffer);
1926+ std::shared_ptr<Buffer> compositor_acquire();
1927+ void compositor_release(std::shared_ptr<Buffer> const& released_buffer);
1928
1929 private:
1930 std::mutex queue_lock;
1931 std::condition_variable cv;
1932
1933- std::queue<std::shared_ptr<compositor::Buffer>> queue;
1934+ std::queue<std::shared_ptr<graphics::Buffer>> queue;
1935 };
1936
1937 }
1938
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
1944 namespace mir
1945 {
1946-namespace compositor
1947-{
1948-class Buffer;
1949-}
1950 namespace graphics
1951 {
1952+class Buffer;
1953+
1954 namespace android
1955 {
1956-
1957-class Buffer;
1958-
1959 //TODO: remove this interface. FBSimpleSwapper should inherit from mc::BufferSwapper
1960 class FBSwapper{
1961 public:
1962 virtual ~FBSwapper() = default;
1963
1964- virtual std::shared_ptr<compositor::Buffer> compositor_acquire() = 0;
1965- virtual void compositor_release(std::shared_ptr<compositor::Buffer> const& released_buffer) = 0;
1966+ virtual std::shared_ptr<Buffer> compositor_acquire() = 0;
1967+ virtual void compositor_release(std::shared_ptr<Buffer> const& released_buffer) = 0;
1968 protected:
1969 FBSwapper() = default;
1970 FBSwapper(FBSwapper const&) = delete;
1971
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 #include <boost/throw_exception.hpp>
1977 #include <stdexcept>
1978
1979-namespace mc=mir::compositor;
1980+namespace mg = mir::graphics;
1981 namespace mga=mir::graphics::android;
1982 namespace geom=mir::geometry;
1983
1984@@ -55,7 +55,7 @@
1985 return fb_device->number_of_framebuffers_available();
1986 }
1987
1988-void mga::HWC10Device::set_next_frontbuffer(std::shared_ptr<mc::Buffer> const& buffer)
1989+void mga::HWC10Device::set_next_frontbuffer(std::shared_ptr<mg::Buffer> const& buffer)
1990 {
1991 fb_device->set_next_frontbuffer(buffer);
1992 }
1993
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 geometry::Size display_size() const;
1999 geometry::PixelFormat display_format() const;
2000 unsigned int number_of_framebuffers_available() const;
2001- void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer);
2002+ void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer);
2003 void sync_to_display(bool sync);
2004
2005 void commit_frame(EGLDisplay dpy, EGLSurface sur);
2006
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 #include <boost/throw_exception.hpp>
2012 #include <stdexcept>
2013
2014-namespace mc=mir::compositor;
2015+namespace mg = mir::graphics;
2016 namespace mga=mir::graphics::android;
2017 namespace geom=mir::geometry;
2018
2019@@ -74,8 +74,8 @@
2020 //us a hint to triple buffer. Taking this hint is currently not supported.
2021 return 2u;
2022 }
2023-
2024-void mga::HWC11Device::set_next_frontbuffer(std::shared_ptr<mc::Buffer> const& buffer)
2025+
2026+void mga::HWC11Device::set_next_frontbuffer(std::shared_ptr<mg::Buffer> const& buffer)
2027 {
2028 layer_organizer->set_fb_target(buffer);
2029
2030
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 {
2036 namespace graphics
2037 {
2038+class Buffer;
2039+
2040 namespace android
2041 {
2042 class HWCLayerOrganizer;
2043@@ -42,7 +44,7 @@
2044 geometry::Size display_size() const;
2045 geometry::PixelFormat display_format() const;
2046 unsigned int number_of_framebuffers_available() const;
2047- void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer);
2048+ void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer);
2049 void sync_to_display(bool sync);
2050
2051 void commit_frame(EGLDisplay dpy, EGLSurface sur);
2052
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 unsigned int number_of_framebuffers_available() const;
2058
2059 virtual geometry::Size display_size() const = 0;
2060- virtual void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer) = 0;
2061+ virtual void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer) = 0;
2062 virtual void commit_frame(EGLDisplay dpy, EGLSurface sur) = 0;
2063
2064 void notify_vsync();
2065
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 virtual geometry::Size display_size() const = 0;
2071 virtual geometry::PixelFormat display_format() const = 0;
2072 virtual unsigned int number_of_framebuffers_available() const = 0;
2073- virtual void set_next_frontbuffer(std::shared_ptr<compositor::Buffer> const& buffer) = 0;
2074+ virtual void set_next_frontbuffer(std::shared_ptr<Buffer> const& buffer) = 0;
2075
2076 virtual void commit_frame(EGLDisplay dpy, EGLSurface sur) = 0;
2077 private:
2078
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
2084 #include <cstring>
2085
2086-namespace mc=mir::compositor;
2087+namespace mg=mir::graphics;
2088 namespace mga=mir::graphics::android;
2089 namespace geom=mir::geometry;
2090
2091@@ -95,7 +95,7 @@
2092 return layer_list;
2093 }
2094
2095-void mga::HWCLayerList::set_fb_target(std::shared_ptr<mc::Buffer> const& buffer)
2096+void mga::HWCLayerList::set_fb_target(std::shared_ptr<mg::Buffer> const& buffer)
2097 {
2098 auto handle = buffer->native_buffer_handle();
2099
2100
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 #include <initializer_list>
2106 namespace mir
2107 {
2108-namespace compositor
2109+namespace graphics
2110 {
2111 class Buffer;
2112-}
2113-namespace graphics
2114-{
2115+
2116 namespace android
2117 {
2118-
2119 class HWCDefaultLayer;
2120 typedef struct std::vector<std::shared_ptr<HWCDefaultLayer>> LayerList;
2121
2122@@ -75,7 +72,7 @@
2123 public:
2124 virtual ~HWCLayerOrganizer() = default;
2125 virtual const LayerList& native_list() const = 0;
2126- virtual void set_fb_target(std::shared_ptr<compositor::Buffer> const&) = 0;
2127+ virtual void set_fb_target(std::shared_ptr<Buffer> const&) = 0;
2128
2129 protected:
2130 HWCLayerOrganizer() = default;
2131@@ -90,7 +87,7 @@
2132 HWCLayerList();
2133 const LayerList& native_list() const;
2134
2135- void set_fb_target(std::shared_ptr<compositor::Buffer> const&);
2136+ void set_fb_target(std::shared_ptr<Buffer> const&);
2137
2138 private:
2139 LayerList layer_list;
2140
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 */
2146
2147 #include "mir/frontend/surface.h"
2148-#include "mir/compositor/buffer.h"
2149+#include "mir/graphics/buffer.h"
2150 #include "internal_client_window.h"
2151 #include "interpreter_resource_cache.h"
2152 #include "android_format_conversion-inl.h"
2153
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 #include <boost/throw_exception.hpp>
2159 #include <stdexcept>
2160
2161+namespace mg = mir::graphics;
2162 namespace mga=mir::graphics::android;
2163-namespace mc=mir::compositor;
2164
2165-void mga::InterpreterCache::store_buffer(std::shared_ptr<compositor::Buffer>const& buffer, ANativeWindowBuffer* key)
2166+void mga::InterpreterCache::store_buffer(std::shared_ptr<mg::Buffer>const& buffer, ANativeWindowBuffer* key)
2167 {
2168 buffers_in_driver[key] = buffer;
2169 }
2170
2171-std::shared_ptr<mc::Buffer> mga::InterpreterCache::retrieve_buffer(ANativeWindowBuffer* returned_handle)
2172+std::shared_ptr<mg::Buffer> mga::InterpreterCache::retrieve_buffer(ANativeWindowBuffer* returned_handle)
2173 {
2174 auto buffer_it = buffers_in_driver.find(returned_handle);
2175 if (buffer_it == buffers_in_driver.end())
2176
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 public:
2182 InterpreterCache() {}
2183
2184- void store_buffer(std::shared_ptr<compositor::Buffer>const& buffer, ANativeWindowBuffer* key);
2185- std::shared_ptr<compositor::Buffer> retrieve_buffer(ANativeWindowBuffer* key);
2186+ void store_buffer(std::shared_ptr<graphics::Buffer>const& buffer, ANativeWindowBuffer* key);
2187+ std::shared_ptr<graphics::Buffer> retrieve_buffer(ANativeWindowBuffer* key);
2188
2189 private:
2190- std::unordered_map<ANativeWindowBuffer*, std::shared_ptr<compositor::Buffer>> buffers_in_driver;
2191+ std::unordered_map<ANativeWindowBuffer*, std::shared_ptr<graphics::Buffer>> buffers_in_driver;
2192 };
2193 }
2194 }
2195
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
2201 namespace mir
2202 {
2203-namespace compositor
2204+namespace graphics
2205 {
2206 class Buffer;
2207-}
2208-namespace graphics
2209-{
2210+
2211 namespace android
2212 {
2213 class InterpreterResourceCache
2214@@ -36,8 +34,8 @@
2215 public:
2216 InterpreterResourceCache() {}
2217
2218- virtual void store_buffer(std::shared_ptr<compositor::Buffer>const& buffer, ANativeWindowBuffer* key) = 0;
2219- virtual std::shared_ptr<compositor::Buffer> retrieve_buffer(ANativeWindowBuffer* key) = 0;
2220+ virtual void store_buffer(std::shared_ptr<graphics::Buffer>const& buffer, ANativeWindowBuffer* key) = 0;
2221+ virtual std::shared_ptr<graphics::Buffer> retrieve_buffer(ANativeWindowBuffer* key) = 0;
2222
2223 protected:
2224 virtual ~InterpreterResourceCache() {}
2225
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 * Kevin DuBois <kevin.dubois@canonical.com>
2231 */
2232
2233-#include "mir/compositor/buffer.h"
2234+#include "mir/graphics/buffer.h"
2235 #include "server_render_window.h"
2236 #include "display_support_provider.h"
2237 #include "fb_swapper.h"
2238
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 assert(buffer_initializer.get() != 0);
2244 }
2245
2246-std::shared_ptr<mc::Buffer> mgg::GBMBufferAllocator::alloc_buffer(
2247+std::shared_ptr<mg::Buffer> mgg::GBMBufferAllocator::alloc_buffer(
2248 mc::BufferProperties const& buffer_properties)
2249 {
2250 uint32_t bo_flags{GBM_BO_USE_RENDERING};
2251@@ -141,7 +141,7 @@
2252 new EGLImageBufferTextureBinder{bo, egl_extensions}};
2253
2254 /* Create the GBMBuffer */
2255- std::shared_ptr<mc::Buffer> buffer{new GBMBuffer{bo, std::move(texture_binder)}};
2256+ std::shared_ptr<mg::Buffer> buffer{new GBMBuffer{bo, std::move(texture_binder)}};
2257
2258 (*buffer_initializer)(*buffer);
2259
2260
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 #define MIR_PLATFORM_GBM_GBM_BUFFER_ALLOCATOR_H_
2266
2267 #include "mir/compositor/graphic_buffer_allocator.h"
2268-#include "mir/compositor/buffer_id.h"
2269+#include "mir/graphics/buffer_id.h"
2270
2271 #include <memory>
2272
2273@@ -41,7 +41,7 @@
2274 GBMBufferAllocator(const std::shared_ptr<GBMPlatform>& platform,
2275 const std::shared_ptr<BufferInitializer>& buffer_initializer);
2276
2277- virtual std::shared_ptr<compositor::Buffer> alloc_buffer(
2278+ virtual std::shared_ptr<Buffer> alloc_buffer(
2279 compositor::BufferProperties const& buffer_properties);
2280
2281 std::vector<geometry::PixelFormat> supported_pixel_formats();
2282
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 }
2288
2289 void mgg::GBMPlatform::fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer,
2290- std::shared_ptr<compositor::Buffer> const& buffer) const
2291+ std::shared_ptr<Buffer> const& buffer) const
2292 {
2293 auto native_handle = buffer->native_buffer_handle();
2294 for(auto i=0; i<native_handle->data_items; i++)
2295
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 std::shared_ptr<InternalClient> create_internal_client();
2301
2302 void fill_ipc_package(std::shared_ptr<compositor::BufferIPCPacker> const& packer,
2303- std::shared_ptr<compositor::Buffer> const& buffer) const;
2304+ std::shared_ptr<Buffer> const& buffer) const;
2305
2306 /* From DRMAuthenticator */
2307 void drm_auth_magic(drm_magic_t magic);
2308
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 #include "mir/graphics/platform_ipc_package.h"
2314 #include "mir/graphics/platform.h"
2315 #include "mir/frontend/surface.h"
2316-#include "mir/compositor/buffer.h"
2317+#include "mir/graphics/buffer.h"
2318
2319 #include "mir_toolkit/mesa/native_display.h"
2320
2321
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 */
2327
2328 #include "mir/frontend/surface.h"
2329-#include "mir/compositor/buffer.h"
2330+#include "mir/graphics/buffer.h"
2331 #include "internal_native_surface.h"
2332 #include <cstring>
2333 namespace mgg = mir::graphics::gbm;
2334
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 {
2340 class Surface;
2341 }
2342-namespace compositor
2343+namespace graphics
2344 {
2345 class Buffer;
2346 }
2347@@ -53,7 +53,7 @@
2348 MirSurfaceParameters* parameters);
2349
2350 std::shared_ptr<frontend::Surface> surface;
2351- std::shared_ptr<compositor::Buffer> current_buffer;
2352+ std::shared_ptr<graphics::Buffer> current_buffer;
2353 };
2354
2355 }
2356
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
2362 #include "mir/graphics/gl_context.h"
2363 #include "mir/graphics/gl_pixel_buffer.h"
2364-#include "mir/compositor/buffer.h"
2365+#include "mir/graphics/buffer.h"
2366
2367 #include <stdexcept>
2368 #include <boost/throw_exception.hpp>
2369@@ -26,7 +26,6 @@
2370 #include <GLES2/gl2ext.h>
2371
2372 namespace mg = mir::graphics;
2373-namespace msh = mir::shell;
2374 namespace geom = mir::geometry;
2375
2376 namespace
2377@@ -79,7 +78,7 @@
2378 glBindFramebuffer(GL_FRAMEBUFFER, fbo);
2379 }
2380
2381-void mg::GLPixelBuffer::fill_from(compositor::Buffer& buffer)
2382+void mg::GLPixelBuffer::fill_from(Buffer& buffer)
2383 {
2384 auto width = buffer.size().width.as_uint32_t();
2385 auto height = buffer.size().height.as_uint32_t();
2386
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 #include "mir/graphics/gl_renderer.h"
2392 #include "mir/graphics/compositing_criteria.h"
2393 #include "mir/surfaces/buffer_stream.h"
2394-#include "mir/compositor/buffer.h"
2395+#include "mir/graphics/buffer.h"
2396
2397 #include <glm/gtc/matrix_transform.hpp>
2398 #include <glm/gtc/type_ptr.hpp>
2399
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
2405 namespace msh = mir::shell;
2406 namespace mc = mir::compositor;
2407+namespace mg = mir::graphics;
2408 namespace mi = mir::input;
2409 namespace ms = mir::surfaces;
2410 namespace geom = mir::geometry;
2411@@ -166,7 +167,7 @@
2412 }
2413 }
2414
2415-std::shared_ptr<mc::Buffer> msh::Surface::advance_client_buffer()
2416+std::shared_ptr<mg::Buffer> msh::Surface::advance_client_buffer()
2417 {
2418 if (auto const& s = surface.lock())
2419 {
2420@@ -187,7 +188,7 @@
2421 }
2422
2423 void msh::Surface::with_most_recent_buffer_do(
2424- std::function<void(mc::Buffer&)> const& exec)
2425+ std::function<void(mg::Buffer&)> const& exec)
2426 {
2427 if (auto const& s = surface.lock())
2428 {
2429
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 */
2435
2436 #include "mir/shell/threaded_snapshot_strategy.h"
2437-#include "mir/shell/pixel_buffer.h"
2438+#include "mir/graphics/pixel_buffer.h"
2439 #include "mir/shell/surface_buffer_access.h"
2440
2441 #include <deque>
2442@@ -41,7 +41,7 @@
2443 class SnapshottingFunctor
2444 {
2445 public:
2446- SnapshottingFunctor(std::shared_ptr<PixelBuffer> const& pixels)
2447+ SnapshottingFunctor(std::shared_ptr<graphics::PixelBuffer> const& pixels)
2448 : running{true}, pixels{pixels}
2449 {
2450 }
2451@@ -72,7 +72,7 @@
2452 void take_snapshot(WorkItem const& wi)
2453 {
2454 wi.surface_buffer_access->with_most_recent_buffer_do(
2455- [this](compositor::Buffer& buffer)
2456+ [this](graphics::Buffer& buffer)
2457 {
2458 pixels->fill_from(buffer);
2459 });
2460@@ -100,7 +100,7 @@
2461
2462 private:
2463 bool running;
2464- std::shared_ptr<PixelBuffer> const pixels;
2465+ std::shared_ptr<graphics::PixelBuffer> const pixels;
2466 std::mutex work_mutex;
2467 std::condition_variable work_cv;
2468 std::deque<WorkItem> work;
2469@@ -110,7 +110,7 @@
2470 }
2471
2472 msh::ThreadedSnapshotStrategy::ThreadedSnapshotStrategy(
2473- std::shared_ptr<PixelBuffer> const& pixels)
2474+ std::shared_ptr<graphics::PixelBuffer> const& pixels)
2475 : pixels{pixels},
2476 functor{new SnapshottingFunctor{pixels}},
2477 thread{std::ref(*functor)}
2478
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 #include "mir/surfaces/surface_state.h"
2484 #include "mir/surfaces/buffer_stream.h"
2485 #include "mir/input/input_channel.h"
2486-#include "mir/compositor/buffer.h"
2487+#include "mir/graphics/buffer.h"
2488
2489 #include <boost/throw_exception.hpp>
2490
2491@@ -104,7 +104,7 @@
2492 return surface_buffer_stream->get_stream_pixel_format();
2493 }
2494
2495-std::shared_ptr<mc::Buffer> ms::Surface::advance_client_buffer()
2496+std::shared_ptr<mg::Buffer> ms::Surface::advance_client_buffer()
2497 {
2498 if (surface_in_startup)
2499 {
2500@@ -123,7 +123,7 @@
2501 surface_buffer_stream->allow_framedropping(allow);
2502 }
2503
2504-std::shared_ptr<mc::Buffer> ms::Surface::compositor_buffer() const
2505+std::shared_ptr<mg::Buffer> ms::Surface::compositor_buffer() const
2506 {
2507 return surface_buffer_stream->lock_back_buffer();
2508 }
2509
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
2515 geom::Size size;
2516 geom::PixelFormat pf;
2517- mc::BufferID id1;
2518- mc::BufferID id2;
2519+ mg::BufferID id1;
2520+ mg::BufferID id2;
2521 std::shared_ptr<mtd::TestGrallocMapper> buffer_converter;
2522 std::shared_ptr<mtf::Process> client_process;
2523
2524 std::shared_ptr<MirNativeBuffer> handle;
2525 std::shared_ptr<MirNativeBuffer> second_handle;
2526
2527- std::shared_ptr<mc::Buffer> android_buffer;
2528- std::shared_ptr<mc::Buffer> second_android_buffer;
2529+ std::shared_ptr<mg::Buffer> android_buffer;
2530+ std::shared_ptr<mg::Buffer> second_android_buffer;
2531 std::shared_ptr<mga::AndroidGraphicBufferAllocator> allocator;
2532
2533 static std::shared_ptr<mtf::Process> render_single_client_process;
2534
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 #include <chrono>
2540
2541 namespace mc = mir::compositor;
2542+namespace mg = mir::graphics;
2543 namespace ms = mir::surfaces;
2544 namespace mt = mir::testing;
2545 namespace mtd = mir::test::doubles;
2546@@ -43,7 +44,7 @@
2547 {
2548 StubBufferAllocator() : id{1} {}
2549
2550- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
2551+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&)
2552 {
2553 mc::BufferProperties properties{geom::Size{id, id},
2554 geom::PixelFormat::abgr_8888,
2555@@ -156,7 +157,7 @@
2556 namespace
2557 {
2558
2559-void client_request_loop(std::shared_ptr<mc::Buffer>& out_buffer,
2560+void client_request_loop(std::shared_ptr<mg::Buffer>& out_buffer,
2561 mt::SynchronizerSpawned& synchronizer,
2562 ms::BufferStream& stream)
2563 {
2564@@ -210,7 +211,7 @@
2565 std::vector<std::unique_ptr<CompositorInfo>> compositors;
2566
2567 mt::Synchronizer client_sync;
2568- std::shared_ptr<mc::Buffer> client_buffer;
2569+ std::shared_ptr<mg::Buffer> client_buffer;
2570 auto client_thread = std::thread(client_request_loop, std::ref(client_buffer),
2571 std::ref(client_sync), std::ref(buffer_stream));
2572
2573
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 #include "multithread_harness.h"
2579
2580 #include "mir/compositor/buffer_swapper_multi.h"
2581-#include "mir/compositor/buffer_id.h"
2582+#include "mir/graphics/buffer_id.h"
2583
2584 #include <thread>
2585 #include <chrono>
2586
2587 namespace mc = mir::compositor;
2588+namespace mg = mir::graphics;
2589 namespace mt = mir::testing;
2590 namespace geom = mir::geometry;
2591 namespace mtd = mir::test::doubles;
2592@@ -60,15 +61,15 @@
2593
2594 void test_distinct_buffers(mc::BufferSwapper& swapper);
2595 void test_valid_buffers(mc::BufferSwapper& swapper);
2596- void test_wait_situation(std::vector<std::shared_ptr<mc::Buffer>>& compositor_output_buffers,
2597- std::vector<std::shared_ptr<mc::Buffer>>& client_output_buffers,
2598+ void test_wait_situation(std::vector<std::shared_ptr<mg::Buffer>>& compositor_output_buffers,
2599+ std::vector<std::shared_ptr<mg::Buffer>>& client_output_buffers,
2600 mc::BufferSwapper& swapper,
2601 unsigned int number_of_client_requests_to_make);
2602 void test_last_posted(mc::BufferSwapper& swapper);
2603
2604- std::shared_ptr<mc::Buffer> buffer_a;
2605- std::shared_ptr<mc::Buffer> buffer_b;
2606- std::shared_ptr<mc::Buffer> buffer_c;
2607+ std::shared_ptr<mg::Buffer> buffer_a;
2608+ std::shared_ptr<mg::Buffer> buffer_b;
2609+ std::shared_ptr<mg::Buffer> buffer_c;
2610 };
2611
2612 void main_test_loop_pause(std::chrono::microseconds duration)
2613@@ -76,7 +77,7 @@
2614 std::this_thread::sleep_for(duration);
2615 }
2616
2617-void client_request_loop(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2618+void client_request_loop(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2619 mc::BufferSwapper& swapper)
2620 {
2621 for(;;)
2622@@ -92,7 +93,7 @@
2623 }
2624 }
2625
2626-void compositor_grab_loop(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2627+void compositor_grab_loop(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2628 mc::BufferSwapper& swapper)
2629 {
2630 for(;;)
2631@@ -111,8 +112,8 @@
2632 buffer */
2633 void BufferSwapperStress::test_distinct_buffers(mc::BufferSwapper& swapper)
2634 {
2635- std::shared_ptr<mc::Buffer> compositor_buffer;
2636- std::shared_ptr<mc::Buffer> client_buffer;
2637+ std::shared_ptr<mg::Buffer> compositor_buffer;
2638+ std::shared_ptr<mg::Buffer> client_buffer;
2639
2640 thread1 = std::thread(compositor_grab_loop, std::ref(compositor_buffer),
2641 std::ref(compositor_controller), std::ref(swapper));
2642@@ -140,18 +141,18 @@
2643
2644 TEST_F(BufferSwapperStress, distinct_and_valid_double_buffers_in_client_and_compositor)
2645 {
2646- auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b};
2647+ auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b};
2648 mc::BufferSwapperMulti double_swapper(double_list, double_list.size());
2649 test_distinct_buffers(double_swapper);
2650 }
2651 TEST_F(BufferSwapperStress, distinct_and_valid_triple_buffers_in_client_and_compositor)
2652 {
2653- auto triple_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c};
2654+ auto triple_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c};
2655 mc::BufferSwapperMulti triple_swapper(triple_list, triple_list.size());
2656 test_distinct_buffers(triple_swapper);
2657 }
2658
2659-void client_request_loop_finite(std::vector<std::shared_ptr<mc::Buffer>>& buffers,
2660+void client_request_loop_finite(std::vector<std::shared_ptr<mg::Buffer>>& buffers,
2661 mt::SynchronizerSpawned& synchronizer,
2662 mc::BufferSwapper& swapper,
2663 int const number_of_requests_to_make)
2664@@ -167,7 +168,7 @@
2665 synchronizer.child_enter_wait();
2666 }
2667
2668-void compositor_grab(std::vector<std::shared_ptr<mc::Buffer>>& buffers,
2669+void compositor_grab(std::vector<std::shared_ptr<mg::Buffer>>& buffers,
2670 mt::SynchronizerSpawned& synchronizer,
2671 mc::BufferSwapper& swapper)
2672 {
2673@@ -180,8 +181,8 @@
2674 synchronizer.child_enter_wait();
2675 }
2676
2677-void BufferSwapperStress::test_wait_situation(std::vector<std::shared_ptr<mc::Buffer>>& compositor_output_buffers,
2678- std::vector<std::shared_ptr<mc::Buffer>>& client_output_buffers,
2679+void BufferSwapperStress::test_wait_situation(std::vector<std::shared_ptr<mg::Buffer>>& compositor_output_buffers,
2680+ std::vector<std::shared_ptr<mg::Buffer>>& client_output_buffers,
2681 mc::BufferSwapper& swapper,
2682 unsigned int const number_of_client_requests_to_make)
2683 {
2684@@ -209,10 +210,10 @@
2685
2686 TEST_F(BufferSwapperStress, double_test_wait_situation)
2687 {
2688- std::vector<std::shared_ptr<mc::Buffer>> client_buffers;
2689- std::vector<std::shared_ptr<mc::Buffer>> compositor_buffers;
2690+ std::vector<std::shared_ptr<mg::Buffer>> client_buffers;
2691+ std::vector<std::shared_ptr<mg::Buffer>> compositor_buffers;
2692 /* a double buffered client should stall on the second request without the compositor running */
2693- auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b};
2694+ auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b};
2695 mc::BufferSwapperMulti double_swapper(double_list, double_list.size());
2696 test_wait_situation(compositor_buffers, client_buffers, double_swapper, 2);
2697
2698@@ -221,9 +222,9 @@
2699
2700 TEST_F(BufferSwapperStress, triple_test_wait_situation)
2701 {
2702- std::vector<std::shared_ptr<mc::Buffer>> client_buffers;
2703- std::vector<std::shared_ptr<mc::Buffer>> compositor_buffers;
2704- auto triple_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c};
2705+ std::vector<std::shared_ptr<mg::Buffer>> client_buffers;
2706+ std::vector<std::shared_ptr<mg::Buffer>> compositor_buffers;
2707+ auto triple_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c};
2708 mc::BufferSwapperMulti triple_swapper(triple_list, triple_list.size());
2709 /* a triple buffered client should stall on the third request without the compositor running */
2710 test_wait_situation(compositor_buffers, client_buffers, triple_swapper, 3);
2711@@ -231,7 +232,7 @@
2712 EXPECT_EQ(client_buffers.at(0), compositor_buffers.at(0));
2713 }
2714
2715-void client_request_loop_with_wait(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2716+void client_request_loop_with_wait(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2717 mc::BufferSwapper& swapper)
2718 {
2719 bool wait_request = false;
2720@@ -249,10 +250,10 @@
2721 }
2722 }
2723
2724-void compositor_grab_loop_with_wait(std::shared_ptr<mc::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2725+void compositor_grab_loop_with_wait(std::shared_ptr<mg::Buffer>& out_buffer, mt::SynchronizerSpawned& synchronizer,
2726 mc::BufferSwapper& swapper)
2727 {
2728- std::shared_ptr<mc::Buffer> buffer_ref;
2729+ std::shared_ptr<mg::Buffer> buffer_ref;
2730 bool wait_request = false;
2731 for(;;)
2732 {
2733@@ -274,8 +275,8 @@
2734
2735 void BufferSwapperStress::test_last_posted(mc::BufferSwapper& swapper)
2736 {
2737- std::shared_ptr<mc::Buffer> compositor_buffer;
2738- std::shared_ptr<mc::Buffer> client_buffer;
2739+ std::shared_ptr<mg::Buffer> compositor_buffer;
2740+ std::shared_ptr<mg::Buffer> client_buffer;
2741
2742 thread1 = std::thread(compositor_grab_loop_with_wait, std::ref(compositor_buffer), std::ref(compositor_controller), std::ref(swapper));
2743 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
2746 TEST_F(BufferSwapperStress, double_test_last_posted)
2747 {
2748- auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b};
2749+ auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b};
2750 mc::BufferSwapperMulti double_swapper(double_list, double_list.size());
2751 test_last_posted(double_swapper);
2752 }
2753
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 #include <chrono>
2759
2760 namespace mc = mir::compositor;
2761+namespace mg = mir::graphics;
2762 namespace mt = mir::testing;
2763 namespace geom = mir::geometry;
2764 namespace mtd = mir::test::doubles;
2765@@ -49,7 +50,7 @@
2766 }
2767 ~MockBufferAllocator() noexcept{}
2768
2769- MOCK_METHOD1(alloc_buffer, std::shared_ptr<mc::Buffer>(mc::BufferProperties const&));
2770+ MOCK_METHOD1(alloc_buffer, std::shared_ptr<mg::Buffer>(mc::BufferProperties const&));
2771 MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>());
2772 };
2773
2774
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 #include "src/server/graphics/gbm/gbm_display.h"
2780 #include "src/server/graphics/gbm/gbm_buffer_allocator.h"
2781 #include "mir/compositor/buffer_basic.h"
2782-#include "mir/compositor/buffer_id.h"
2783+#include "mir/graphics/buffer_id.h"
2784 #include "mir/compositor/buffer_properties.h"
2785 #include "mir/graphics/buffer_initializer.h"
2786 #include "mir_test_doubles/stub_buffer.h"
2787@@ -72,9 +72,9 @@
2788 class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator
2789 {
2790 public:
2791- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
2792+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&)
2793 {
2794- return std::shared_ptr<mc::Buffer>(new StubBufferThread());
2795+ return std::shared_ptr<mg::Buffer>(new StubBufferThread());
2796 }
2797
2798 std::vector<geom::PixelFormat> supported_pixel_formats()
2799@@ -139,13 +139,13 @@
2800 }
2801
2802 std::shared_ptr<mc::GraphicBufferAllocator> allocator;
2803- std::shared_ptr<mc::Buffer> buffer;
2804+ std::shared_ptr<mg::Buffer> buffer;
2805 mc::BufferProperties buffer_properties;
2806 };
2807
2808 struct BufferDestructorThread
2809 {
2810- BufferDestructorThread(std::shared_ptr<mc::Buffer> buffer)
2811+ BufferDestructorThread(std::shared_ptr<mg::Buffer> buffer)
2812 : buffer{std::move(buffer)}
2813 {
2814 }
2815@@ -157,12 +157,12 @@
2816 ASSERT_EQ(EGL_SUCCESS, eglGetError());
2817 }
2818
2819- std::shared_ptr<mc::Buffer> buffer;
2820+ std::shared_ptr<mg::Buffer> buffer;
2821 };
2822
2823 struct BufferTextureInstantiatorThread
2824 {
2825- BufferTextureInstantiatorThread(const std::shared_ptr<mc::Buffer>& buffer)
2826+ BufferTextureInstantiatorThread(const std::shared_ptr<mg::Buffer>& buffer)
2827 : buffer(buffer), exception_thrown(false)
2828 {
2829 }
2830@@ -183,7 +183,7 @@
2831 ASSERT_NE(EGL_SUCCESS, eglGetError());
2832 }
2833
2834- const std::shared_ptr<mc::Buffer>& buffer;
2835+ const std::shared_ptr<mg::Buffer>& buffer;
2836 bool exception_thrown;
2837 };
2838
2839
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 #include "mir/compositor/graphic_buffer_allocator.h"
2845 #include "mir/compositor/compositor.h"
2846 #include "mir/shell/application_session.h"
2847-#include "mir/shell/pixel_buffer.h"
2848+#include "mir/graphics/pixel_buffer.h"
2849 #include "mir/shell/placement_strategy.h"
2850 #include "mir/shell/surface.h"
2851 #include "mir/shell/surface_creation_parameters.h"
2852@@ -73,7 +73,7 @@
2853 {
2854 struct StubBufferAllocator : public mc::GraphicBufferAllocator
2855 {
2856- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const& buffer_properties)
2857+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const& buffer_properties)
2858 {
2859 return std::make_shared<mtd::StubBuffer>(buffer_properties);
2860 }
2861@@ -106,11 +106,11 @@
2862 }
2863
2864
2865- std::shared_ptr<msh::PixelBuffer> the_shell_pixel_buffer() override
2866+ std::shared_ptr<mg::PixelBuffer> the_shell_pixel_buffer() override
2867 {
2868- struct StubPixelBuffer : public msh::PixelBuffer
2869+ struct StubPixelBuffer : public mg::PixelBuffer
2870 {
2871- void fill_from(mc::Buffer&) {}
2872+ void fill_from(mg::Buffer&) {}
2873 void const* as_argb_8888() { return nullptr; }
2874 geom::Size size() const { return geom::Size(); }
2875 geom::Stride stride() const { return geom::Stride(); }
2876
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 */
2882
2883 #include "mir/graphics/display.h"
2884-#include "mir/compositor/buffer.h"
2885+#include "mir/graphics/buffer.h"
2886 #include "mir/compositor/graphic_buffer_allocator.h"
2887
2888 #include "mir_test_framework/display_server_test_fixture.h"
2889@@ -65,9 +65,9 @@
2890 class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator
2891 {
2892 public:
2893- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
2894+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&)
2895 {
2896- return std::shared_ptr<mc::Buffer>(new mtd::StubBuffer());
2897+ return std::shared_ptr<mg::Buffer>(new mtd::StubBuffer());
2898 }
2899
2900 std::vector<geom::PixelFormat> supported_pixel_formats()
2901
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 class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator
2907 {
2908 public:
2909- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
2910+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&)
2911 {
2912- return std::shared_ptr<mc::Buffer>(new mtd::StubBuffer());
2913+ return std::shared_ptr<mg::Buffer>(new mtd::StubBuffer());
2914 }
2915
2916 std::vector<geom::PixelFormat> supported_pixel_formats()
2917
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 #include "src/server/compositor/switching_bundle.h"
2923 #include "mir/compositor/buffer_swapper_multi.h"
2924 #include "mir/compositor/buffer_properties.h"
2925-#include "mir/compositor/buffer_id.h"
2926+#include "mir/graphics/buffer_id.h"
2927 #include "mir/compositor/buffer_basic.h"
2928 #include "mir/graphics/display.h"
2929
2930@@ -68,7 +68,7 @@
2931
2932 MOCK_METHOD1(
2933 alloc_buffer,
2934- std::shared_ptr<mc::Buffer> (mc::BufferProperties const&));
2935+ std::shared_ptr<mg::Buffer> (mc::BufferProperties const&));
2936
2937
2938 std::vector<geom::PixelFormat> supported_pixel_formats()
2939@@ -76,9 +76,9 @@
2940 return std::vector<geom::PixelFormat>();
2941 }
2942
2943- std::unique_ptr<mc::Buffer> on_create_swapper(mc::BufferProperties const&)
2944+ std::unique_ptr<mg::Buffer> on_create_swapper(mc::BufferProperties const&)
2945 {
2946- return std::unique_ptr<mc::Buffer>(new mtd::StubBuffer(::buffer_properties));
2947+ return std::unique_ptr<mg::Buffer>(new mtd::StubBuffer(::buffer_properties));
2948 }
2949
2950 ~MockGraphicBufferAllocator() noexcept {}
2951@@ -235,7 +235,7 @@
2952 actual = requested;
2953 auto stub_buffer_a = std::make_shared<mtd::StubBuffer>(::buffer_properties);
2954 auto stub_buffer_b = std::make_shared<mtd::StubBuffer>(::buffer_properties);
2955- std::vector<std::shared_ptr<mc::Buffer>> list = {stub_buffer_a, stub_buffer_b};
2956+ std::vector<std::shared_ptr<mg::Buffer>> list = {stub_buffer_a, stub_buffer_b};
2957 return std::make_shared<mc::BufferSwapperMulti>(list, list.size());
2958 }
2959
2960@@ -416,10 +416,10 @@
2961 class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator
2962 {
2963 public:
2964- virtual std::shared_ptr<mc::Buffer> alloc_buffer(
2965+ virtual std::shared_ptr<mg::Buffer> alloc_buffer(
2966 mc::BufferProperties const&)
2967 {
2968- return std::unique_ptr<mc::Buffer>(new CountingStubBuffer());
2969+ return std::unique_ptr<mg::Buffer>(new CountingStubBuffer());
2970 }
2971
2972 std::vector<geom::PixelFormat> supported_pixel_formats()
2973
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 {
2979 }
2980
2981- std::shared_ptr<mc::Buffer> secure_client_buffer() { return std::make_shared<mtd::StubBuffer>(); }
2982- std::shared_ptr<mc::Buffer> lock_back_buffer() { return std::make_shared<mtd::StubBuffer>(); }
2983+ std::shared_ptr<mg::Buffer> secure_client_buffer() { return std::make_shared<mtd::StubBuffer>(); }
2984+ std::shared_ptr<mg::Buffer> lock_back_buffer() { return std::make_shared<mtd::StubBuffer>(); }
2985 geom::PixelFormat get_stream_pixel_format() { return geom::PixelFormat::abgr_8888; }
2986 geom::Size stream_size() { return geom::Size{}; }
2987 void force_requests_to_complete() {}
2988
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 class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator
2994 {
2995 public:
2996- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const& properties)
2997+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const& properties)
2998 {
2999- return std::unique_ptr<mc::Buffer>(new mtd::StubBuffer(properties));
3000+ return std::unique_ptr<mg::Buffer>(new mtd::StubBuffer(properties));
3001 }
3002
3003 std::vector<geom::PixelFormat> supported_pixel_formats()
3004
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 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
3010 */
3011
3012-#include "mir/compositor/buffer_id.h"
3013+#include "mir/graphics/buffer_id.h"
3014 #include "mir_test_doubles/stub_buffer.h"
3015
3016 #include <gmock/gmock.h>
3017 #include <gtest/gtest.h>
3018
3019 namespace mc=mir::compositor;
3020+namespace mg = mir::graphics;
3021
3022 TEST(buffer_id, value_set )
3023 {
3024 unsigned int id_as_int = 44;
3025- mc::BufferID id{id_as_int};
3026+ mg::BufferID id{id_as_int};
3027 EXPECT_EQ(id_as_int, id.as_uint32_t());
3028 }
3029
3030@@ -36,8 +37,8 @@
3031 unsigned int id_as_int0 = 44;
3032 unsigned int id_as_int1 = 41;
3033
3034- mc::BufferID id0{id_as_int0};
3035- mc::BufferID id1{id_as_int1};
3036+ mg::BufferID id0{id_as_int0};
3037+ mg::BufferID id1{id_as_int1};
3038
3039 EXPECT_EQ(id0, id0);
3040 EXPECT_EQ(id1, id1);
3041@@ -50,8 +51,8 @@
3042 unsigned int id_as_int0 = 44;
3043 unsigned int id_as_int1 = 41;
3044
3045- mc::BufferID id0{id_as_int0};
3046- mc::BufferID id1{id_as_int1};
3047+ mg::BufferID id0{id_as_int0};
3048+ mg::BufferID id1{id_as_int1};
3049
3050 EXPECT_LT(id1, id0);
3051 }
3052@@ -60,14 +61,14 @@
3053 {
3054 using mir::test::doubles::StubBuffer;
3055 int const ids = 542;
3056- std::vector<mc::BufferID> generated_ids;
3057+ std::vector<mg::BufferID> generated_ids;
3058
3059 for (auto i=0; i < ids; i++)
3060 generated_ids.push_back(StubBuffer().id());
3061
3062 while (!generated_ids.empty())
3063 {
3064- mc::BufferID test_id = generated_ids.back();
3065+ mg::BufferID test_id = generated_ids.back();
3066
3067 generated_ids.pop_back();
3068
3069
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 #include <gtest/gtest.h>
3075
3076 namespace mc = mir::compositor;
3077+namespace mg = mir::graphics;
3078 namespace geom = mir::geometry;
3079 namespace mtd = mir::test::doubles;
3080
3081@@ -34,14 +35,14 @@
3082 buffer_c = std::make_shared<mtd::StubBuffer>();
3083 }
3084
3085- std::shared_ptr<mc::Buffer> buffer_a;
3086- std::shared_ptr<mc::Buffer> buffer_b;
3087- std::shared_ptr<mc::Buffer> buffer_c;
3088+ std::shared_ptr<mg::Buffer> buffer_a;
3089+ std::shared_ptr<mg::Buffer> buffer_b;
3090+ std::shared_ptr<mg::Buffer> buffer_c;
3091 };
3092
3093 TEST_F(BufferSwapperConstruction, basic_double_construction_vector)
3094 {
3095- std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3096+ std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3097
3098 auto use_count_before_a = buffer_a.use_count();
3099 auto use_count_before_b = buffer_b.use_count();
3100@@ -56,7 +57,7 @@
3101
3102 TEST_F(BufferSwapperConstruction, basic_double_construction_initializer)
3103 {
3104- std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b};
3105+ std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b};
3106
3107 auto use_count_before_a = buffer_a.use_count();
3108 auto use_count_before_b = buffer_b.use_count();
3109@@ -72,7 +73,7 @@
3110
3111 TEST_F(BufferSwapperConstruction, basic_triple_construction_initializer)
3112 {
3113- std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3114+ std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3115 auto use_count_before_a = buffer_a.use_count();
3116 auto use_count_before_b = buffer_b.use_count();
3117 auto use_count_before_c = buffer_c.use_count();
3118@@ -88,7 +89,7 @@
3119
3120 TEST_F(BufferSwapperConstruction, buffers_out_come_from_init_double)
3121 {
3122- std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b};
3123+ std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b};
3124 mc::BufferSwapperMulti swapper(buffers, buffers.size());
3125
3126 auto buffer_1 = swapper.compositor_acquire();
3127@@ -101,7 +102,7 @@
3128
3129 TEST_F(BufferSwapperConstruction, buffers_out_come_from_init_triple)
3130 {
3131- std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3132+ std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3133 mc::BufferSwapperMulti swapper(buffers, buffers.size());
3134
3135 auto buffer_1 = swapper.compositor_acquire();
3136@@ -118,11 +119,11 @@
3137
3138 TEST_F(BufferSwapperConstruction, buffer_transfer_triple_all_owned)
3139 {
3140- std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3141+ std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3142 mc::BufferSwapperMulti swapper(buffers, buffers.size());
3143
3144 size_t test_size;
3145- std::vector<std::shared_ptr<mc::Buffer>> list;
3146+ std::vector<std::shared_ptr<mg::Buffer>> list;
3147 swapper.end_responsibility(list, test_size);
3148
3149 auto res1 = std::find(list.begin(), list.end(), buffer_a);
3150@@ -138,13 +139,13 @@
3151
3152 TEST_F(BufferSwapperConstruction, buffer_transfer_triple_some_not_owned)
3153 {
3154- std::vector<std::shared_ptr<mc::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3155+ std::vector<std::shared_ptr<mg::Buffer>> buffers{buffer_a, buffer_b, buffer_c};
3156 mc::BufferSwapperMulti swapper(buffers, buffers.size());
3157
3158 auto acquired_buffer = swapper.client_acquire();
3159
3160 size_t test_size;
3161- std::vector<std::shared_ptr<mc::Buffer>> list;
3162+ std::vector<std::shared_ptr<mg::Buffer>> list;
3163 swapper.end_responsibility(list, test_size);
3164
3165 auto res1 = std::find(list.begin(), list.end(), acquired_buffer);
3166
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 #include "mir_test_doubles/stub_buffer.h"
3172
3173 #include "mir/compositor/buffer_swapper_multi.h"
3174-#include "mir/compositor/buffer_id.h"
3175+#include "mir/graphics/buffer_id.h"
3176
3177 #include <gmock/gmock.h>
3178 #include <gtest/gtest.h>
3179@@ -29,6 +29,7 @@
3180 #include <thread>
3181
3182 namespace mc = mir::compositor;
3183+namespace mg = mir::graphics;
3184 namespace geom = mir::geometry;
3185 namespace mtd = mir::test::doubles;
3186
3187@@ -41,13 +42,13 @@
3188 buffer_a = std::make_shared<mtd::StubBuffer>();
3189 buffer_b = std::make_shared<mtd::StubBuffer>();
3190
3191- auto double_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b};
3192+ auto double_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b};
3193 swapper = std::make_shared<mc::BufferSwapperMulti>(double_list, double_list.size());
3194
3195 }
3196
3197- std::shared_ptr<mc::Buffer> buffer_a;
3198- std::shared_ptr<mc::Buffer> buffer_b;
3199+ std::shared_ptr<mg::Buffer> buffer_a;
3200+ std::shared_ptr<mg::Buffer> buffer_b;
3201
3202 std::shared_ptr<mc::BufferSwapper> swapper;
3203 };
3204
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 #include <algorithm>
3210
3211 namespace mc = mir::compositor;
3212+namespace mg = mir::graphics;
3213 namespace mtd = mir::test::doubles;
3214
3215 namespace
3216@@ -38,13 +39,13 @@
3217 buffer_b{std::make_shared<mtd::StubBuffer>()},
3218 buffer_c{std::make_shared<mtd::StubBuffer>()}
3219 {
3220- auto list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c};
3221+ auto list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c};
3222 swapper = std::make_shared<mc::BufferSwapperSpin>(list, list.size());
3223 }
3224
3225- std::shared_ptr<mc::Buffer> const buffer_a;
3226- std::shared_ptr<mc::Buffer> const buffer_b;
3227- std::shared_ptr<mc::Buffer> const buffer_c;
3228+ std::shared_ptr<mg::Buffer> const buffer_a;
3229+ std::shared_ptr<mg::Buffer> const buffer_b;
3230+ std::shared_ptr<mg::Buffer> const buffer_c;
3231
3232 std::shared_ptr<mc::BufferSwapper> swapper;
3233 };
3234@@ -53,7 +54,7 @@
3235
3236 TEST_F(BufferSwapperSpinTriple, client_can_always_get_new_buffer)
3237 {
3238- std::vector<std::shared_ptr<mc::Buffer>> expected_buffers;
3239+ std::vector<std::shared_ptr<mg::Buffer>> expected_buffers;
3240
3241 for (unsigned int i = 0; i < 10; i++)
3242 {
3243@@ -81,7 +82,7 @@
3244
3245 TEST_F(BufferSwapperSpinTriple, client_can_always_get_new_buffer_while_compositor_has_one)
3246 {
3247- std::vector<std::shared_ptr<mc::Buffer>> expected_buffers;
3248+ std::vector<std::shared_ptr<mg::Buffer>> expected_buffers;
3249
3250 auto comp_buf = swapper->compositor_acquire();
3251
3252@@ -165,7 +166,7 @@
3253 swapper->compositor_release(comp_buf);
3254
3255 /* After the release, the compositor's buffer should be available to the client */
3256- std::vector<std::shared_ptr<mc::Buffer>> client_buffers;
3257+ std::vector<std::shared_ptr<mg::Buffer>> client_buffers;
3258
3259 for (auto i = 0; i < 3; i++)
3260 {
3261@@ -182,7 +183,7 @@
3262 TEST_F(BufferSwapperSpinTriple, buffer_transfer_triple_all_owned)
3263 {
3264 size_t test_size;
3265- std::vector<std::shared_ptr<mc::Buffer>> list;
3266+ std::vector<std::shared_ptr<mg::Buffer>> list;
3267 swapper->end_responsibility(list, test_size);
3268
3269 auto res1 = std::find(list.begin(), list.end(), buffer_a);
3270@@ -201,7 +202,7 @@
3271 auto acquired_buffer = swapper->client_acquire();
3272
3273 size_t test_size;
3274- std::vector<std::shared_ptr<mc::Buffer>> list;
3275+ std::vector<std::shared_ptr<mg::Buffer>> list;
3276 swapper->end_responsibility(list, test_size);
3277
3278 auto res1 = std::find(list.begin(), list.end(), acquired_buffer);
3279
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 #include "mir_test_doubles/stub_buffer.h"
3285
3286 #include "mir/compositor/buffer_swapper_multi.h"
3287-#include "mir/compositor/buffer_id.h"
3288+#include "mir/graphics/buffer_id.h"
3289
3290 #include <gmock/gmock.h>
3291 #include <gtest/gtest.h>
3292
3293 namespace mc = mir::compositor;
3294+namespace mg = mir::graphics;
3295 namespace geom = mir::geometry;
3296 namespace mtd = mir::test::doubles;
3297 namespace
3298@@ -38,14 +39,14 @@
3299 buffer_b = std::make_shared<mtd::StubBuffer>();
3300 buffer_c = std::make_shared<mtd::StubBuffer>();
3301
3302- auto triple_list = std::vector<std::shared_ptr<mc::Buffer>>{buffer_a, buffer_b, buffer_c};
3303+ auto triple_list = std::vector<std::shared_ptr<mg::Buffer>>{buffer_a, buffer_b, buffer_c};
3304 swapper = std::make_shared<mc::BufferSwapperMulti>(triple_list, triple_list.size());
3305
3306 }
3307
3308- std::shared_ptr<mc::Buffer> buffer_a;
3309- std::shared_ptr<mc::Buffer> buffer_b;
3310- std::shared_ptr<mc::Buffer> buffer_c;
3311+ std::shared_ptr<mg::Buffer> buffer_a;
3312+ std::shared_ptr<mg::Buffer> buffer_b;
3313+ std::shared_ptr<mg::Buffer> buffer_c;
3314
3315 std::shared_ptr<mc::BufferSwapper> swapper;
3316 };
3317
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 #include <gtest/gtest.h>
3323
3324 namespace mc = mir::compositor;
3325+namespace mg = mir::graphics;
3326 namespace geom = mir::geometry;
3327 namespace mtd = mir::test::doubles;
3328
3329@@ -46,7 +47,7 @@
3330 ON_CALL(*this, alloc_buffer(_))
3331 .WillByDefault(Return(std::make_shared<mtd::StubBuffer>(properties)));
3332 }
3333- MOCK_METHOD1(alloc_buffer, std::shared_ptr<mc::Buffer>(mc::BufferProperties const&));
3334+ MOCK_METHOD1(alloc_buffer, std::shared_ptr<mg::Buffer>(mc::BufferProperties const&));
3335 MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>());
3336
3337 ~MockGraphicBufferAllocator() noexcept {}
3338@@ -148,7 +149,7 @@
3339 using namespace testing;
3340
3341 mc::BufferProperties properties;
3342- std::vector<std::shared_ptr<mc::Buffer>> list {};
3343+ std::vector<std::shared_ptr<mg::Buffer>> list {};
3344 size_t size = 3;
3345
3346 EXPECT_CALL(*mock_buffer_allocator, alloc_buffer(properties))
3347@@ -163,7 +164,7 @@
3348 using namespace testing;
3349
3350 mc::BufferProperties properties;
3351- std::vector<std::shared_ptr<mc::Buffer>> list;
3352+ std::vector<std::shared_ptr<mg::Buffer>> list;
3353 size_t size = 3;
3354
3355 EXPECT_CALL(*mock_buffer_allocator, alloc_buffer(properties))
3356@@ -182,7 +183,7 @@
3357 auto buffer = std::make_shared<mtd::StubBuffer>();
3358 {
3359 size_t size = 3;
3360- std::vector<std::shared_ptr<mc::Buffer>> list{buffer};
3361+ std::vector<std::shared_ptr<mg::Buffer>> list{buffer};
3362
3363 auto swapper = strategy.create_swapper_reuse_buffers(
3364 properties, list, size, mc::SwapperType::synchronous);
3365@@ -197,7 +198,7 @@
3366 mc::SwapperFactory strategy(mock_buffer_allocator, 2);
3367
3368 size_t size = 3;
3369- std::vector<std::shared_ptr<mc::Buffer>> list{};
3370+ std::vector<std::shared_ptr<mg::Buffer>> list{};
3371
3372 EXPECT_THROW({
3373 strategy.create_swapper_reuse_buffers(
3374@@ -214,7 +215,7 @@
3375 mc::SwapperFactory strategy(mock_buffer_allocator);
3376
3377 size_t size = 2;
3378- std::vector<std::shared_ptr<mc::Buffer>> list{};
3379+ std::vector<std::shared_ptr<mg::Buffer>> list{};
3380 auto swapper = strategy.create_swapper_reuse_buffers(
3381 properties, list, size, mc::SwapperType::framedropping);
3382 }
3383
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 namespace geom=mir::geometry;
3389 namespace mtd=mir::test::doubles;
3390 namespace mc=mir::compositor;
3391+namespace mg = mir::graphics;
3392
3393 struct SwitchingBundleTest : public ::testing::Test
3394 {
3395@@ -47,7 +48,7 @@
3396 std::shared_ptr<mtd::MockSwapperFactory> mock_swapper_factory;
3397 std::shared_ptr<mtd::MockSwapper> mock_default_swapper;
3398 std::shared_ptr<mtd::MockSwapper> mock_secondary_swapper;
3399- std::shared_ptr<mc::Buffer> stub_buffer;
3400+ std::shared_ptr<mg::Buffer> stub_buffer;
3401 mc::BufferProperties properties;
3402 };
3403
3404
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 #include <stdexcept>
3410
3411 namespace mtd=mir::test::doubles;
3412+namespace mg = mir::graphics;
3413 namespace mc=mir::compositor;
3414 namespace geom=mir::geometry;
3415
3416@@ -33,7 +34,7 @@
3417 class TemporaryTestBuffer : public mc::TemporaryBuffer
3418 {
3419 public:
3420- TemporaryTestBuffer(const std::shared_ptr<mc::Buffer>& buf)
3421+ TemporaryTestBuffer(const std::shared_ptr<mg::Buffer>& buf)
3422 : TemporaryBuffer(buf)
3423 {
3424 }
3425@@ -43,8 +44,8 @@
3426 {
3427 public:
3428 ~MockBackBufferStrategy() noexcept {}
3429- MOCK_METHOD0(acquire, std::shared_ptr<mc::Buffer>());
3430- MOCK_METHOD1(release, void(std::shared_ptr<mc::Buffer> const&));
3431+ MOCK_METHOD0(acquire, std::shared_ptr<mg::Buffer>());
3432+ MOCK_METHOD1(release, void(std::shared_ptr<mg::Buffer> const&));
3433 };
3434
3435 class TemporaryBuffersTest : public ::testing::Test
3436
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 */
3442
3443 #include "../../src/server/frontend/client_buffer_tracker.h"
3444-#include "mir/compositor/buffer_id.h"
3445+#include "mir/graphics/buffer_id.h"
3446
3447 #include <gtest/gtest.h>
3448
3449 namespace mf = mir::frontend;
3450-namespace mc = mir::compositor;
3451+namespace mg = mir::graphics;
3452
3453 TEST(ClientBufferTracker, just_added_buffer_is_known_by_client)
3454 {
3455 mf::ClientBufferTracker tracker(3);
3456- mc::BufferID const id{5};
3457+ mg::BufferID const id{5};
3458
3459 tracker.add(id);
3460 EXPECT_TRUE(tracker.client_has(id));
3461@@ -37,17 +37,17 @@
3462 {
3463 mf::ClientBufferTracker tracker(3);
3464
3465- tracker.add(mc::BufferID{5});
3466- EXPECT_FALSE(tracker.client_has(mc::BufferID{6}));
3467+ tracker.add(mg::BufferID{5});
3468+ EXPECT_FALSE(tracker.client_has(mg::BufferID{6}));
3469 }
3470
3471 TEST(ClientBufferTracker, tracks_sequence_of_buffers)
3472 {
3473 mf::ClientBufferTracker tracker(3);
3474- mc::BufferID const one{1};
3475- mc::BufferID const two{2};
3476- mc::BufferID const three{3};
3477- mc::BufferID const four{4};
3478+ mg::BufferID const one{1};
3479+ mg::BufferID const two{2};
3480+ mg::BufferID const three{3};
3481+ mg::BufferID const four{4};
3482
3483 tracker.add(one);
3484 tracker.add(two);
3485@@ -63,10 +63,10 @@
3486 {
3487 mf::ClientBufferTracker tracker(3);
3488
3489- mc::BufferID const one{1};
3490- mc::BufferID const two{2};
3491- mc::BufferID const three{3};
3492- mc::BufferID const four{4};
3493+ mg::BufferID const one{1};
3494+ mg::BufferID const two{2};
3495+ mg::BufferID const three{3};
3496+ mg::BufferID const four{4};
3497
3498 tracker.add(one);
3499 tracker.add(two);
3500@@ -88,9 +88,9 @@
3501
3502 TEST(ClientBufferTracker, tracks_correct_number_of_buffers)
3503 {
3504- mc::BufferID ids[10];
3505+ mg::BufferID ids[10];
3506 for (unsigned int i = 0; i < 10; ++i)
3507- ids[i] = mc::BufferID{i};
3508+ ids[i] = mg::BufferID{i};
3509
3510 for (unsigned int tracker_size = 2; tracker_size < 10; ++tracker_size)
3511 {
3512
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 .WillByDefault(testing::Return(std::vector<geom::PixelFormat>()));
3518 }
3519
3520- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
3521+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&)
3522 {
3523- return std::shared_ptr<mc::Buffer>();
3524+ return std::shared_ptr<mg::Buffer>();
3525 }
3526
3527 MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>());
3528@@ -125,7 +125,7 @@
3529 MOCK_METHOD0(get_ipc_package, std::shared_ptr<mg::PlatformIPCPackage>());
3530 MOCK_METHOD0(create_internal_client, std::shared_ptr<mg::InternalClient>());
3531 MOCK_CONST_METHOD2(fill_ipc_package, void(std::shared_ptr<mc::BufferIPCPacker> const&,
3532- std::shared_ptr<mc::Buffer> const&));
3533+ std::shared_ptr<mg::Buffer> const&));
3534 };
3535
3536 class NullEventSink : public mir::events::EventSink
3537@@ -377,16 +377,16 @@
3538
3539 {
3540 EXPECT_CALL(*stubbed_session->mock_buffer, id())
3541- .WillOnce(Return(mc::BufferID{4}))
3542- .WillOnce(Return(mc::BufferID{5}))
3543- .WillOnce(Return(mc::BufferID{4}))
3544- .WillOnce(Return(mc::BufferID{5}));
3545+ .WillOnce(Return(mg::BufferID{4}))
3546+ .WillOnce(Return(mg::BufferID{5}))
3547+ .WillOnce(Return(mg::BufferID{4}))
3548+ .WillOnce(Return(mg::BufferID{5}));
3549
3550 mp::Surface surface_response;
3551 mp::SurfaceId buffer_request;
3552 mp::Buffer buffer_response[3];
3553
3554- std::shared_ptr<mc::Buffer> tmp_buffer = stubbed_session->mock_buffer;
3555+ std::shared_ptr<mg::Buffer> tmp_buffer = stubbed_session->mock_buffer;
3556 EXPECT_CALL(*graphics_platform, fill_ipc_package(_, tmp_buffer))
3557 .Times(2);
3558
3559
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 class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator
3565 {
3566 public:
3567- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
3568+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&)
3569 {
3570- return std::shared_ptr<mc::Buffer>();
3571+ return std::shared_ptr<mg::Buffer>();
3572 }
3573
3574 virtual std::vector<geom::PixelFormat> supported_pixel_formats()
3575
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 class StubGraphicBufferAllocator : public mc::GraphicBufferAllocator
3581 {
3582 public:
3583- std::shared_ptr<mc::Buffer> alloc_buffer(mc::BufferProperties const&)
3584+ std::shared_ptr<mg::Buffer> alloc_buffer(mc::BufferProperties const&)
3585 {
3586- return std::shared_ptr<mc::Buffer>();
3587+ return std::shared_ptr<mg::Buffer>();
3588 }
3589
3590 virtual std::vector<geom::PixelFormat> supported_pixel_formats()
3591
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 #include <gtest/gtest.h>
3597
3598 namespace mc=mir::compositor;
3599+namespace mg=mir::graphics;
3600 namespace mga=mir::graphics::android;
3601 namespace mtd=mir::test::doubles;
3602
3603@@ -39,14 +40,14 @@
3604 buffer3 = std::make_shared<mtd::MockBuffer>();
3605 }
3606
3607- std::shared_ptr<mc::Buffer> buffer1;
3608- std::shared_ptr<mc::Buffer> buffer2;
3609- std::shared_ptr<mc::Buffer> buffer3;
3610+ std::shared_ptr<mg::Buffer> buffer1;
3611+ std::shared_ptr<mg::Buffer> buffer2;
3612+ std::shared_ptr<mg::Buffer> buffer3;
3613 };
3614
3615 TEST_F(FBSimpleSwapperTest, simple_swaps_returns_valid)
3616 {
3617- std::initializer_list<std::shared_ptr<mc::Buffer>> double_list{buffer1, buffer2};
3618+ std::initializer_list<std::shared_ptr<mg::Buffer>> double_list{buffer1, buffer2};
3619 mga::FBSimpleSwapper fb_swapper(double_list);
3620
3621 auto test_buffer = fb_swapper.compositor_acquire();
3622@@ -56,7 +57,7 @@
3623
3624 TEST_F(FBSimpleSwapperTest, simple_swaps_return_aba_pattern)
3625 {
3626- std::initializer_list<std::shared_ptr<mc::Buffer>> double_list{buffer1, buffer2};
3627+ std::initializer_list<std::shared_ptr<mg::Buffer>> double_list{buffer1, buffer2};
3628 mga::FBSimpleSwapper fb_swapper(double_list);
3629
3630 auto test_buffer_1 = fb_swapper.compositor_acquire();
3631@@ -74,7 +75,7 @@
3632
3633 TEST_F(FBSimpleSwapperTest, triple_swaps_return_abcab_pattern)
3634 {
3635- std::initializer_list<std::shared_ptr<mc::Buffer>> triple_list{buffer1, buffer2, buffer3};
3636+ std::initializer_list<std::shared_ptr<mg::Buffer>> triple_list{buffer1, buffer2, buffer3};
3637 mga::FBSimpleSwapper fb_swapper(triple_list);
3638
3639 auto test_buffer_1 = fb_swapper.compositor_acquire();
3640@@ -103,10 +104,10 @@
3641
3642 TEST_F(FBSimpleSwapperTest, synctest)
3643 {
3644- std::vector<std::shared_ptr<mc::Buffer>> test_buffers{buffer1, buffer2};
3645+ std::vector<std::shared_ptr<mg::Buffer>> test_buffers{buffer1, buffer2};
3646 mga::FBSimpleSwapper fb_swapper(test_buffers);
3647
3648- std::vector<std::shared_ptr<mc::Buffer>> blist;
3649+ std::vector<std::shared_ptr<mg::Buffer>> blist;
3650 std::mutex mut;
3651 for(auto i=0u; i < 150; ++i)
3652 {
3653
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 #include <gmock/gmock.h>
3659 #include <gtest/gtest.h>
3660
3661+namespace mg=mir::graphics;
3662 namespace mga=mir::graphics::android;
3663 namespace mtd=mir::test::doubles;
3664 namespace mt=mir::test;
3665@@ -39,7 +40,7 @@
3666 class MockAndroidGraphicBufferAllocator : public mga::GraphicBufferAllocator
3667 {
3668 public:
3669- MOCK_METHOD1(alloc_buffer, std::shared_ptr<mc::Buffer>(mc::BufferProperties const&));
3670+ MOCK_METHOD1(alloc_buffer, std::shared_ptr<mg::Buffer>(mc::BufferProperties const&));
3671 MOCK_METHOD3(alloc_buffer_platform, std::shared_ptr<mga::Buffer>(geom::Size, geom::PixelFormat, mga::BufferUsage));
3672 MOCK_METHOD0(supported_pixel_formats, std::vector<geom::PixelFormat>());
3673
3674
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 #include <stdexcept>
3680
3681 namespace mc=mir::compositor;
3682+namespace mg=mir::graphics;
3683 namespace mga=mir::graphics::android;
3684 namespace mtd=mir::test::doubles;
3685 namespace geom=mir::geometry;
3686@@ -90,7 +91,7 @@
3687
3688 TEST_F(HWC10Device, hwc10_set_next_frontbuffer)
3689 {
3690- std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3691+ std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3692 EXPECT_CALL(*mock_fbdev, set_next_frontbuffer(mock_buffer))
3693 .Times(1);
3694
3695
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 #include <stdexcept>
3701
3702 namespace mc=mir::compositor;
3703+namespace mg=mir::graphics;
3704 namespace mga=mir::graphics::android;
3705 namespace mtd=mir::test::doubles;
3706
3707@@ -258,7 +259,7 @@
3708
3709 TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_adds_to_layerlist)
3710 {
3711- std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3712+ std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3713 EXPECT_CALL(*this->mock_organizer, set_fb_target(mock_buffer))
3714 .Times(1);
3715
3716@@ -268,7 +269,7 @@
3717
3718 TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_posts_vsync)
3719 {
3720- std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3721+ std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3722 EXPECT_CALL(*this->mock_display_support_provider, set_next_frontbuffer(mock_buffer))
3723 .Times(1);
3724
3725@@ -278,7 +279,7 @@
3726
3727 TEST_F(HWC11Device, hwc_device_set_next_frontbuffer_posts_no_sync)
3728 {
3729- std::shared_ptr<mc::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3730+ std::shared_ptr<mg::Buffer> mock_buffer = std::make_shared<mtd::MockBuffer>();
3731 EXPECT_CALL(*this->mock_display_support_provider, set_next_frontbuffer(mock_buffer))
3732 .Times(0);
3733
3734
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 #include <gtest/gtest.h>
3740
3741 namespace geom=mir::geometry;
3742-namespace mc=mir::compositor;
3743+namespace mg=mir::graphics;
3744 namespace mga=mir::graphics::android;
3745
3746 namespace
3747@@ -43,9 +43,9 @@
3748 {
3749 return geom::PixelFormat::xbgr_8888;
3750 }
3751- std::shared_ptr<mc::Buffer> advance_client_buffer()
3752+ std::shared_ptr<mg::Buffer> advance_client_buffer()
3753 {
3754- return std::shared_ptr<mc::Buffer>();
3755+ return std::shared_ptr<mg::Buffer>();
3756 }
3757 bool supports_input() const
3758 {
3759
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 #include <gtest/gtest.h>
3765 #include <stdexcept>
3766
3767-namespace mc=mir::compositor;
3768+namespace mg=mir::graphics;
3769 namespace mtd=mir::test::doubles;
3770 namespace mga=mir::graphics::android;
3771 namespace geom=mir::geometry;
3772@@ -40,7 +40,7 @@
3773 MOCK_CONST_METHOD0(size, geom::Size());
3774 MOCK_CONST_METHOD0(pixel_format, geom::PixelFormat());
3775
3776- MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mc::Buffer>());
3777+ MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mg::Buffer>());
3778
3779 MOCK_CONST_METHOD0(supports_input, bool());
3780 MOCK_CONST_METHOD0(client_input_fd, int());
3781@@ -83,7 +83,7 @@
3782 .Times(1);
3783 EXPECT_CALL(*mock_buffer, native_buffer_handle())
3784 .Times(1);
3785- std::shared_ptr<mc::Buffer> tmp = mock_buffer;
3786+ std::shared_ptr<mg::Buffer> tmp = mock_buffer;
3787 EXPECT_CALL(*mock_cache, store_buffer(tmp, stub_anw.get()))
3788 .Times(1);
3789
3790
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
3796 namespace mtd=mir::test::doubles;
3797 namespace geom=mir::geometry;
3798+namespace mg=mir::graphics;
3799 namespace mga=mir::graphics::android;
3800 namespace mc=mir::compositor;
3801
3802@@ -44,8 +45,8 @@
3803 struct MockFBSwapper : public mga::FBSwapper
3804 {
3805 ~MockFBSwapper() noexcept {}
3806- MOCK_METHOD0(compositor_acquire, std::shared_ptr<mc::Buffer>());
3807- MOCK_METHOD1(compositor_release, void(std::shared_ptr<mc::Buffer> const& released_buffer));
3808+ MOCK_METHOD0(compositor_acquire, std::shared_ptr<mg::Buffer>());
3809+ MOCK_METHOD1(compositor_release, void(std::shared_ptr<mg::Buffer> const& released_buffer));
3810 };
3811
3812 struct ServerRenderWindowTest : public ::testing::Test
3813@@ -88,7 +89,7 @@
3814 .Times(1)
3815 .WillOnce(Return(stub_anw));
3816
3817- std::shared_ptr<mc::Buffer> tmp = mock_buffer1;
3818+ std::shared_ptr<mg::Buffer> tmp = mock_buffer1;
3819 EXPECT_CALL(*mock_cache, store_buffer(tmp, stub_anw.get()))
3820 .Times(1);
3821
3822@@ -115,7 +116,7 @@
3823 render_window.driver_requests_buffer();
3824 testing::Mock::VerifyAndClearExpectations(mock_swapper.get());
3825
3826- std::shared_ptr<mc::Buffer> buf1 = mock_buffer1;
3827+ std::shared_ptr<mg::Buffer> buf1 = mock_buffer1;
3828 EXPECT_CALL(*mock_swapper, compositor_release(buf1))
3829 .Times(1);
3830 EXPECT_CALL(*stub_sync, wait())
3831@@ -134,13 +135,13 @@
3832 .WillOnce(Return(mock_buffer1));
3833 mga::ServerRenderWindow render_window(mock_swapper, mock_display_poster, mock_cache);
3834
3835- mc::BufferID id{442}, returned_id;
3836+ mg::BufferID id{442}, returned_id;
3837 EXPECT_CALL(*mock_swapper, compositor_acquire())
3838 .Times(1)
3839 .WillOnce(Return(mock_buffer1));
3840 EXPECT_CALL(*mock_swapper, compositor_release(_))
3841 .Times(1);
3842- std::shared_ptr<mc::Buffer> buf1 = mock_buffer1;
3843+ std::shared_ptr<mg::Buffer> buf1 = mock_buffer1;
3844 EXPECT_CALL(*mock_buffer1, native_buffer_handle())
3845 .Times(1)
3846 .WillOnce(Return(stub_anw));
3847
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 #include <gtest/gtest.h>
3853
3854 namespace geom=mir::geometry;
3855-namespace mc=mir::compositor;
3856 namespace mgg=mir::graphics::gbm;
3857 namespace mtd=mir::test::doubles;
3858
3859
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 MOCK_METHOD0(force_requests_to_complete, void());
3865 MOCK_CONST_METHOD0(size, geom::Size());
3866 MOCK_CONST_METHOD0(pixel_format, geom::PixelFormat());
3867- MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mc::Buffer>());
3868+ MOCK_METHOD0(advance_client_buffer, std::shared_ptr<mg::Buffer>());
3869 MOCK_CONST_METHOD0(supports_input, bool());
3870 MOCK_CONST_METHOD0(client_input_fd, int());
3871 MOCK_METHOD2(configure, int(MirSurfaceAttrib, int));
3872
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 */
3878
3879 #include "mir/shell/application_session.h"
3880-#include "mir/compositor/buffer.h"
3881+#include "mir/graphics/buffer.h"
3882 #include "mir/shell/surface_creation_parameters.h"
3883 #include "mir_test/fake_shared.h"
3884 #include "mir_test_doubles/mock_surface_factory.h"
3885
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 namespace msh = mir::shell;
3891 namespace mf = mir::frontend;
3892 namespace mc = mir::compositor;
3893+namespace mg = mir::graphics;
3894 namespace mi = mir::input;
3895 namespace geom = mir::geometry;
3896 namespace mt = mir::test;
3897@@ -484,10 +485,10 @@
3898 mt::fake_shared(surface_builder),
3899 msh::a_surface());
3900
3901- mc::Buffer* buf_ptr{nullptr};
3902+ mg::Buffer* buf_ptr{nullptr};
3903
3904 test.with_most_recent_buffer_do(
3905- [&](mc::Buffer& buffer)
3906+ [&](mg::Buffer& buffer)
3907 {
3908 buf_ptr = &buffer;
3909 });
3910
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 */
3916
3917 #include "mir/shell/threaded_snapshot_strategy.h"
3918-#include "mir/shell/pixel_buffer.h"
3919+#include "mir/graphics/pixel_buffer.h"
3920 #include "mir/shell/surface_buffer_access.h"
3921-#include "mir/compositor/buffer.h"
3922+#include "mir/graphics/buffer.h"
3923
3924 #include "mir_test_doubles/stub_buffer.h"
3925 #include "mir_test/fake_shared.h"
3926@@ -32,6 +32,7 @@
3927 #include <atomic>
3928
3929 namespace mc = mir::compositor;
3930+namespace mg = mir::graphics;
3931 namespace msh = mir::shell;
3932 namespace mt = mir::test;
3933 namespace mtd = mir::test::doubles;
3934@@ -43,7 +44,7 @@
3935 ~StubSurfaceBufferAccess() noexcept {}
3936
3937 void with_most_recent_buffer_do(
3938- std::function<void(mc::Buffer&)> const& exec)
3939+ std::function<void(mg::Buffer&)> const& exec)
3940 {
3941 exec(buffer);
3942 }
3943@@ -51,12 +52,12 @@
3944 mtd::StubBuffer buffer;
3945 };
3946
3947-class MockPixelBuffer : public msh::PixelBuffer
3948+class MockPixelBuffer : public mg::PixelBuffer
3949 {
3950 public:
3951 ~MockPixelBuffer() noexcept {}
3952
3953- MOCK_METHOD1(fill_from, void(mc::Buffer& buffer));
3954+ MOCK_METHOD1(fill_from, void(mg::Buffer& buffer));
3955 MOCK_METHOD0(as_argb_8888, void const*());
3956 MOCK_CONST_METHOD0(size, geom::Size());
3957 MOCK_CONST_METHOD0(stride, geom::Stride());
3958
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 class NullBufferBundle : public mc::BufferBundle
3964 {
3965 public:
3966- virtual std::shared_ptr<mc::Buffer> client_acquire() { return std::shared_ptr<mc::Buffer>(); }
3967- virtual void client_release(std::shared_ptr<mc::Buffer> const&) {}
3968- virtual std::shared_ptr<mc::Buffer> compositor_acquire(){ return std::shared_ptr<mc::Buffer>(); };
3969- virtual void compositor_release(std::shared_ptr<mc::Buffer> const&){}
3970+ virtual std::shared_ptr<mg::Buffer> client_acquire() { return std::shared_ptr<mg::Buffer>(); }
3971+ virtual void client_release(std::shared_ptr<mg::Buffer> const&) {}
3972+ virtual std::shared_ptr<mg::Buffer> compositor_acquire(){ return std::shared_ptr<mg::Buffer>(); };
3973+ virtual void compositor_release(std::shared_ptr<mg::Buffer> const&){}
3974 virtual void force_client_abort() {}
3975 void force_requests_to_complete() {}
3976 virtual void allow_framedropping(bool) {}

Subscribers

People subscribed via source and target branches