~alan-griffiths/mir/fix-1654023

« back to all changes in this revision

Viewing changes to src/platforms/android/server/hwc_fb_device.cpp

  • Committer: Daniel van Vugt
  • Date: 2015-04-28 07:54:10 UTC
  • mfrom: (2517 development-branch)
  • mto: This revision was merged to the branch mainline in revision 2673.
  • Revision ID: daniel.van.vugt@canonical.com-20150428075410-rwskshfuar7voesp
Merge latest trunk and fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <boost/throw_exception.hpp>
31
31
#include <sstream>
32
32
#include <stdexcept>
 
33
#include <algorithm>
33
34
 
34
35
namespace mg = mir::graphics;
35
36
namespace mga = mir::graphics::android;
55
56
{
56
57
}
57
58
 
58
 
void mga::HwcFbDevice::commit(
59
 
    mga::DisplayName,
60
 
    mga::LayerList& layer_list,
61
 
    SwappingGLContext const& context,
62
 
    RenderableListCompositor const&)
 
59
void mga::HwcFbDevice::commit(std::list<DisplayContents> const& contents)
63
60
{
 
61
    auto primary_contents = std::find_if(contents.begin(), contents.end(),
 
62
        [](mga::DisplayContents const& c) {
 
63
            return (c.name == mga::DisplayName::primary);
 
64
    });
 
65
    if (primary_contents == contents.end()) return;
 
66
    auto& layer_list = primary_contents->list;
 
67
    auto& context = primary_contents->context;
 
68
 
64
69
    layer_list.setup_fb(context.last_rendered_buffer());
65
70
 
66
71
    if (auto display_list = layer_list.native_list())