1 /*
2  * Copyright (C) 2023 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 package com.android.server.display.mode
18 
19 import com.android.server.display.config.RefreshRateData
20 import com.android.server.display.config.SupportedModeData
21 
createVotesSummarynull22 internal fun createVotesSummary(
23         isDisplayResolutionRangeVotingEnabled: Boolean = true,
24         supportedModesVoteEnabled: Boolean = true,
25         loggingEnabled: Boolean = true,
26         supportsFrameRateOverride: Boolean = true
27 ): VoteSummary {
28     return VoteSummary(isDisplayResolutionRangeVotingEnabled, supportedModesVoteEnabled,
29             loggingEnabled, supportsFrameRateOverride)
30 }
31 
createRefreshRateDatanull32 fun createRefreshRateData(
33         defaultRefreshRate: Int = 60,
34         defaultPeakRefreshRate: Int = 60,
35         defaultRefreshRateInHbmHdr: Int = 60,
36         defaultRefreshRateInHbmSunlight: Int = 60,
37         lowPowerSupportedModes: List<SupportedModeData> = emptyList(),
38         lowLightBlockingZoneSupportedModes: List<SupportedModeData> = emptyList()
39 ): RefreshRateData {
40         return RefreshRateData(defaultRefreshRate, defaultPeakRefreshRate,
41                 defaultRefreshRateInHbmHdr, defaultRefreshRateInHbmSunlight,
42                 lowPowerSupportedModes, lowLightBlockingZoneSupportedModes)
43 }
44