xref: /aosp_15_r20/frameworks/native/services/surfaceflinger/SurfaceFlingerProperties.h (revision 38e8c45f13ce32b0dcecb25141ffecaf386fa17f)
1 /*
2  * Copyright 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef SURFACEFLINGERPROPERTIES_H_
18 #define SURFACEFLINGERPROPERTIES_H_
19 
20 #include <SurfaceFlingerProperties.sysprop.h>
21 #include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
22 #include <android/hardware/graphics/common/1.2/types.h>
23 #include <ui/ConfigStoreTypes.h>
24 
25 #include <cstdint>
26 #include <optional>
27 #include <vector>
28 
29 namespace android {
30 namespace sysprop {
31 
32 int64_t vsync_event_phase_offset_ns(int64_t defaultValue);
33 
34 int64_t vsync_sf_event_phase_offset_ns(int64_t defaultValue);
35 
36 bool use_context_priority(bool defaultValue);
37 
38 int64_t max_frame_buffer_acquired_buffers(int64_t defaultValue);
39 
40 int32_t max_graphics_width(int32_t defaultValue);
41 int32_t max_graphics_height(int32_t defaultValue);
42 
43 bool has_wide_color_display(bool defaultValue);
44 
45 bool running_without_sync_framework(bool defaultValue);
46 
47 bool has_HDR_display(bool defaultValue);
48 
49 int64_t present_time_offset_from_vsync_ns(int64_t defaultValue);
50 
51 bool force_hwc_copy_for_virtual_displays(bool defaultValue);
52 
53 int64_t max_virtual_display_dimension(int64_t defaultValue);
54 
55 bool use_vr_flinger(bool defaultValue);
56 
57 bool start_graphics_allocator_service(bool defaultValue);
58 
59 SurfaceFlingerProperties::primary_display_orientation_values primary_display_orientation(
60         SurfaceFlingerProperties::primary_display_orientation_values defaultValue);
61 
62 int64_t default_composition_dataspace(
63         android::hardware::graphics::common::V1_2::Dataspace defaultValue);
64 
65 int32_t default_composition_pixel_format(
66         android::hardware::graphics::common::V1_2::PixelFormat defaultValue);
67 
68 int64_t wcg_composition_dataspace(
69         android::hardware::graphics::common::V1_2::Dataspace defaultValue);
70 
71 int32_t wcg_composition_pixel_format(
72         android::hardware::graphics::common::V1_2::PixelFormat defaultValue);
73 
74 bool refresh_rate_switching(bool defaultValue);
75 
76 int32_t set_idle_timer_ms(int32_t defaultValue);
77 
78 int32_t set_touch_timer_ms(int32_t defaultValue);
79 
80 int32_t set_display_power_timer_ms(int32_t defaultValue);
81 
82 bool use_content_detection_for_refresh_rate(bool defaultValue);
83 
84 bool enable_protected_contents(bool defaultValue);
85 
86 bool support_kernel_idle_timer(bool defaultValue);
87 
88 int32_t display_update_imminent_timeout_ms(int32_t defaultValue);
89 
90 android::ui::DisplayPrimaries getDisplayNativePrimaries();
91 
92 bool update_device_product_info_on_hotplug_reconnect(bool defaultValue);
93 
94 bool enable_frame_rate_override(bool defaultValue);
95 
96 bool enable_layer_caching(bool defaultValue);
97 
98 bool enable_sdr_dimming(bool defaultValue);
99 
100 bool ignore_hdr_camera_layers(bool defaultValue);
101 
102 bool clear_slots_with_set_layer_buffer(bool defaultValue);
103 
104 int32_t game_default_frame_rate_override(int32_t defaultValue);
105 
106 } // namespace sysprop
107 } // namespace android
108 #endif // SURFACEFLINGERPROPERTIES_H_
109