From: Steinar H. Gunderson Date: Tue, 11 Apr 2017 19:40:46 +0000 (+0200) Subject: Move NonBouncingYCbCrInput into its own header file. X-Git-Tag: 1.6.0~59 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4d288e59bea313bbc2369eaad5cfdfb28bbcd960;p=nageru Move NonBouncingYCbCrInput into its own header file. --- diff --git a/theme.h b/theme.h index 2a8b9d6..5580909 100644 --- 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 &search_dirs, movit::ResourcePool *resource_pool, unsigned num_cards); diff --git a/tweaked_inputs.h b/tweaked_inputs.h new file mode 100644 index 0000000..5478dde --- /dev/null +++ b/tweaked_inputs.h @@ -0,0 +1,24 @@ +#ifndef _TWEAKED_INPUTS_H +#define _TWEAKED_INPUTS_H 1 + +// Some tweaked variations of Movit inputs. + +#include + +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)