Peiyong Lin | 6a043d5 | 2019-04-01 17:18:21 -0700 | [diff] [blame] | 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 | */ |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 16 | |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 17 | #include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h> |
| 18 | #include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h> |
| 19 | #include <android/hardware/configstore/1.1/types.h> |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 20 | #include <configstore/Utils.h> |
Ady Abraham | 48da070 | 2020-02-04 15:59:25 -0800 | [diff] [blame] | 21 | #include <utils/Log.h> |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 22 | |
Ana Krulec | 3f6a206 | 2020-01-23 15:48:01 -0800 | [diff] [blame] | 23 | #include <log/log.h> |
Sundong Ahn | 85131bd | 2019-02-18 15:51:53 +0900 | [diff] [blame] | 24 | #include <cstdlib> |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 25 | #include <tuple> |
| 26 | |
| 27 | #include "SurfaceFlingerProperties.h" |
| 28 | |
| 29 | namespace android { |
| 30 | namespace sysprop { |
| 31 | using namespace android::hardware::configstore; |
| 32 | using namespace android::hardware::configstore::V1_0; |
Sundong Ahn | cb20cca | 2019-02-22 11:57:38 +0900 | [diff] [blame] | 33 | using android::hardware::graphics::common::V1_2::Dataspace; |
| 34 | using android::hardware::graphics::common::V1_2::PixelFormat; |
| 35 | using android::ui::DisplayPrimaries; |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 36 | |
| 37 | int64_t vsync_event_phase_offset_ns(int64_t defaultValue) { |
| 38 | auto temp = SurfaceFlingerProperties::vsync_event_phase_offset_ns(); |
| 39 | if (temp.has_value()) { |
| 40 | return *temp; |
| 41 | } |
| 42 | return getInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::vsyncEventPhaseOffsetNs>( |
| 43 | defaultValue); |
| 44 | } |
| 45 | |
| 46 | int64_t vsync_sf_event_phase_offset_ns(int64_t defaultValue) { |
| 47 | auto temp = SurfaceFlingerProperties::vsync_sf_event_phase_offset_ns(); |
| 48 | if (temp.has_value()) { |
| 49 | return *temp; |
| 50 | } |
| 51 | return getInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs>( |
| 52 | defaultValue); |
| 53 | } |
| 54 | |
| 55 | bool use_context_priority(bool defaultValue) { |
| 56 | auto temp = SurfaceFlingerProperties::use_context_priority(); |
| 57 | if (temp.has_value()) { |
| 58 | return *temp; |
| 59 | } |
| 60 | return getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useContextPriority>( |
| 61 | defaultValue); |
| 62 | } |
| 63 | |
| 64 | int64_t max_frame_buffer_acquired_buffers(int64_t defaultValue) { |
| 65 | auto temp = SurfaceFlingerProperties::max_frame_buffer_acquired_buffers(); |
| 66 | if (temp.has_value()) { |
| 67 | return *temp; |
| 68 | } |
| 69 | return getInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers>( |
| 70 | defaultValue); |
| 71 | } |
| 72 | |
Brian Lindahl | a13f2d5 | 2020-03-05 11:54:17 +0100 | [diff] [blame] | 73 | int32_t max_graphics_width(int32_t defaultValue) { |
| 74 | auto temp = SurfaceFlingerProperties::max_graphics_width(); |
| 75 | if (temp.has_value()) { |
| 76 | return *temp; |
| 77 | } |
| 78 | return defaultValue; |
| 79 | } |
| 80 | |
| 81 | int32_t max_graphics_height(int32_t defaultValue) { |
| 82 | auto temp = SurfaceFlingerProperties::max_graphics_height(); |
| 83 | if (temp.has_value()) { |
| 84 | return *temp; |
| 85 | } |
| 86 | return defaultValue; |
| 87 | } |
| 88 | |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 89 | bool has_wide_color_display(bool defaultValue) { |
| 90 | auto temp = SurfaceFlingerProperties::has_wide_color_display(); |
| 91 | if (temp.has_value()) { |
| 92 | return *temp; |
| 93 | } |
| 94 | return getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasWideColorDisplay>( |
| 95 | defaultValue); |
| 96 | } |
| 97 | |
| 98 | bool running_without_sync_framework(bool defaultValue) { |
| 99 | auto temp = SurfaceFlingerProperties::running_without_sync_framework(); |
| 100 | if (temp.has_value()) { |
| 101 | return !(*temp); |
| 102 | } |
| 103 | return getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasSyncFramework>(defaultValue); |
| 104 | } |
| 105 | |
| 106 | bool has_HDR_display(bool defaultValue) { |
| 107 | auto temp = SurfaceFlingerProperties::has_HDR_display(); |
| 108 | if (temp.has_value()) { |
| 109 | return *temp; |
| 110 | } |
| 111 | return getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasHDRDisplay>(defaultValue); |
| 112 | } |
| 113 | |
| 114 | int64_t present_time_offset_from_vsync_ns(int64_t defaultValue) { |
| 115 | auto temp = SurfaceFlingerProperties::present_time_offset_from_vsync_ns(); |
| 116 | if (temp.has_value()) { |
| 117 | return *temp; |
| 118 | } |
| 119 | return getInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs>( |
| 120 | defaultValue); |
| 121 | } |
| 122 | |
| 123 | bool force_hwc_copy_for_virtual_displays(bool defaultValue) { |
| 124 | auto temp = SurfaceFlingerProperties::force_hwc_copy_for_virtual_displays(); |
| 125 | if (temp.has_value()) { |
| 126 | return *temp; |
| 127 | } |
| 128 | return getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useHwcForRGBtoYUV>( |
| 129 | defaultValue); |
| 130 | } |
| 131 | |
| 132 | int64_t max_virtual_display_dimension(int64_t defaultValue) { |
| 133 | auto temp = SurfaceFlingerProperties::max_virtual_display_dimension(); |
| 134 | if (temp.has_value()) { |
| 135 | return *temp; |
| 136 | } |
| 137 | return getUInt64<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::maxVirtualDisplaySize>( |
| 138 | defaultValue); |
| 139 | } |
| 140 | |
| 141 | bool use_vr_flinger(bool defaultValue) { |
| 142 | auto temp = SurfaceFlingerProperties::use_vr_flinger(); |
| 143 | if (temp.has_value()) { |
| 144 | return *temp; |
| 145 | } |
| 146 | return getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::useVrFlinger>(defaultValue); |
| 147 | } |
| 148 | |
| 149 | bool start_graphics_allocator_service(bool defaultValue) { |
| 150 | auto temp = SurfaceFlingerProperties::start_graphics_allocator_service(); |
| 151 | if (temp.has_value()) { |
| 152 | return *temp; |
| 153 | } |
| 154 | return getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::startGraphicsAllocatorService>( |
| 155 | defaultValue); |
| 156 | } |
| 157 | |
| 158 | SurfaceFlingerProperties::primary_display_orientation_values primary_display_orientation( |
| 159 | SurfaceFlingerProperties::primary_display_orientation_values defaultValue) { |
| 160 | auto temp = SurfaceFlingerProperties::primary_display_orientation(); |
| 161 | if (temp.has_value()) { |
| 162 | return *temp; |
| 163 | } |
| 164 | auto configDefault = DisplayOrientation::ORIENTATION_0; |
| 165 | switch (defaultValue) { |
| 166 | case SurfaceFlingerProperties::primary_display_orientation_values::ORIENTATION_90: |
| 167 | configDefault = DisplayOrientation::ORIENTATION_90; |
| 168 | break; |
| 169 | case SurfaceFlingerProperties::primary_display_orientation_values::ORIENTATION_180: |
| 170 | configDefault = DisplayOrientation::ORIENTATION_180; |
| 171 | break; |
| 172 | case SurfaceFlingerProperties::primary_display_orientation_values::ORIENTATION_270: |
| 173 | configDefault = DisplayOrientation::ORIENTATION_270; |
| 174 | break; |
| 175 | default: |
| 176 | configDefault = DisplayOrientation::ORIENTATION_0; |
| 177 | break; |
| 178 | } |
| 179 | DisplayOrientation result = |
| 180 | getDisplayOrientation<V1_1::ISurfaceFlingerConfigs, |
| 181 | &V1_1::ISurfaceFlingerConfigs::primaryDisplayOrientation>( |
| 182 | configDefault); |
| 183 | switch (result) { |
| 184 | case DisplayOrientation::ORIENTATION_90: |
| 185 | return SurfaceFlingerProperties::primary_display_orientation_values::ORIENTATION_90; |
| 186 | case DisplayOrientation::ORIENTATION_180: |
| 187 | return SurfaceFlingerProperties::primary_display_orientation_values::ORIENTATION_180; |
| 188 | case DisplayOrientation::ORIENTATION_270: |
| 189 | return SurfaceFlingerProperties::primary_display_orientation_values::ORIENTATION_270; |
| 190 | default: |
| 191 | break; |
| 192 | } |
| 193 | return SurfaceFlingerProperties::primary_display_orientation_values::ORIENTATION_0; |
| 194 | } |
| 195 | |
| 196 | bool use_color_management(bool defaultValue) { |
| 197 | auto tmpuseColorManagement = SurfaceFlingerProperties::use_color_management(); |
Peiyong Lin | 8cabfc3 | 2019-06-14 14:25:43 -0700 | [diff] [blame] | 198 | auto tmpHasHDRDisplayVal = has_HDR_display(defaultValue); |
| 199 | auto tmpHasWideColorDisplayVal = has_wide_color_display(defaultValue); |
Daniel Solomon | 94a4df4 | 2019-03-01 16:27:39 -0800 | [diff] [blame] | 200 | |
| 201 | auto tmpuseColorManagementVal = tmpuseColorManagement.has_value() ? *tmpuseColorManagement : |
| 202 | defaultValue; |
Daniel Solomon | 94a4df4 | 2019-03-01 16:27:39 -0800 | [diff] [blame] | 203 | |
| 204 | return tmpuseColorManagementVal || tmpHasHDRDisplayVal || tmpHasWideColorDisplayVal; |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 205 | } |
| 206 | |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 207 | int64_t default_composition_dataspace(Dataspace defaultValue) { |
| 208 | auto temp = SurfaceFlingerProperties::default_composition_dataspace(); |
| 209 | if (temp.has_value()) { |
| 210 | return *temp; |
| 211 | } |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 212 | return static_cast<int64_t>(defaultValue); |
| 213 | } |
| 214 | |
| 215 | int32_t default_composition_pixel_format(PixelFormat defaultValue) { |
| 216 | auto temp = SurfaceFlingerProperties::default_composition_pixel_format(); |
| 217 | if (temp.has_value()) { |
| 218 | return *temp; |
| 219 | } |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 220 | return static_cast<int32_t>(defaultValue); |
| 221 | } |
| 222 | |
| 223 | int64_t wcg_composition_dataspace(Dataspace defaultValue) { |
| 224 | auto temp = SurfaceFlingerProperties::wcg_composition_dataspace(); |
| 225 | if (temp.has_value()) { |
| 226 | return *temp; |
| 227 | } |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 228 | return static_cast<int64_t>(defaultValue); |
| 229 | } |
| 230 | |
| 231 | int32_t wcg_composition_pixel_format(PixelFormat defaultValue) { |
| 232 | auto temp = SurfaceFlingerProperties::wcg_composition_pixel_format(); |
| 233 | if (temp.has_value()) { |
| 234 | return *temp; |
| 235 | } |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 236 | return static_cast<int32_t>(defaultValue); |
| 237 | } |
| 238 | |
Yichi Chen | da901bf | 2019-06-28 14:58:27 +0800 | [diff] [blame] | 239 | int64_t color_space_agnostic_dataspace(Dataspace defaultValue) { |
| 240 | auto temp = SurfaceFlingerProperties::color_space_agnostic_dataspace(); |
| 241 | if (temp.has_value()) { |
| 242 | return *temp; |
| 243 | } |
| 244 | return static_cast<int64_t>(defaultValue); |
| 245 | } |
| 246 | |
Ana Krulec | 10e0205 | 2020-02-04 17:16:10 +0000 | [diff] [blame] | 247 | bool refresh_rate_switching(bool defaultValue) { |
Ana Krulec | 3f6a206 | 2020-01-23 15:48:01 -0800 | [diff] [blame] | 248 | #pragma clang diagnostic push |
| 249 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
Ana Krulec | 10e0205 | 2020-02-04 17:16:10 +0000 | [diff] [blame] | 250 | auto temp = SurfaceFlingerProperties::refresh_rate_switching(); |
Ana Krulec | 3f6a206 | 2020-01-23 15:48:01 -0800 | [diff] [blame] | 251 | #pragma clang diagnostic pop |
Ana Krulec | 10e0205 | 2020-02-04 17:16:10 +0000 | [diff] [blame] | 252 | if (temp.has_value()) { |
Ana Krulec | 3f6a206 | 2020-01-23 15:48:01 -0800 | [diff] [blame] | 253 | ALOGW("Using deprecated refresh_rate_switching sysprop. Value: %d", *temp); |
Ana Krulec | 10e0205 | 2020-02-04 17:16:10 +0000 | [diff] [blame] | 254 | return *temp; |
| 255 | } |
| 256 | return defaultValue; |
| 257 | } |
| 258 | |
Ady Abraham | be59c0d | 2019-03-05 13:01:13 -0800 | [diff] [blame] | 259 | int32_t set_idle_timer_ms(int32_t defaultValue) { |
| 260 | auto temp = SurfaceFlingerProperties::set_idle_timer_ms(); |
| 261 | if (temp.has_value()) { |
| 262 | return *temp; |
| 263 | } |
| 264 | return defaultValue; |
| 265 | } |
| 266 | |
Ady Abraham | 8532d01 | 2019-05-08 14:50:56 -0700 | [diff] [blame] | 267 | int32_t set_touch_timer_ms(int32_t defaultValue) { |
| 268 | auto temp = SurfaceFlingerProperties::set_touch_timer_ms(); |
| 269 | if (temp.has_value()) { |
| 270 | return *temp; |
| 271 | } |
| 272 | return defaultValue; |
| 273 | } |
| 274 | |
Ady Abraham | 6fe2c17 | 2019-07-12 12:37:57 -0700 | [diff] [blame] | 275 | int32_t set_display_power_timer_ms(int32_t defaultValue) { |
| 276 | auto temp = SurfaceFlingerProperties::set_display_power_timer_ms(); |
| 277 | if (temp.has_value()) { |
| 278 | return *temp; |
| 279 | } |
| 280 | return defaultValue; |
| 281 | } |
| 282 | |
Ady Abraham | 48da070 | 2020-02-04 15:59:25 -0800 | [diff] [blame] | 283 | bool use_content_detection_for_refresh_rate(bool defaultValue) { |
| 284 | #pragma clang diagnostic push |
| 285 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 286 | auto smart_90_deprecated = SurfaceFlingerProperties::use_smart_90_for_video(); |
| 287 | #pragma clang diagnostic pop |
| 288 | if (smart_90_deprecated.has_value()) { |
| 289 | ALOGW("Using deprecated use_smart_90_for_video sysprop. Value: %d", *smart_90_deprecated); |
| 290 | return *smart_90_deprecated; |
| 291 | } |
| 292 | |
| 293 | auto temp = SurfaceFlingerProperties::use_content_detection_for_refresh_rate(); |
Ana Krulec | e5a06e0 | 2019-03-06 17:09:03 -0800 | [diff] [blame] | 294 | if (temp.has_value()) { |
| 295 | return *temp; |
| 296 | } |
| 297 | return defaultValue; |
| 298 | } |
| 299 | |
Peiyong Lin | 6a043d5 | 2019-04-01 17:18:21 -0700 | [diff] [blame] | 300 | bool enable_protected_contents(bool defaultValue) { |
| 301 | auto temp = SurfaceFlingerProperties::enable_protected_contents(); |
| 302 | if (temp.has_value()) { |
| 303 | return *temp; |
| 304 | } |
| 305 | return defaultValue; |
| 306 | } |
| 307 | |
Alec Mouri | dc28b37 | 2019-04-18 21:17:13 -0700 | [diff] [blame] | 308 | bool support_kernel_idle_timer(bool defaultValue) { |
| 309 | auto temp = SurfaceFlingerProperties::support_kernel_idle_timer(); |
| 310 | if (temp.has_value()) { |
| 311 | return *temp; |
| 312 | } |
| 313 | return defaultValue; |
| 314 | } |
| 315 | |
Ana Krulec | 3803b8d | 2020-02-03 16:35:46 -0800 | [diff] [blame] | 316 | bool use_frame_rate_api(bool defaultValue) { |
| 317 | auto temp = SurfaceFlingerProperties::use_frame_rate_api(); |
| 318 | if (temp.has_value()) { |
| 319 | return *temp; |
| 320 | } |
| 321 | return defaultValue; |
| 322 | } |
| 323 | |
John Reck | ac09e45 | 2021-04-07 16:35:37 -0400 | [diff] [blame^] | 324 | bool enable_sdr_dimming(bool defaultValue) { |
| 325 | return SurfaceFlingerProperties::enable_sdr_dimming().value_or(defaultValue); |
| 326 | } |
| 327 | |
Dan Stoza | 030fbc1 | 2020-02-19 15:32:01 -0800 | [diff] [blame] | 328 | int32_t display_update_imminent_timeout_ms(int32_t defaultValue) { |
| 329 | auto temp = SurfaceFlingerProperties::display_update_imminent_timeout_ms(); |
| 330 | if (temp.has_value()) { |
| 331 | return *temp; |
| 332 | } |
| 333 | return defaultValue; |
| 334 | } |
| 335 | |
Sundong Ahn | 85131bd | 2019-02-18 15:51:53 +0900 | [diff] [blame] | 336 | #define DISPLAY_PRIMARY_SIZE 3 |
| 337 | |
| 338 | constexpr float kSrgbRedX = 0.4123f; |
| 339 | constexpr float kSrgbRedY = 0.2126f; |
| 340 | constexpr float kSrgbRedZ = 0.0193f; |
| 341 | constexpr float kSrgbGreenX = 0.3576f; |
| 342 | constexpr float kSrgbGreenY = 0.7152f; |
| 343 | constexpr float kSrgbGreenZ = 0.1192f; |
| 344 | constexpr float kSrgbBlueX = 0.1805f; |
| 345 | constexpr float kSrgbBlueY = 0.0722f; |
| 346 | constexpr float kSrgbBlueZ = 0.9506f; |
| 347 | constexpr float kSrgbWhiteX = 0.9505f; |
| 348 | constexpr float kSrgbWhiteY = 1.0000f; |
| 349 | constexpr float kSrgbWhiteZ = 1.0891f; |
| 350 | |
| 351 | DisplayPrimaries getDisplayNativePrimaries() { |
| 352 | auto mDisplay_primary_red = SurfaceFlingerProperties::display_primary_red(); |
| 353 | auto mDisplay_primary_green = SurfaceFlingerProperties::display_primary_green(); |
| 354 | auto mDisplay_primary_blue = SurfaceFlingerProperties::display_primary_blue(); |
| 355 | auto mDisplay_primary_white = SurfaceFlingerProperties::display_primary_white(); |
| 356 | // To avoid null point exception. |
| 357 | mDisplay_primary_red.resize(DISPLAY_PRIMARY_SIZE); |
| 358 | mDisplay_primary_green.resize(DISPLAY_PRIMARY_SIZE); |
| 359 | mDisplay_primary_blue.resize(DISPLAY_PRIMARY_SIZE); |
| 360 | mDisplay_primary_white.resize(DISPLAY_PRIMARY_SIZE); |
| 361 | DisplayPrimaries primaries = |
| 362 | {{static_cast<float>(mDisplay_primary_red[0].value_or(kSrgbRedX)), |
| 363 | static_cast<float>(mDisplay_primary_red[1].value_or(kSrgbRedY)), |
| 364 | static_cast<float>(mDisplay_primary_red[2].value_or(kSrgbRedZ))}, |
| 365 | {static_cast<float>(mDisplay_primary_green[0].value_or(kSrgbGreenX)), |
| 366 | static_cast<float>(mDisplay_primary_green[1].value_or(kSrgbGreenY)), |
| 367 | static_cast<float>(mDisplay_primary_green[2].value_or(kSrgbGreenZ))}, |
| 368 | {static_cast<float>(mDisplay_primary_blue[0].value_or(kSrgbBlueX)), |
| 369 | static_cast<float>(mDisplay_primary_blue[1].value_or(kSrgbBlueY)), |
| 370 | static_cast<float>(mDisplay_primary_blue[2].value_or(kSrgbBlueZ))}, |
| 371 | {static_cast<float>(mDisplay_primary_white[0].value_or(kSrgbWhiteX)), |
| 372 | static_cast<float>(mDisplay_primary_white[1].value_or(kSrgbWhiteY)), |
| 373 | static_cast<float>(mDisplay_primary_white[2].value_or(kSrgbWhiteZ))}}; |
| 374 | |
| 375 | return primaries; |
| 376 | } |
| 377 | |
Marin Shalamanov | f8c6372 | 2020-10-06 13:11:21 +0200 | [diff] [blame] | 378 | bool update_device_product_info_on_hotplug_reconnect(bool defaultValue) { |
| 379 | return SurfaceFlingerProperties::update_device_product_info_on_hotplug_reconnect().value_or( |
| 380 | defaultValue); |
| 381 | } |
| 382 | |
Ady Abraham | 4899ff8 | 2021-01-06 13:53:29 -0800 | [diff] [blame] | 383 | bool enable_frame_rate_override(bool defaultValue) { |
| 384 | return SurfaceFlingerProperties::enable_frame_rate_override().value_or(defaultValue); |
| 385 | } |
| 386 | |
Ady Abraham | 9c87def | 2021-02-18 11:25:28 -0800 | [diff] [blame] | 387 | bool enable_layer_caching(bool defaultValue) { |
| 388 | return SurfaceFlingerProperties::enable_layer_caching().value_or(defaultValue); |
| 389 | } |
| 390 | |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 391 | } // namespace sysprop |
| 392 | } // namespace android |