~raof/mir/proper-driver-loading

« back to all changes in this revision

Viewing changes to src/client/android/android_native_display_container.h

  • Committer: Christopher James Halse Rogers
  • Date: 2014-11-26 03:45:31 UTC
  • Revision ID: christopher.halse.rogers@canonical.com-20141126034531-d7x06j64me6i6rb3
Drop the mir_connection() member of mcl::ClientContext

The only thing the client platform needs to do is to extract the platform package,
which the existing populate() method already does.

Not exposing a MirConnection* makes the interface smaller, easier to test, and mock

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include "mir_toolkit/client_types.h"
25
25
 
 
26
#include <unordered_set>
 
27
#include <mutex>
 
28
 
26
29
namespace mir
27
30
{
28
31
namespace client
36
39
    AndroidNativeDisplayContainer();
37
40
    virtual ~AndroidNativeDisplayContainer();
38
41
 
39
 
    MirEGLNativeDisplayType create(MirConnection* connection);
 
42
    MirEGLNativeDisplayType create(ClientContext* context) override;
40
43
    void release(MirEGLNativeDisplayType display);
41
44
 
42
45
    bool validate(MirEGLNativeDisplayType display) const;
44
47
protected:
45
48
    AndroidNativeDisplayContainer(AndroidNativeDisplayContainer const&) = delete;
46
49
    AndroidNativeDisplayContainer& operator=(AndroidNativeDisplayContainer const&) = delete;
 
50
 
 
51
private:
 
52
    std::mutex mutable guard;
 
53
    std::unordered_set<MirEGLNativeDisplayType> valid_displays;
47
54
};
48
55
 
49
56
}