Mir

lp:~raof/mir/deferred-with-surface-do

Created by Chris Halse Rogers and last modified
Get this branch:
bzr branch lp:~raof/mir/deferred-with-surface-do
Only Chris Halse Rogers can upload to this branch. If you are Chris Halse Rogers please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Chris Halse Rogers
Project:
Mir
Status:
Development

Recent revisions

3893. By Chris Halse Rogers

MirProtobufRpcChannel: Simplify process_event_sequence

3892. By Chris Halse Rogers

Fix deferred event delivery in MirProtobufRpcChannel.

If with_surface_do() ends up deferring execution we need to keep the deserialised
event around as a shared_ptr, rather than having the unique_ptr clean it up when
we finish.

3891. By Chris Halse Rogers

Now that we're guaranteeing non-NULL-ness it makes sense to pass MirSurface& rather than MirSurface*

3890. By Chris Halse Rogers

Add some more missing files to CMakeLists.txt

3889. By Chris Halse Rogers

mcl::ResourceStore is a better name than ConnectionSurfaceMap.

3888. By Chris Halse Rogers

Eliminate possible race with reserved SurfaceID processing.

Don't punt func(surface.get()) to the delayed_queue - it's possible the client could
call ::erase(surface_id) before that's processed, leading to accessing a freed MirSurface.

Instead, punt with_surface_do to the delayed queue.

3887. By Chris Halse Rogers

Clarify ownership of MirSurface in the client library.

The ConnectionSurfaceMap owns the all MirSurface-s associated with a connection.
Make this more explicit by having insert() take ownership of a unique_ptr<MirSurface>
rather than a shared_ptr<MirSurface>.

3886. By Chris Halse Rogers

And add some documentation to ConnectionSurfaceMap

3885. By Chris Halse Rogers

ConnectionResourceMap::with_{surface,stream}_do: Failure to find the object is not an error.

Make this somewhat more monadic by just not running the functor when the object of desire
is not found.

This matches what we currently do - wherever we currently call these functions we
catch exceptions and throw them away.

This also makes sense for the future - we should be able to delete client resources
without waiting for the server ACK, and that involves ignoring events targetting
client-deleted objects.

3884. By Chris Halse Rogers

Add ConnectionSurfaceMap::reserve(SurfaceId).

This notifies the surface map that we *intend* to create a surface with ID,
but it's not ready yet.

Events can reach this new surface, but they're delayed until it actually
exists.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:mir
This branch contains Public information 
Everyone can see this information.