Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3192f3df authored by Ady Abraham's avatar Ady Abraham
Browse files

Add Parcelable AidlComposer commands

Change the command interface to use parcelables instead of FMQ.

Bug: 201008710
Test: VTS
Change-Id: Iac67330eb34a5bcf253580e8109a67bd90483d85
parent 39449302
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ bool ShouldCheckMissingHalsInFcm(const std::string& package) {
            "android.hardware.common",
            "android.hardware.common.fmq",
            "android.hardware.graphics.common",
            "android.hardware.graphics.composer3.command",
            "android.hardware.keymaster",
            "android.hardware.radio",
            "android.hardware.uwb.fira_android",
+5 −4
Original line number Diff line number Diff line
@@ -31,8 +31,9 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.graphics.composer3;
@Backing(type="int") @VintfStability
enum LayerRequest {
  CLEAR_CLIENT_TARGET = 1,
package android.hardware.graphics.common;
@VintfStability
parcelable Point {
  int x;
  int y;
}
+27 −0
Original line number Diff line number Diff line
/**
 * Copyright (c) 2021, 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.hardware.graphics.common;

/**
 * General purpose definition of a point.
 */

@VintfStability
parcelable Point {
    int x;
    int y;
}
+5 −2
Original line number Diff line number Diff line
@@ -31,12 +31,14 @@ aidl_interface {
        enabled: true,
        support_system_process: true,
    },
    srcs: ["android/hardware/graphics/composer3/*.aidl"],
    srcs: [
        "android/hardware/graphics/composer3/*.aidl",
        "android/hardware/graphics/composer3/command/*.aidl",
    ],
    stability: "vintf",
    imports: [
        "android.hardware.graphics.common-V3",
        "android.hardware.common-V2",
        "android.hardware.common.fmq-V1",
    ],
    backend: {
        cpp: {
@@ -73,6 +75,7 @@ cc_library_headers {
    vendor_available: true,
    shared_libs: [
        "android.hardware.graphics.composer3-V1-ndk",
        "android.hardware.common-V2-ndk",
        "libbase",
        "libfmq",
        "libsync",
+1 −3
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ interface IComposerClient {
  android.hardware.graphics.composer3.VirtualDisplay createVirtualDisplay(int width, int height, android.hardware.graphics.common.PixelFormat formatHint, int outputBufferSlotCount);
  void destroyLayer(long display, long layer);
  void destroyVirtualDisplay(long display);
  android.hardware.graphics.composer3.ExecuteCommandsStatus executeCommands(int inLength, in android.hardware.common.NativeHandle[] inHandles);
  android.hardware.graphics.composer3.command.CommandResultPayload[] executeCommands(in android.hardware.graphics.composer3.command.CommandPayload[] commands);
  int getActiveConfig(long display);
  android.hardware.graphics.composer3.ColorMode[] getColorModes(long display);
  float[] getDataspaceSaturationMatrix(android.hardware.graphics.common.Dataspace dataspace);
@@ -56,7 +56,6 @@ interface IComposerClient {
  android.hardware.graphics.composer3.HdrCapabilities getHdrCapabilities(long display);
  android.hardware.graphics.composer3.LayerGenericMetadataKey[] getLayerGenericMetadataKeys();
  int getMaxVirtualDisplayCount();
  android.hardware.common.fmq.MQDescriptor<int,android.hardware.common.fmq.SynchronizedReadWrite> getOutputCommandQueue();
  android.hardware.graphics.composer3.PerFrameMetadataKey[] getPerFrameMetadataKeys(long display);
  android.hardware.graphics.composer3.ReadbackBufferAttributes getReadbackBufferAttributes(long display);
  ParcelFileDescriptor getReadbackBufferFence(long display);
@@ -71,7 +70,6 @@ interface IComposerClient {
  void setContentType(long display, android.hardware.graphics.composer3.ContentType type);
  void setDisplayBrightness(long display, float brightness);
  void setDisplayedContentSamplingEnabled(long display, boolean enable, android.hardware.graphics.composer3.FormatColorComponent componentMask, long maxFrames);
  void setInputCommandQueue(in android.hardware.common.fmq.MQDescriptor<int,android.hardware.common.fmq.SynchronizedReadWrite> descriptor);
  void setPowerMode(long display, android.hardware.graphics.composer3.PowerMode mode);
  void setReadbackBuffer(long display, in android.hardware.common.NativeHandle buffer, in ParcelFileDescriptor releaseFence);
  void setVsyncEnabled(long display, boolean enabled);
Loading