/usr/include/compiz/opengl/doublebuffer.h is in compiz-dev 1:0.9.12.2+16.04.20160415-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #ifndef _COMPIZ_OPENGL_BUFFERBLIT_H
#define _COMPIZ_OPENGL_BUFFERBLIT_H
#include <core/region.h>
#include <boost/function.hpp>
namespace compiz
{
namespace opengl
{
namespace impl
{
typedef boost::function <int (int, int, unsigned int *)> GLXWaitVideoSyncSGIFunc;
typedef boost::function <void (int)> GLXSwapIntervalEXTFunc;
}
class DoubleBuffer
{
public:
DoubleBuffer (const impl::GLXSwapIntervalEXTFunc &swapIntervalFunc,
const impl::GLXWaitVideoSyncSGIFunc &waitVideoSyncFunc);
virtual ~DoubleBuffer ();
virtual void swap () const = 0;
virtual bool blitAvailable () const = 0;
virtual void blit (const CompRegion ®ion) const = 0;
virtual bool fallbackBlitAvailable () const = 0;
virtual void fallbackBlit (const CompRegion ®ion) const = 0;
virtual void copyFrontToBack () const = 0;
typedef enum
{
VSYNC,
HAVE_PERSISTENT_BACK_BUFFER,
NEED_PERSISTENT_BACK_BUFFER,
_NSETTINGS
} Setting;
typedef enum _RedrawType
{
Swap,
Blit
} FrontbufferRedrawType;
typedef enum _SyncType
{
NoSync = 0,
Async = 1,
Blocking = 2
} SyncType;
typedef enum _FrameThrottleState
{
ExternalFrameThrottlingRequired,
FrameThrottledInternally
} FrameThrottleState;
void set (Setting name, bool value);
void render (const CompRegion ®ion, bool fullscreen);
void vsync (FrontbufferRedrawType redrawType);
bool hardwareVSyncFunctional ();
protected:
bool setting[_NSETTINGS];
private:
virtual bool enableAsyncVideoSync (FrontbufferRedrawType, FrameThrottleState &);
virtual void disableAsyncVideoSync ();
virtual bool enableBlockingVideoSync (FrontbufferRedrawType, FrameThrottleState &);
virtual void disableBlockingVideoSync ();
SyncType syncType;
FrameThrottleState bufferFrameThrottleState;
unsigned int blockingVSyncUnthrottledFrames;
impl::GLXSwapIntervalEXTFunc swapIntervalFunc;
impl::GLXWaitVideoSyncSGIFunc waitVideoSyncFunc;
unsigned int lastVSyncCounter;
};
}
}
#endif
|