Loading libs/gui/SurfaceComposerClient.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -3056,6 +3056,14 @@ void SurfaceComposerClient::setDisplayPowerMode(const sp<IBinder>& token, ComposerServiceAIDL::getComposerService()->setPowerMode(token, mode); } status_t SurfaceComposerClient::getMaxLayerPictureProfiles(const sp<IBinder>& token, int32_t* outMaxProfiles) { binder::Status status = ComposerServiceAIDL::getComposerService()->getMaxLayerPictureProfiles(token, outMaxProfiles); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::getCompositionPreference( ui::Dataspace* defaultDataspace, ui::PixelFormat* defaultPixelFormat, ui::Dataspace* wideColorGamutDataspace, ui::PixelFormat* wideColorGamutPixelFormat) { Loading Loading @@ -3280,6 +3288,13 @@ status_t SurfaceComposerClient::removeHdrLayerInfoListener( return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setActivePictureListener( const sp<gui::IActivePictureListener>& listener) { binder::Status status = ComposerServiceAIDL::getComposerService()->setActivePictureListener(listener); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::notifyPowerBoost(int32_t boostId) { binder::Status status = ComposerServiceAIDL::getComposerService()->notifyPowerBoost(boostId); return statusTFromBinderStatus(status); Loading libs/gui/aidl/android/gui/ActivePicture.aidl 0 → 100644 +32 −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; /** * Visible content that is using picture processing. * @hide */ parcelable ActivePicture { /** The layer ID that is using picture processing. */ int layerId; /** UID that owns layer using picture processing. */ int ownerUid; /** ID of the picture profile that was used to configure the picture processing. */ long pictureProfileId; } libs/gui/aidl/android/gui/IActivePictureListener.aidl 0 → 100644 +30 −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; import android.gui.ActivePicture; /** * Receive callbacks whenever the visible content using picture profiles changes. * @hide */ interface IActivePictureListener { /** * Callback reporting the visible content on the screen using picture profiles. */ oneway void onActivePicturesChanged(in ActivePicture[] activePictures); } libs/gui/aidl/android/gui/ISurfaceComposer.aidl +12 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.gui.FrameEvent; import android.gui.FrameStats; import android.gui.HdrConversionCapability; import android.gui.HdrConversionStrategy; import android.gui.IActivePictureListener; import android.gui.IDisplayEventConnection; import android.gui.IFpsListener; import android.gui.IHdrLayerInfoListener; Loading Loading @@ -227,6 +228,11 @@ interface ISurfaceComposer { */ void setGameContentType(IBinder display, boolean on); /** * Gets the maximum number of picture profiles supported by the display. */ int getMaxLayerPictureProfiles(IBinder display); /** * Capture the specified screen. This requires READ_FRAME_BUFFER * permission. This function will fail if there is a secure window on Loading Loading @@ -599,4 +605,10 @@ interface ISurfaceComposer { * past the provided VSync. */ oneway void removeJankListener(int layerId, IJankListener listener, long afterVsync); /** * Sets the listener used to monitor visible content that is being processed with picture * profiles. */ oneway void setActivePictureListener(IActivePictureListener listener); } libs/gui/include/gui/SurfaceComposerClient.h +11 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,8 @@ public: static status_t removeHdrLayerInfoListener(const sp<IBinder>& displayToken, const sp<gui::IHdrLayerInfoListener>& listener); static status_t setActivePictureListener(const sp<gui::IActivePictureListener>& listener); /* * Sends a power boost to the composer. This function is asynchronous. * Loading Loading @@ -343,6 +345,15 @@ public: static bool flagEdgeExtensionEffectUseShader(); /** * Returns how many picture profiles are supported by the display. * * displayToken * The token of the display. */ static status_t getMaxLayerPictureProfiles(const sp<IBinder>& displayToken, int32_t* outMaxProfiles); // ------------------------------------------------------------------------ // surface creation / destruction Loading Loading
libs/gui/SurfaceComposerClient.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -3056,6 +3056,14 @@ void SurfaceComposerClient::setDisplayPowerMode(const sp<IBinder>& token, ComposerServiceAIDL::getComposerService()->setPowerMode(token, mode); } status_t SurfaceComposerClient::getMaxLayerPictureProfiles(const sp<IBinder>& token, int32_t* outMaxProfiles) { binder::Status status = ComposerServiceAIDL::getComposerService()->getMaxLayerPictureProfiles(token, outMaxProfiles); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::getCompositionPreference( ui::Dataspace* defaultDataspace, ui::PixelFormat* defaultPixelFormat, ui::Dataspace* wideColorGamutDataspace, ui::PixelFormat* wideColorGamutPixelFormat) { Loading Loading @@ -3280,6 +3288,13 @@ status_t SurfaceComposerClient::removeHdrLayerInfoListener( return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::setActivePictureListener( const sp<gui::IActivePictureListener>& listener) { binder::Status status = ComposerServiceAIDL::getComposerService()->setActivePictureListener(listener); return statusTFromBinderStatus(status); } status_t SurfaceComposerClient::notifyPowerBoost(int32_t boostId) { binder::Status status = ComposerServiceAIDL::getComposerService()->notifyPowerBoost(boostId); return statusTFromBinderStatus(status); Loading
libs/gui/aidl/android/gui/ActivePicture.aidl 0 → 100644 +32 −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; /** * Visible content that is using picture processing. * @hide */ parcelable ActivePicture { /** The layer ID that is using picture processing. */ int layerId; /** UID that owns layer using picture processing. */ int ownerUid; /** ID of the picture profile that was used to configure the picture processing. */ long pictureProfileId; }
libs/gui/aidl/android/gui/IActivePictureListener.aidl 0 → 100644 +30 −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; import android.gui.ActivePicture; /** * Receive callbacks whenever the visible content using picture profiles changes. * @hide */ interface IActivePictureListener { /** * Callback reporting the visible content on the screen using picture profiles. */ oneway void onActivePicturesChanged(in ActivePicture[] activePictures); }
libs/gui/aidl/android/gui/ISurfaceComposer.aidl +12 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.gui.FrameEvent; import android.gui.FrameStats; import android.gui.HdrConversionCapability; import android.gui.HdrConversionStrategy; import android.gui.IActivePictureListener; import android.gui.IDisplayEventConnection; import android.gui.IFpsListener; import android.gui.IHdrLayerInfoListener; Loading Loading @@ -227,6 +228,11 @@ interface ISurfaceComposer { */ void setGameContentType(IBinder display, boolean on); /** * Gets the maximum number of picture profiles supported by the display. */ int getMaxLayerPictureProfiles(IBinder display); /** * Capture the specified screen. This requires READ_FRAME_BUFFER * permission. This function will fail if there is a secure window on Loading Loading @@ -599,4 +605,10 @@ interface ISurfaceComposer { * past the provided VSync. */ oneway void removeJankListener(int layerId, IJankListener listener, long afterVsync); /** * Sets the listener used to monitor visible content that is being processed with picture * profiles. */ oneway void setActivePictureListener(IActivePictureListener listener); }
libs/gui/include/gui/SurfaceComposerClient.h +11 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,8 @@ public: static status_t removeHdrLayerInfoListener(const sp<IBinder>& displayToken, const sp<gui::IHdrLayerInfoListener>& listener); static status_t setActivePictureListener(const sp<gui::IActivePictureListener>& listener); /* * Sends a power boost to the composer. This function is asynchronous. * Loading Loading @@ -343,6 +345,15 @@ public: static bool flagEdgeExtensionEffectUseShader(); /** * Returns how many picture profiles are supported by the display. * * displayToken * The token of the display. */ static status_t getMaxLayerPictureProfiles(const sp<IBinder>& displayToken, int32_t* outMaxProfiles); // ------------------------------------------------------------------------ // surface creation / destruction Loading