Mir
hwc_report.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_ANDROID_HWC_REPORT_H_
20 #define MIR_GRAPHICS_ANDROID_HWC_REPORT_H_
21 
22 #include "overlay_optimization.h"
24 #include "power_mode.h"
25 #include <hardware/hwcomposer.h>
26 
27 namespace mir
28 {
29 namespace graphics
30 {
31 namespace android
32 {
33 class HwcReport
34 {
35 public:
36  virtual ~HwcReport() = default;
37 
39  std::array<hwc_display_contents_1_t*, HWC_NUM_DISPLAY_TYPES> const& displays) const = 0;
40  virtual void report_prepare_done(
41  std::array<hwc_display_contents_1_t*, HWC_NUM_DISPLAY_TYPES> const& displays) const = 0;
42  virtual void report_set_list(
43  std::array<hwc_display_contents_1_t*, HWC_NUM_DISPLAY_TYPES> const& displays) const = 0;
44  virtual void report_set_done(
45  std::array<hwc_display_contents_1_t*, HWC_NUM_DISPLAY_TYPES> const& displays) const = 0;
46  virtual void report_overlay_optimization(OverlayOptimization optimization_option) const = 0;
47  virtual void report_display_on() const = 0;
48  virtual void report_display_off() const = 0;
49  virtual void report_vsync_on() const = 0;
50  virtual void report_vsync_off() const = 0;
51  virtual void report_hwc_version(HwcVersion) const = 0;
52  virtual void report_legacy_fb_module() const = 0;
53  virtual void report_power_mode(PowerMode mode) const = 0;
54 
55  void set_version(HwcVersion version) { hwc_version = version; }
56 
57 protected:
58  HwcReport() = default;
59  HwcReport& operator=(HwcReport const&) = delete;
60  HwcReport(HwcReport const&) = delete;
62 };
63 }
64 }
65 }
66 #endif /* MIR_GRAPHICS_ANDROID_HWC_REPORT_H_ */
All things Mir.
Definition: atomic_callback.h:25
virtual void report_set_list(std::array< hwc_display_contents_1_t *, HWC_NUM_DISPLAY_TYPES > const &displays) const =0
Definition: hwc_report.h:33
HwcVersion hwc_version
Definition: hwc_report.h:61
virtual void report_overlay_optimization(OverlayOptimization optimization_option) const =0
virtual void report_power_mode(PowerMode mode) const =0
virtual void report_vsync_off() const =0
Definition: display_resource_factory.h:50
virtual void report_prepare_done(std::array< hwc_display_contents_1_t *, HWC_NUM_DISPLAY_TYPES > const &displays) const =0
virtual void report_hwc_version(HwcVersion) const =0
OverlayOptimization
Definition: overlay_optimization.h:28
virtual void report_list_submitted_to_prepare(std::array< hwc_display_contents_1_t *, HWC_NUM_DISPLAY_TYPES > const &displays) const =0
virtual void report_legacy_fb_module() const =0
PowerMode
Definition: power_mode.h:31
virtual void report_set_done(std::array< hwc_display_contents_1_t *, HWC_NUM_DISPLAY_TYPES > const &displays) const =0
virtual void report_vsync_on() const =0
virtual void report_display_on() const =0
void set_version(HwcVersion version)
Definition: hwc_report.h:55
Definition: android_input_receiver.h:36
HwcVersion
Definition: display_resource_factory.h:42
virtual void report_display_off() const =0
HwcReport & operator=(HwcReport const &)=delete

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016