]> git.sesse.net Git - nageru/commitdiff
Combine ref_counted_gl_sync.h from Nageru and Futatabi. (Only whitespace differences.)
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 1 Dec 2018 23:40:54 +0000 (00:40 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 1 Dec 2018 23:40:54 +0000 (00:40 +0100)
futatabi/main.cpp
futatabi/video_stream.h
nageru/decklink_output.h
nageru/glwidget.cpp
nageru/mixer.cpp
nageru/mixer.h
nageru/quicksync_encoder.h
nageru/quicksync_encoder_impl.h
nageru/ref_counted_gl_sync.h [deleted file]
nageru/video_encoder.h
shared/ref_counted_gl_sync.h [moved from futatabi/ref_counted_gl_sync.h with 100% similarity]

index 41bbb82b41d165a34b4446b87673f814f673def6..58a131aa26c50e836b1b2ead40687f1f9553d57b 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 #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"
index 736a20fe275ca7acacf9bd6be1e79377877840ac..d0634e0d7b563c84d9c12b1471376009afb8003e 100644 (file)
@@ -10,7 +10,7 @@ extern "C" {
 
 #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>
index 44eb86dea9860e6480c4552aeaf352a5990bf979..29ea29c177481fbe3d3850de8e6cdbb9b79bb1fb 100644 (file)
@@ -21,7 +21,7 @@
 #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 {
 
index bf537de2dbdb0806d2c41fec0b8ebf3fcd74d8e7..8316824693ce010826128ddc8f969812fc30deb4 100644 (file)
@@ -25,7 +25,7 @@
 #include "flags.h"
 #include "mainwindow.h"
 #include "mixer.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
 
 class QMouseEvent;
 
index 79966b5d95be1f9dfa2371f646be11a0c527dd7e..fa944944caf1b49274d32accb09124252e92fb54 100644 (file)
@@ -47,7 +47,7 @@
 #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"
index 992bcb9b182e08d8fcfb19ffc82f0bd143914b4c..2c394494a932561bdd99499e921295c8eeda6fe4 100644 (file)
@@ -33,7 +33,7 @@
 #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"
index 110d615ed05e846b85aae14ad4422a64166092f2..4f71f90067d3d8349f7f7ad11fe163c2b670dcf5 100644 (file)
@@ -43,7 +43,7 @@ extern "C" {
 #include <libavformat/avformat.h>
 }
 
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
 
 class DiskSpaceEstimator;
 class Mux;
index 6e6e759c9c351d4bcf95bc533472d9e2633274c7..e0da15d848e3cbf615aa85d0e1af2c09f1e759fc 100644 (file)
@@ -19,7 +19,7 @@
 #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
diff --git a/nageru/ref_counted_gl_sync.h b/nageru/ref_counted_gl_sync.h
deleted file mode 100644 (file)
index 8b6db68..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#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)
index 21595a380c992b7df76c0d3531e0cee72b5b2cfe..5c42ef81f1a6c94fd1a68d4be4e755f3a5fd63df 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
 }
 
 #include "mux.h"
-#include "ref_counted_gl_sync.h"
+#include "shared/ref_counted_gl_sync.h"
 
 class AudioEncoder;
 class DiskSpaceEstimator;