Mir

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

Proposed by Alan Griffiths
Status: Work in progress
Proposed branch: lp://qastaging/~alan-griffiths/mir/move-graphicsplatform-dependencies-to-graphics
Merge into: lp://qastaging/~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://qastaging/~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.qastaging.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
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches