]> git.sesse.net Git - nageru/commitdiff
Move NonBouncingYCbCrInput into its own header file.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 11 Apr 2017 19:40:46 +0000 (21:40 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 12 Apr 2017 16:58:36 +0000 (18:58 +0200)
theme.h
tweaked_inputs.h [new file with mode: 0644]

diff --git a/theme.h b/theme.h
index 2a8b9d68b12afc44910a7d03059e44fe97a6b4f7..5580909f549396fb891f6c0f3b82304c3847394c 100644 (file)
--- a/theme.h
+++ b/theme.h
@@ -13,6 +13,7 @@
 
 #include "bmusb/bmusb.h"
 #include "ref_counted_frame.h"
+#include "tweaked_inputs.h"
 
 struct InputState;
 
@@ -20,21 +21,8 @@ namespace movit {
 class Effect;
 class EffectChain;
 class ResourcePool;
-struct ImageFormat;
-struct YCbCrFormat;
 }  // namespace movit
 
-class NonBouncingYCbCrInput : public movit::YCbCrInput {
-public:
-       NonBouncingYCbCrInput(const movit::ImageFormat &image_format,
-                             const movit::YCbCrFormat &ycbcr_format,
-                             unsigned width, unsigned height,
-                             movit::YCbCrInputSplitting ycbcr_input_splitting = movit::YCBCR_INPUT_PLANAR)
-           : movit::YCbCrInput(image_format, ycbcr_format, width, height, ycbcr_input_splitting) {}
-
-       bool override_disable_bounce() const override { return true; }
-};
-
 class Theme {
 public:
        Theme(const std::string &filename, const std::vector<std::string> &search_dirs, movit::ResourcePool *resource_pool, unsigned num_cards);
diff --git a/tweaked_inputs.h b/tweaked_inputs.h
new file mode 100644 (file)
index 0000000..5478dde
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef _TWEAKED_INPUTS_H
+#define _TWEAKED_INPUTS_H 1
+
+// Some tweaked variations of Movit inputs.
+
+#include <movit/ycbcr_input.h>
+
+namespace movit {
+struct ImageFormat;
+struct YCbCrFormat;
+}  // namespace movit
+
+class NonBouncingYCbCrInput : public movit::YCbCrInput {
+public:
+        NonBouncingYCbCrInput(const movit::ImageFormat &image_format,
+                              const movit::YCbCrFormat &ycbcr_format,
+                              unsigned width, unsigned height,
+                              movit::YCbCrInputSplitting ycbcr_input_splitting = movit::YCBCR_INPUT_PLANAR)
+            : movit::YCbCrInput(image_format, ycbcr_format, width, height, ycbcr_input_splitting) {}
+
+        bool override_disable_bounce() const override { return true; }
+};
+
+#endif  // !defined(_TWEAKED_INPUTS_H)