~brandontschaefer/mir/lp.1233089-fix-v-h-scroll

« back to all changes in this revision

Viewing changes to include/shared/mir/graphics/android/syncfence.h

  • Committer: Tarmac
  • Author(s): Kevin DuBois, Alan Griffiths, Alexandros Frantzis, Robert Ancell, Daniel d'Andrada
  • Date: 2013-09-26 04:50:57 UTC
  • mfrom: (1081.3.8 development-branch)
  • Revision ID: tarmac-20130926045057-w43xdxtxz8lhy8fg
frontend, config: Mechanism for connecting via a socket pair.
graphics: android: stop nex4 from tearing
gbm: Blank unused connected outputs.
compositor: tidy up configuration logic for initializing bypass flag.
tests: Add tests for Android's InputReader & friends
Bump libmirserver soname and Mir project version.

Approved by kevin gunn, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include "mir/graphics/android/sync_object.h"
22
22
 
23
 
#include <memory>
24
 
#define SYNC_IOC_WAIT 0x40043E00
25
 
 
26
23
namespace mir
27
24
{
28
25
namespace graphics
30
27
namespace android
31
28
{
32
29
 
33
 
class IoctlWrapper
34
 
{
35
 
public:
36
 
    virtual ~IoctlWrapper() {}
37
 
    virtual int ioctl(int fd, unsigned long int request, int* timeout) const = 0;
38
 
    virtual int close(int fd) const = 0;
39
 
 
40
 
protected:
41
 
    IoctlWrapper() = default;
42
 
    IoctlWrapper(IoctlWrapper const&) = delete;
43
 
    IoctlWrapper& operator=(IoctlWrapper const&) = delete;
44
 
};
45
 
 
46
30
class SyncFence : public SyncObject
47
31
{
48
32
public:
49
 
    SyncFence(int fd, std::shared_ptr<IoctlWrapper> const& wrapper);
 
33
    SyncFence();
 
34
    SyncFence(int fd);
50
35
    ~SyncFence() noexcept;
51
36
 
52
37
    void wait();
54
39
private:
55
40
    SyncFence(SyncFence const&) = delete;
56
41
    SyncFence& operator=(SyncFence const&) = delete;
57
 
 
58
 
    std::shared_ptr<IoctlWrapper> const ioctl_wrapper;
59
42
    int const fence_fd;
60
43
};
61
44