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

« back to all changes in this revision

Viewing changes to tests/acceptance-tests/test_buffer_stream_arrangement1.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:
18
18
 
19
19
#include "buffer_stream_arrangement.h"
20
20
#include "mir_toolkit/mir_presentation_chain.h"
21
 
#include "mir_toolkit/mir_render_surface.h"
 
21
#include "mir_toolkit/rs/mir_render_surface.h"
22
22
#include <gmock/gmock.h>
23
23
 
24
24
namespace mt = mir::test;
26
26
using namespace std::literals::chrono_literals;
27
27
using namespace testing;
28
28
 
 
29
#pragma GCC diagnostic push
 
30
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
29
31
namespace
30
32
{
31
33
 
55
57
                rs->surface,
56
58
                physical_size.width.as_int(),
57
59
                physical_size.height.as_int(),
58
 
                an_available_format(connection),
59
 
                mir_buffer_usage_hardware);
 
60
                an_available_format(connection));
60
61
        }),
61
62
        rs(std::move(rs))
62
63
    {
64
65
 
65
66
    std::unique_ptr<RenderSurface> const rs;
66
67
};
 
68
 
67
69
}
68
70
 
69
71
typedef mt::BufferStreamArrangementBase BufferStreamArrangementStaging;
78
80
        { {0, 0}, logical_size });
79
81
 
80
82
    auto change_spec = mir_create_window_spec(connection);
81
 
    mir_surface_spec_add_render_surface(change_spec, stream.rs->surface,
 
83
    mir_window_spec_add_render_surface(change_spec, stream.rs->surface,
82
84
        logical_size.width.as_int(), logical_size.height.as_int(), 0, 0);
83
85
    mir_window_apply_spec(window, change_spec);
84
86
    mir_window_spec_release(change_spec);
100
102
        { {0, 0}, logical_size });
101
103
 
102
104
    auto change_spec = mir_create_window_spec(connection);
103
 
    mir_surface_spec_add_render_surface(change_spec, stream.rs->surface,
 
105
    mir_window_spec_add_render_surface(change_spec, stream.rs->surface,
104
106
        logical_size.width.as_int(), logical_size.height.as_int(), 0, 0);
105
107
    mir_window_apply_spec(window, change_spec);
106
108
    mir_window_spec_release(change_spec);
128
130
        { {0, 0}, logical_size });
129
131
 
130
132
    auto change_spec = mir_create_window_spec(connection);
131
 
    mir_surface_spec_add_render_surface(change_spec, stream.rs->surface,
 
133
    mir_window_spec_add_render_surface(change_spec, stream.rs->surface,
132
134
        logical_size.width.as_int(), logical_size.height.as_int(), 0, 0);
133
135
    mir_window_apply_spec(window, change_spec);
134
136
    mir_window_spec_release(change_spec);
139
141
    streams.back()->swap_buffers();
140
142
    EXPECT_THAT(stream.physical_size(), Eq(changed_physical_size));
141
143
}
 
144
#pragma GCC diagnostic pop