~raof/mir/blowup-eventhub

« back to all changes in this revision

Viewing changes to src/platform/graphics/android/display_buffer.cpp

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2014-01-29 00:49:23 UTC
  • mfrom: (1329.1.42 renderable)
  • Revision ID: tarmac-20140129004923-a52iu4phmbzmv9ot
android: split out HWC layers into their own file and add a mga::CompositionLayer type that depends on the interface mg::Renderable.

Approved by Andreas Pokorny, Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <stdexcept>
26
26
#include <algorithm>
27
27
 
 
28
namespace mg=mir::graphics;
28
29
namespace mga=mir::graphics::android;
29
30
namespace geom=mir::geometry;
30
31
 
64
65
}
65
66
 
66
67
void mga::DisplayBuffer::render_and_post_update(
67
 
        std::list<Renderable> const& renderlist,
 
68
        std::list<std::shared_ptr<Renderable>> const& renderlist,
68
69
        std::function<void(Renderable const&)> const& render_fn)
69
70
{
70
71
    if (renderlist.empty())
78
79
 
79
80
    for(auto& renderable : renderlist)
80
81
    {
81
 
        render_fn(renderable);
 
82
        render_fn(*renderable);
82
83
    }
83
84
 
84
85
    render_and_post();