Loading libs/gui/SurfaceComposerClient.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ #include <ui/DisplayMode.h> #include <ui/DisplayState.h> #include <ui/DynamicDisplayInfo.h> #include <ui/FrameRateCategoryRate.h> #include <android-base/thread_annotations.h> #include <gui/LayerStatePermissions.h> Loading Loading @@ -2814,6 +2815,8 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf outInfo->gameContentTypeSupported = ginfo.gameContentTypeSupported; outInfo->preferredBootDisplayMode = ginfo.preferredBootDisplayMode; outInfo->hasArrSupport = ginfo.hasArrSupport; outInfo->frameRateCategoryRate = ui::FrameRateCategoryRate(ginfo.frameRateCategoryRate.normal, ginfo.frameRateCategoryRate.high); } status_t SurfaceComposerClient::getDynamicDisplayInfoFromId(int64_t displayId, Loading libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.gui; import android.gui.DisplayMode; import android.gui.FrameRateCategoryRate; import android.gui.HdrCapabilities; // Information about a physical display which may change on hotplug reconnect. Loading Loading @@ -46,4 +47,7 @@ parcelable DynamicDisplayInfo { // Represents whether display supports ARR. boolean hasArrSupport; // Represents frame rate for FrameRateCategory Normal and High. FrameRateCategoryRate frameRateCategoryRate; } libs/gui/aidl/android/gui/FrameRateCategoryRate.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.gui; /** @hide */ // Represents frame rate for FrameRateCategory Normal and High. parcelable FrameRateCategoryRate { float normal; float high; } No newline at end of file libs/ui/include/ui/DynamicDisplayInfo.h +4 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <optional> #include <vector> #include <ui/FrameRateCategoryRate.h> #include <ui/GraphicTypes.h> #include <ui/HdrCapabilities.h> Loading Loading @@ -55,6 +56,9 @@ struct DynamicDisplayInfo { std::optional<ui::DisplayMode> getActiveDisplayMode() const; bool hasArrSupport; // Represents frame rate for FrameRateCategory Normal and High. ui::FrameRateCategoryRate frameRateCategoryRate; }; } // namespace android::ui libs/ui/include/ui/FrameRateCategoryRate.h 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once namespace android::ui { // Represents frame rate for FrameRateCategory Normal and High. class FrameRateCategoryRate { public: FrameRateCategoryRate(float normal = 0, float high = 0) : mNormal(normal), mHigh(high) {} float getNormal() const { return mNormal; } float getHigh() const { return mHigh; } private: float mNormal; float mHigh; }; } // namespace android::ui No newline at end of file Loading
libs/gui/SurfaceComposerClient.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ #include <ui/DisplayMode.h> #include <ui/DisplayState.h> #include <ui/DynamicDisplayInfo.h> #include <ui/FrameRateCategoryRate.h> #include <android-base/thread_annotations.h> #include <gui/LayerStatePermissions.h> Loading Loading @@ -2814,6 +2815,8 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf outInfo->gameContentTypeSupported = ginfo.gameContentTypeSupported; outInfo->preferredBootDisplayMode = ginfo.preferredBootDisplayMode; outInfo->hasArrSupport = ginfo.hasArrSupport; outInfo->frameRateCategoryRate = ui::FrameRateCategoryRate(ginfo.frameRateCategoryRate.normal, ginfo.frameRateCategoryRate.high); } status_t SurfaceComposerClient::getDynamicDisplayInfoFromId(int64_t displayId, Loading
libs/gui/aidl/android/gui/DynamicDisplayInfo.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.gui; import android.gui.DisplayMode; import android.gui.FrameRateCategoryRate; import android.gui.HdrCapabilities; // Information about a physical display which may change on hotplug reconnect. Loading Loading @@ -46,4 +47,7 @@ parcelable DynamicDisplayInfo { // Represents whether display supports ARR. boolean hasArrSupport; // Represents frame rate for FrameRateCategory Normal and High. FrameRateCategoryRate frameRateCategoryRate; }
libs/gui/aidl/android/gui/FrameRateCategoryRate.aidl 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.gui; /** @hide */ // Represents frame rate for FrameRateCategory Normal and High. parcelable FrameRateCategoryRate { float normal; float high; } No newline at end of file
libs/ui/include/ui/DynamicDisplayInfo.h +4 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <optional> #include <vector> #include <ui/FrameRateCategoryRate.h> #include <ui/GraphicTypes.h> #include <ui/HdrCapabilities.h> Loading Loading @@ -55,6 +56,9 @@ struct DynamicDisplayInfo { std::optional<ui::DisplayMode> getActiveDisplayMode() const; bool hasArrSupport; // Represents frame rate for FrameRateCategory Normal and High. ui::FrameRateCategoryRate frameRateCategoryRate; }; } // namespace android::ui
libs/ui/include/ui/FrameRateCategoryRate.h 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once namespace android::ui { // Represents frame rate for FrameRateCategory Normal and High. class FrameRateCategoryRate { public: FrameRateCategoryRate(float normal = 0, float high = 0) : mNormal(normal), mHigh(high) {} float getNormal() const { return mNormal; } float getHigh() const { return mHigh; } private: float mNormal; float mHigh; }; } // namespace android::ui No newline at end of file