~brandontschaefer/+junk/trunk-mir

Viewing all changes in revision 3070.

  • Committer: Alberto Aguirre
  • Author(s): Andreas Pokorny
  • Date: 2015-11-02 18:52:36 UTC
  • mfrom: (3069.1.1 switch-to-module-ptr)
  • Revision ID: alberto.aguirre@canonical.com-20151102185236-37wz1b3hvgd7zm7j
Switch to UniqueModulePtr in graphics platform creation symbols

With this the lifetime of the graphics platform shared module is tied to the lifetime of the graphics::Platform instance used by the server. So we can get rid of the global static SharedLibrary in mirserver. This is then identical to the lifetime tracking used for input platforms.

The platform plays factory for Display, PlatformIPCOperations and GraphicsBufferAllocator. These instances are still created as plain shared ptrs. Currently DisplayServer guarantees that the Platform outlives those objects, if we dont want to guarantee that destruction ordering we could also use UniqueModulePtr for those - but that requires a slightly larger rework in integration tests.

This change also required removing enable_shared_from_this from the kms version of mir::graphics::mesa::Platform. Capturing a UniqueModulePtr<T> with a shared_ptr<T> works, and also when enable_shared_from_this is used in T. It does not work when enable_shared_from_this is only added by a class derived from T.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: