~alan-griffiths/mir/fix-1661151

« back to all changes in this revision

Viewing changes to src/client/connection_surface_map.cpp

  • Committer: Tarmac
  • Author(s): Cemil Azizoglu
  • Date: 2017-02-21 21:43:12 UTC
  • mfrom: (4030.1.5 mir-dev)
  • Revision ID: tarmac-20170221214312-1h2k3awlishhirre
Implement mir_cursor_configuration_from_render_surface().

Approved by mir-ci-bot, Kevin DuBois, Chris Halse Rogers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        BOOST_THROW_EXCEPTION(std::runtime_error("could not find buffer"));
111
111
}
112
112
 
113
 
#pragma GCC diagnostic push
114
 
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
115
 
void mcl::ConnectionSurfaceMap::insert(void* render_surface_key, std::shared_ptr<MirRenderSurface> const& render_surface)
116
 
{
117
 
    std::lock_guard<decltype(guard)> lk(stream_guard);
118
 
    render_surfaces[render_surface_key] = render_surface;
119
 
}
120
 
#pragma GCC diagnostic pop
121
 
 
122
113
void mcl::ConnectionSurfaceMap::erase(void* render_surface_key)
123
114
{
124
115
    std::lock_guard<decltype(guard)> lk(stream_guard);
129
120
 
130
121
#pragma GCC diagnostic push
131
122
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
123
void mcl::ConnectionSurfaceMap::insert(void* render_surface_key, std::shared_ptr<MirRenderSurface> const& render_surface)
 
124
{
 
125
    std::lock_guard<decltype(guard)> lk(stream_guard);
 
126
    render_surfaces[render_surface_key] = render_surface;
 
127
}
 
128
 
132
129
std::shared_ptr<MirRenderSurface> mcl::ConnectionSurfaceMap::render_surface(void* render_surface_key) const
133
130
{
134
131
    std::shared_lock<decltype(guard)> lk(stream_guard);