~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
Import upstream version 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright © 2013 Canonical Ltd.
 
2
 * Copyright © 2013-2014 Canonical Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify it
5
5
 * under the terms of the GNU General Public License version 3,
20
20
#include "mir/scene/buffer_stream_factory.h"
21
21
#include "mir/compositor/buffer_stream.h"
22
22
#include "mir/input/input_channel_factory.h"
23
 
#include "surface_data.h"
24
23
#include "basic_surface.h"
25
24
 
26
25
namespace geom=mir::geometry;
56
55
    auto actual_size = geom::Rectangle{params.top_left, buffer_stream->stream_size()};
57
56
 
58
57
    bool nonrectangular = has_alpha(params.pixel_format);
59
 
    auto state = std::make_shared<SurfaceData>(params.name,
60
 
                                                    actual_size,
61
 
                                                    change_callback,
62
 
                                                    nonrectangular);
63
58
    auto input_channel = input_factory->make_input_channel();
64
 
    return std::make_shared<BasicSurface>(state, buffer_stream, input_channel, report);
 
59
    return std::make_shared<BasicSurface>(
 
60
        params.name,
 
61
        actual_size,
 
62
        change_callback,
 
63
        nonrectangular,
 
64
        buffer_stream,
 
65
        input_channel,
 
66
        report);
65
67
}