Loading libs/gui/SurfaceComposerClient.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -2496,6 +2496,20 @@ status_t SurfaceComposerClient::clearBootDisplayMode(const sp<IBinder>& display) return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::getHdrConversionCapabilities( std::vector<gui::HdrConversionCapability>* hdrConversionCapabilities) { binder::Status status = ComposerServiceAIDL::getComposerService()->getHdrConversionCapabilities( hdrConversionCapabilities); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setHdrConversionStrategy( gui::HdrConversionStrategy hdrConversionStrategy) { binder::Status status = ComposerServiceAIDL::getComposerService()->setHdrConversionStrategy( hdrConversionStrategy); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setOverrideFrameRate(uid_t uid, float frameRate) { binder::Status status = ComposerServiceAIDL::getComposerService()->setOverrideFrameRate(uid, frameRate); Loading libs/gui/aidl/android/gui/HdrConversionCapability.aidl 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright 2022 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; // TODO(b/265277221): use android.hardware.graphics.common.HdrConversionCapability.aidl /** @hide */ parcelable HdrConversionCapability { int sourceType; int outputType; boolean addsLatency; } No newline at end of file libs/gui/aidl/android/gui/HdrConversionStrategy.aidl 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright 2022 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; // TODO(b/265277221): use android.hardware.graphics.common.HdrConversionStrategy.aidl /** @hide */ union HdrConversionStrategy { boolean passthrough = true; int[] autoAllowedHdrTypes; int forceHdrConversion; } libs/gui/aidl/android/gui/ISurfaceComposer.aidl +22 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ import android.gui.DisplayStatInfo; import android.gui.DynamicDisplayInfo; import android.gui.FrameEvent; import android.gui.FrameStats; import android.gui.HdrConversionCapability; import android.gui.HdrConversionStrategy; import android.gui.IDisplayEventConnection; import android.gui.IFpsListener; import android.gui.IHdrLayerInfoListener; Loading Loading @@ -161,6 +163,26 @@ interface ISurfaceComposer { // TODO(b/213909104) : Add unit tests to verify surface flinger boot time APIs boolean getBootDisplayModeSupport(); /** * Gets the HDR conversion capabilities of the device. The conversion capability defines whether * conversion from sourceType to outputType is possible (with or without latency). * * Requires the ACCESS_SURFACE_FLINGER permission. */ List<HdrConversionCapability> getHdrConversionCapabilities(); /** * Sets the HDR conversion strategy of the device. * * Requires the ACCESS_SURFACE_FLINGER permission. */ void setHdrConversionStrategy(in HdrConversionStrategy hdrConversionStrategy); /** * Gets whether HDR output conversion operations are supported on the device. */ boolean getHdrOutputConversionSupport(); /** * Switches Auto Low Latency Mode on/off on the connected display, if it is * available. This should only be called if the display supports Auto Low Loading libs/gui/fuzzer/libgui_fuzzer_utils.h +5 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ public: MOCK_METHOD(binder::Status, setBootDisplayMode, (const sp<IBinder>&, int), (override)); MOCK_METHOD(binder::Status, clearBootDisplayMode, (const sp<IBinder>&), (override)); MOCK_METHOD(binder::Status, getBootDisplayModeSupport, (bool*), (override)); MOCK_METHOD(binder::Status, getHdrConversionCapabilities, (std::vector<gui::HdrConversionCapability>*), (override)); MOCK_METHOD(binder::Status, setHdrConversionStrategy, (const gui::HdrConversionStrategy&), (override)); MOCK_METHOD(binder::Status, getHdrOutputConversionSupport, (bool*), (override)); MOCK_METHOD(binder::Status, setAutoLowLatencyMode, (const sp<IBinder>&, bool), (override)); MOCK_METHOD(binder::Status, setGameContentType, (const sp<IBinder>&, bool), (override)); MOCK_METHOD(binder::Status, captureDisplay, Loading Loading
libs/gui/SurfaceComposerClient.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -2496,6 +2496,20 @@ status_t SurfaceComposerClient::clearBootDisplayMode(const sp<IBinder>& display) return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::getHdrConversionCapabilities( std::vector<gui::HdrConversionCapability>* hdrConversionCapabilities) { binder::Status status = ComposerServiceAIDL::getComposerService()->getHdrConversionCapabilities( hdrConversionCapabilities); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setHdrConversionStrategy( gui::HdrConversionStrategy hdrConversionStrategy) { binder::Status status = ComposerServiceAIDL::getComposerService()->setHdrConversionStrategy( hdrConversionStrategy); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setOverrideFrameRate(uid_t uid, float frameRate) { binder::Status status = ComposerServiceAIDL::getComposerService()->setOverrideFrameRate(uid, frameRate); Loading
libs/gui/aidl/android/gui/HdrConversionCapability.aidl 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright 2022 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; // TODO(b/265277221): use android.hardware.graphics.common.HdrConversionCapability.aidl /** @hide */ parcelable HdrConversionCapability { int sourceType; int outputType; boolean addsLatency; } No newline at end of file
libs/gui/aidl/android/gui/HdrConversionStrategy.aidl 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright 2022 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; // TODO(b/265277221): use android.hardware.graphics.common.HdrConversionStrategy.aidl /** @hide */ union HdrConversionStrategy { boolean passthrough = true; int[] autoAllowedHdrTypes; int forceHdrConversion; }
libs/gui/aidl/android/gui/ISurfaceComposer.aidl +22 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ import android.gui.DisplayStatInfo; import android.gui.DynamicDisplayInfo; import android.gui.FrameEvent; import android.gui.FrameStats; import android.gui.HdrConversionCapability; import android.gui.HdrConversionStrategy; import android.gui.IDisplayEventConnection; import android.gui.IFpsListener; import android.gui.IHdrLayerInfoListener; Loading Loading @@ -161,6 +163,26 @@ interface ISurfaceComposer { // TODO(b/213909104) : Add unit tests to verify surface flinger boot time APIs boolean getBootDisplayModeSupport(); /** * Gets the HDR conversion capabilities of the device. The conversion capability defines whether * conversion from sourceType to outputType is possible (with or without latency). * * Requires the ACCESS_SURFACE_FLINGER permission. */ List<HdrConversionCapability> getHdrConversionCapabilities(); /** * Sets the HDR conversion strategy of the device. * * Requires the ACCESS_SURFACE_FLINGER permission. */ void setHdrConversionStrategy(in HdrConversionStrategy hdrConversionStrategy); /** * Gets whether HDR output conversion operations are supported on the device. */ boolean getHdrOutputConversionSupport(); /** * Switches Auto Low Latency Mode on/off on the connected display, if it is * available. This should only be called if the display supports Auto Low Loading
libs/gui/fuzzer/libgui_fuzzer_utils.h +5 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ public: MOCK_METHOD(binder::Status, setBootDisplayMode, (const sp<IBinder>&, int), (override)); MOCK_METHOD(binder::Status, clearBootDisplayMode, (const sp<IBinder>&), (override)); MOCK_METHOD(binder::Status, getBootDisplayModeSupport, (bool*), (override)); MOCK_METHOD(binder::Status, getHdrConversionCapabilities, (std::vector<gui::HdrConversionCapability>*), (override)); MOCK_METHOD(binder::Status, setHdrConversionStrategy, (const gui::HdrConversionStrategy&), (override)); MOCK_METHOD(binder::Status, getHdrOutputConversionSupport, (bool*), (override)); MOCK_METHOD(binder::Status, setAutoLowLatencyMode, (const sp<IBinder>&, bool), (override)); MOCK_METHOD(binder::Status, setGameContentType, (const sp<IBinder>&, bool), (override)); MOCK_METHOD(binder::Status, captureDisplay, Loading