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

Commit f825cd77 authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge changes from topic "b_208856704"

* changes:
  composer: cleanup CommandWriterBase and CommandReaderBase part 2
  composer: make PresentOrValidate.Result consistent with hidl
parents 33e36ef1 46219f57
Loading
Loading
Loading
Loading
+0 −39
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.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// 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 HandleIndex {
  EMPTY = -1,
  CACHED = -2,
}
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ parcelable PresentOrValidate {
  android.hardware.graphics.composer3.PresentOrValidate.Result result;
  @VintfStability
  enum Result {
    Presented = 0,
    Validated = 1,
    Validated = 0,
    Presented = 1,
  }
}
+0 −33
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.composer3;

/**
 * Special index values (always negative) for command queue commands.
 */
@VintfStability
@Backing(type="int")
enum HandleIndex {
    /**
     * No handle
     */
    EMPTY = -1,
    /**
     * Use cached handle
     */
    CACHED = -2,
}
+1 −1
Original line number Diff line number Diff line
@@ -27,6 +27,6 @@ parcelable PresentOrValidate {
    /**
     * Whether PresentOrValidate presented or validated the display.
     */
    @VintfStability enum Result { Presented, Validated }
    @VintfStability enum Result { Validated, Presented }
    Result result;
}
+7 −9
Original line number Diff line number Diff line
@@ -129,15 +129,6 @@ static_assert(aidl::android::hardware::graphics::composer3::DisplayRequest::
              static_cast<int>(::android::hardware::graphics::composer::V2_1::IComposerClient::
                                       DisplayRequest::WRITE_CLIENT_TARGET_TO_OUTPUT));

static_assert(aidl::android::hardware::graphics::composer3::HandleIndex::EMPTY ==
              static_cast<aidl::android::hardware::graphics::composer3::HandleIndex>(
                      ::android::hardware::graphics::composer::V2_1::IComposerClient::HandleIndex::
                              EMPTY));
static_assert(aidl::android::hardware::graphics::composer3::HandleIndex::CACHED ==
              static_cast<aidl::android::hardware::graphics::composer3::HandleIndex>(
                      ::android::hardware::graphics::composer::V2_1::IComposerClient::HandleIndex::
                              CACHED));

static_assert(
        aidl::android::hardware::graphics::composer3::PowerMode::OFF ==
        static_cast<aidl::android::hardware::graphics::composer3::PowerMode>(
@@ -327,6 +318,13 @@ static_assert(
        static_cast<aidl::android::hardware::graphics::composer3::ContentType>(
                ::android::hardware::graphics::composer::V2_4::IComposerClient::ContentType::GAME));

static_assert(
        aidl::android::hardware::graphics::composer3::PresentOrValidate::Result::Presented ==
        static_cast<aidl::android::hardware::graphics::composer3::PresentOrValidate::Result>(1));
static_assert(
        aidl::android::hardware::graphics::composer3::PresentOrValidate::Result::Validated ==
        static_cast<aidl::android::hardware::graphics::composer3::PresentOrValidate::Result>(0));

__attribute__((warn_unused_result)) bool translate(
        const ::android::hardware::graphics::composer::V2_4::VsyncPeriodChangeTimeline& in,
        aidl::android::hardware::graphics::composer3::VsyncPeriodChangeTimeline* out) {
Loading