1 /* 2 * Copyright (C) 2024 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 #pragma once 18 19 #include <set> 20 21 namespace android::hardware::graphics::composer { 22 23 inline const std::set<Fraction<int>> kFpsMappingTable = {{240, 240}, {240, 120}, {240, 24}, 24 {240, 10}, {240, 8}, {240, 7}, 25 {240, 6}, {240, 5}, {240, 4}, 26 {240, 3}, {240, 2}}; 27 28 inline const std::vector<int> kFpsLowPowerModeMappingTable = {1, 30}; 29 30 const std::vector<int> kActivePowerModes = {HWC2_POWER_MODE_DOZE, HWC2_POWER_MODE_ON}; 31 32 const std::vector<RefreshSource> kRefreshSource = {kRefreshSourceActivePresent, 33 kRefreshSourceIdlePresent, 34 kRefreshSourceFrameInsertion, 35 kRefreshSourceBrightness}; 36 } // namespace android::hardware::graphics::composer 37