~hikiko/mir/mir.unity8-desktop-session

« back to all changes in this revision

Viewing changes to tests/unit-tests/shell/test_graphics_display_layout.cpp

  • Committer: Stephen M. Webb
  • Date: 2014-02-25 20:15:07 UTC
  • mfrom: (61.1.1 trusty-proposed)
  • Revision ID: stephen.webb@canonical.com-20140225201507-cicfzmdznvr059b2
mergedĀ fromĀ Ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    StubDisplay()
42
42
        : rects{{{0,0}, {800,600}},
43
43
                {{0,600}, {100,100}},
44
 
                {{800,0}, {100,100}}},
45
 
          config{std::make_shared<mtd::StubDisplayConfig>(rects)}
 
44
                {{800,0}, {100,100}}}
46
45
    {
47
46
        for (auto const& rect : rects)
48
47
        {
57
56
            f(*db);
58
57
    }
59
58
 
60
 
    std::shared_ptr<mg::DisplayConfiguration> configuration() override
 
59
    std::unique_ptr<mg::DisplayConfiguration> configuration() const override
61
60
    {
62
 
        return config;
 
61
        return std::unique_ptr<mg::DisplayConfiguration>(
 
62
            new mtd::StubDisplayConfig(rects)
 
63
        );
63
64
    }
64
65
 
65
66
private:
66
67
    std::vector<geom::Rectangle> const rects;
67
68
    std::vector<std::shared_ptr<mtd::StubDisplayBuffer>> display_buffers;
68
 
    std::shared_ptr<mtd::StubDisplayConfig> config;
69
69
};
70
70
 
71
71
}