#include "mainwindow.h"
#include "player.h"
#include "shared/post_to_main_thread.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
#include "shared/timebase.h"
#include "ui_mainwindow.h"
#include "vaapi_jpeg_decoder.h"
#include "frame_on_disk.h"
#include "jpeg_frame_view.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
#include "queue_spot_holder.h"
#include <chrono>
#include "print_latency.h"
#include "quittable_sleeper.h"
#include "ref_counted_frame.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
namespace movit {
#include "flags.h"
#include "mainwindow.h"
#include "mixer.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
class QMouseEvent;
#include "input_mapping.h"
#include "metrics.h"
#include "pbo_frame_allocator.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
#include "resampling_queue.h"
#include "shared/timebase.h"
#include "timecode_renderer.h"
#include "libusb.h"
#include "pbo_frame_allocator.h"
#include "ref_counted_frame.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
#include "theme.h"
#include "shared/timebase.h"
#include "video_encoder.h"
#include <libavformat/avformat.h>
}
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
class DiskSpaceEstimator;
class Mux;
#include "defs.h"
#include "shared/timebase.h"
#include "print_latency.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
#define SURFACE_NUM 16 /* 16 surfaces for source YUV */
#define MAX_NUM_REF1 16 // Seemingly a hardware-fixed value, not related to SURFACE_NUM
+++ /dev/null
-#ifndef _REF_COUNTED_GL_SYNC_H
-#define _REF_COUNTED_GL_SYNC_H 1
-
-// A wrapper around GLsync (OpenGL fences) that is automatically refcounted.
-// Useful since we sometimes want to use the same fence two entirely different
-// places. (We could set two fences at the same time, but they are not an
-// unlimited hardware resource, so it would be a bit wasteful.)
-
-#include <epoxy/gl.h>
-#include <memory>
-#include <mutex>
-
-typedef std::shared_ptr<__GLsync> RefCountedGLsyncBase;
-
-class RefCountedGLsync : public RefCountedGLsyncBase {
-public:
- RefCountedGLsync() {}
-
- RefCountedGLsync(GLenum condition, GLbitfield flags)
- : RefCountedGLsyncBase(locked_glFenceSync(condition, flags), glDeleteSync) {}
-
-private:
- // These are to work around apitrace bug #446.
- static GLsync locked_glFenceSync(GLenum condition, GLbitfield flags)
- {
- std::lock_guard<std::mutex> lock(fence_lock);
- return glFenceSync(condition, flags);
- }
-
- static void locked_glDeleteSync(GLsync sync)
- {
- std::lock_guard<std::mutex> lock(fence_lock);
- glDeleteSync(sync);
- }
-
- static std::mutex fence_lock;
-};
-
-#endif // !defined(_REF_COUNTED_GL_SYNC_H)
}
#include "mux.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
class AudioEncoder;
class DiskSpaceEstimator;