~kdub/mir/fix-1301040

« back to all changes in this revision

Viewing changes to src/server/scene/surface_allocator.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2014-04-01 17:40:49 UTC
  • mfrom: (1513.3.10 mir1)
  • Revision ID: tarmac-20140401174049-vj1jmakptw9v31qg
scene: Simplify BasicSurface creation by separating out an initial cut of SurfaceObserver.

Approved by Andreas Pokorny, Alexandros Frantzis, Gerry Boland, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
}
49
49
 
50
50
std::shared_ptr<ms::Surface> ms::SurfaceAllocator::create_surface(
51
 
    frontend::SurfaceId id,
52
 
    msh::SurfaceCreationParameters const& params,
53
 
    std::shared_ptr<frontend::EventSink> const& event_sink)
 
51
    shell::SurfaceCreationParameters const& params)
54
52
{
55
53
    mg::BufferProperties buffer_properties{params.size,
56
54
                                           params.pixel_format,
60
58
 
61
59
    bool nonrectangular = has_alpha(params.pixel_format);
62
60
    auto input_channel = input_factory->make_input_channel();
63
 
    return std::make_shared<BasicSurface>(
64
 
        id,
 
61
    auto const surface = std::make_shared<BasicSurface>(
65
62
        params.name,
66
63
        actual_size,
67
64
        nonrectangular,
68
65
        buffer_stream,
69
66
        input_channel,
70
 
        event_sink,
71
67
        configurator,
72
68
        report);
 
69
 
 
70
    return surface;
73
71
}