diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-12-19 02:13:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-12-19 02:13:12 +0100 |
| commit | ea67859b383a31496a604e65a166974b20a1c94e (patch) | |
| tree | 1740b2658f5033b59442e3958ba77b53905b16fa /src/lib/player_text.cc | |
| parent | b5335ed37e52c216a6773789c0edba5f335c8df2 (diff) | |
Hack: delay decisions about subtitle position late enough that we can refresh the preview image quickly.attic/hack-faster-subtitle-moving
Diffstat (limited to 'src/lib/player_text.cc')
| -rw-r--r-- | src/lib/player_text.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/player_text.cc b/src/lib/player_text.cc index d31c7d024..ab28f9221 100644 --- a/src/lib/player_text.cc +++ b/src/lib/player_text.cc @@ -41,3 +41,31 @@ PlayerText::add_fonts (list<shared_ptr<Font> > fonts_) } } } + +bool +operator== (PlayerText const & a, PlayerText const & b) +{ + if (a.fonts.size() != b.fonts.size()) { + return false; + } + + { + list<shared_ptr<Font> >::const_iterator i = a.fonts.begin(); + list<shared_ptr<Font> >::const_iterator j = b.fonts.begin(); + while (i != a.fonts.end()) { + if (**i != **j) { + return false; + } + ++i; + ++j; + } + } + + return a.bitmap == b.bitmap && a.string == b.string; +} + +bool +operator!= (PlayerText const & a, PlayerText const & b) +{ + return !(a == b); +} |
