~ci-train-bot/mir/mir-ubuntu-zesty-2735

« back to all changes in this revision

Viewing changes to src/server/frontend/session_mediator.cpp

  • Committer: Bileto Bot
  • Date: 2017-02-09 21:46:11 UTC
  • mfrom: (1160.2680.216 mir-dev)
  • Revision ID: ci-train-bot@canonical.com-20170209214611-npcbbl3ivh2x981r
* New upstream release 0.26.1 (https://launchpad.net/mir/+milestone/0.26.1)
  - ABI summary:
    . mirclient ABI unchanged at 9
    . mirserver ABI unchanged at 43
    . mircommon ABI unchanged at 7
    . mirplatform ABI bumped to 15
    . mirprotobuf ABI unchanged at 3
    . mirplatformgraphics ABI bumped to 12
    . mirclientplatform ABI unchanged at 5
    . mirinputplatform ABI unchanged at 6
    . mircore ABI unchanged at 1
  - Enhancements:
    . Support for MirBuffer API that allows for better management of
      hardware/software buffers.
    . Support for MirPresentationChain API that allows better control
      over {de}queueing of individual buffers {from}to the server.
    . Interim support for MirRenderSurface API that provides a unit of
      renderable for lower level content such as MirBufferStreams and
      MirPresentationChains, etc.. MirRenderSurface API is marked
      deprecated as it (and the relevant entry points) will be renamed to
      MirSurface before general availability. It will initially be used for
      revamping support for EGL drivers.
    . Synchronous version of mir_prompt_session_new_fds_for_prompt_providers()
      API (mir_prompt_session_new_fds_for_prompt_providers_sync()) added for
      convenience.
    . Better name for MirPersistentId-->MirWindowId. MirPersistentId has now
      been deprecated.
  - Bugs fixed:
    . [regression] Unity8 stutters constantly (like half frame rate).
      (LP: #1661128)
    . mir 0.26 - spinner loading animation, minimize, maximize too fast.
      (LP: #1661072)
    . [regression] Nested server segfaults or rapidly logs exceptions when a
      fullscreen client starts [in mir_presentation_chain_set_dropping_mode
      ... std::exception::what: Operation not permitted] (LP: #1661508)
    . mir_window_request_persistent_id_sync seg faults when called twice.
      (LP: #1661704)
    . [regression] Windowed clients of nested servers are all black.
      (LP: #1661521)
    . Mir graphics platform ABI broke in series 0.26 but sonames never
      changed (LP: #1662455)
    . Fixes for 0.26 changelog.
    . [regression] mirscreencast hangs during screencast creation. (LP: #1662997)
    . libmirclient-dev missing build dependency on libmircore-dev. (LP: #1662942)
    . mir_window_spec_set_cursor_name() doesn't trigger
      mir::scene::SurfaceObserver::cursor_image_set_to. (LP: #1663197)
    . [regression] Software clients of nested servers are all black in Mir 0.25.0
      and later. (LP: #1663062)
    . New and improved client APIs: MirInputConfig, MirWindow, DisplayConfig,
      MirScreencastSpec.
    . Support for setting the input configuration.
    . Introduced an extension mechanism for platform-specific APIs.
    . Support for screencasting to a specific MirBuffer.
    . Added DisplayConfigurationController::base_configuration() so
      downstreams can get the base configuration (weirdly they can already
      set it).
    . X11 platform: Allow adjustable scale parameter.
    . Added monitor EDID support to both the client API and server-side.
    . mirout: Now shows scaling factor, subpixel arrangement, form factor and
      EDID.
    . mirout: Can now change the monitor configuration as well as report it.
    . Introduced client-side vsync which dramatically reduces latency
      from the client to the screen, by up to 44ms.
    . Removed all input resampling logic. We now expect toolkits to do their
      own, if at all. This reduces input lag by up to 16.9ms, or 8.4ms on
      average.

Show diffs side-by-side

added added

removed removed

Lines of Context:
426
426
    for (auto i = 0; i < request->buffer_requests().size(); i++)
427
427
    {
428
428
        auto const& req = request->buffer_requests(i);
429
 
        mg::BufferProperties properties(
430
 
            geom::Size{req.width(), req.height()},
431
 
            static_cast<MirPixelFormat>(req.pixel_format()),
432
 
           static_cast<mg::BufferUsage>(req.buffer_usage()));
433
 
 
434
 
        auto id = session->create_buffer(properties);
 
429
 
 
430
        mg::BufferID id;
 
431
        if (req.has_flags() && req.has_native_format())
 
432
        {
 
433
            auto session_ext = std::dynamic_pointer_cast<SessionExtensions>(session);
 
434
            id = session_ext->create_buffer({req.width(), req.height()}, req.native_format(), req.flags());
 
435
        }
 
436
        else if (req.has_buffer_usage() && req.has_pixel_format())
 
437
        {
 
438
            auto const usage = static_cast<mg::BufferUsage>(req.buffer_usage());
 
439
            geom::Size const size{req.width(), req.height()};
 
440
            auto const pf = static_cast<MirPixelFormat>(req.pixel_format());
 
441
            if (usage == mg::BufferUsage::software)
 
442
            {
 
443
                auto session_ext = std::dynamic_pointer_cast<SessionExtensions>(session);
 
444
                id = session_ext->create_buffer(size, pf);
 
445
            }
 
446
            else
 
447
            {
 
448
                //legacy route, server-selected pf and usage
 
449
                id = session->create_buffer(mg::BufferProperties{size, pf, mg::BufferUsage::hardware});
 
450
            }
 
451
        }
 
452
        else
 
453
        {
 
454
            BOOST_THROW_EXCEPTION(std::logic_error("Invalid buffer request"));
 
455
        }
 
456
 
435
457
        if (request->has_id())
436
458
        {
437
459
            auto stream = session->get_buffer_stream(mf::BufferStreamId(request->id().value()));
810
832
 
811
833
    protobuf_screencast->mutable_screencast_id()->set_value(
812
834
        screencast_session_id.as_value());
 
835
    protobuf_screencast->mutable_buffer_stream()->set_pixel_format(pixel_format);
813
836
    protobuf_screencast->mutable_buffer_stream()->mutable_id()->set_value(
814
837
        screencast_session_id.as_value());
815
838