~kdub/mir/snapshot-error-checking

« back to all changes in this revision

Viewing changes to src/client/connection_surface_map.h

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2013-12-19 11:19:08 UTC
  • mfrom: (1288.1.2 mir)
  • Revision ID: tarmac-20131219111908-q2sm4w6trpl02rk4
client: slim down the mcl::SurfaceMap interface.

Approved by Daniel van Vugt, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
public:
35
35
    ConnectionSurfaceMap();
36
36
 
37
 
    void with_surface_do(int const& surface_id, std::function<void(MirSurface*)> exec);
38
 
    void insert(int const& surface_id, MirSurface* surface);
 
37
    void with_surface_do(int surface_id, std::function<void(MirSurface*)> exec) const override;
 
38
    void insert(int surface_id, MirSurface* surface);
39
39
    void erase(int surface_id);
40
40
 
41
41
private:
42
 
    std::mutex guard;
43
 
    typedef std::unordered_map<int, MirSurface*> SurfaceMap;
44
 
    SurfaceMap surfaces;
 
42
    std::mutex mutable guard;
 
43
    std::unordered_map<int, MirSurface*> surfaces;
45
44
};
46
45
 
47
46
}