Mir
frame_dropping_policy_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014-2015 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
17  * Alberto Aguirre <alberto.aguirre@canonical.com>
18  */
19 
20 #ifndef MIR_COMPOSITOR_FRAME_DROPPING_POLICY_FACTORY_H_
21 #define MIR_COMPOSITOR_FRAME_DROPPING_POLICY_FACTORY_H_
22 
23 #include <memory>
24 
25 namespace mir
26 {
27 namespace compositor
28 {
29 class FrameDroppingPolicy;
30 
39 {
40 public:
41  FrameDroppingPolicyFactory() = default;
42  virtual ~FrameDroppingPolicyFactory() = default;
43 
46 
65  virtual std::unique_ptr<FrameDroppingPolicy> create_policy(
66  std::function<void()> const& drop_frame,
67  std::function<void()> const& lock,
68  std::function<void()> const& unlock) const = 0;
69 };
70 
71 }
72 }
73 
74 #endif // MIR_COMPOSITOR_FRAME_DROPPING_POLICY_FACTORY_H_
All things Mir.
Definition: buffer_stream.h:37
FrameDroppingPolicyFactory & operator=(FrameDroppingPolicyFactory const &)=delete
virtual std::unique_ptr< FrameDroppingPolicy > create_policy(std::function< void()> const &drop_frame, std::function< void()> const &lock, std::function< void()> const &unlock) const =0
Create a FrameDroppingPolicy that will call drop_frame when it decides to drop a frame.
Creator of FrameDroppingPolicies.
Definition: frame_dropping_policy_factory.h:38

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015