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

Commit de3781df authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "composer: refactor ComposerResources into shared library"

parents d78560fd a8c3130a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -9,8 +9,7 @@ cc_library_shared {
    ],
    shared_libs: [
        "android.hardware.graphics.composer@2.1",
        "android.hardware.graphics.mapper@2.0",
        "android.hardware.graphics.mapper@3.0",
        "android.hardware.graphics.composer@2.1-resources",
        "libbase",
        "libcutils",
        "libfmq",
+2 −4
Original line number Diff line number Diff line
@@ -19,14 +19,12 @@ cc_library_headers {
    vendor_available: true,
    shared_libs: [
        "android.hardware.graphics.composer@2.1",
        "android.hardware.graphics.mapper@2.0",
        "android.hardware.graphics.mapper@3.0",
        "android.hardware.graphics.composer@2.1-resources",
        "libhardware", // TODO remove hwcomposer2.h dependency
    ],
    export_shared_lib_headers: [
        "android.hardware.graphics.composer@2.1",
        "android.hardware.graphics.mapper@2.0",
        "android.hardware.graphics.mapper@3.0",
        "android.hardware.graphics.composer@2.1-resources",
        "libhardware",
    ],
    header_libs: [
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#include <android/hardware/graphics/composer/2.1/IComposerClient.h>
#include <composer-hal/2.1/ComposerCommandEngine.h>
#include <composer-hal/2.1/ComposerHal.h>
#include <composer-hal/2.1/ComposerResources.h>
#include <composer-resources/2.1/ComposerResources.h>
#include <log/log.h>

namespace android {
+5 −5
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

#include <composer-command-buffer/2.1/ComposerCommandBuffer.h>
#include <composer-hal/2.1/ComposerHal.h>
#include <composer-hal/2.1/ComposerResources.h>
#include <composer-resources/2.1/ComposerResources.h>
// TODO remove hwcomposer_defs.h dependency
#include <hardware/hwcomposer_defs.h>
#include <log/log.h>
@@ -195,7 +195,7 @@ class ComposerCommandEngine : protected CommandReaderBase {
        bool closeFence = true;

        const native_handle_t* clientTarget;
        ComposerResources::ReplacedBufferHandle replacedClientTarget;
        ComposerResources::ReplacedHandle replacedClientTarget(true);
        auto err = mResources->getDisplayClientTarget(mCurrentDisplay, slot, useCache, rawHandle,
                                                      &clientTarget, &replacedClientTarget);
        if (err == Error::NONE) {
@@ -226,7 +226,7 @@ class ComposerCommandEngine : protected CommandReaderBase {
        bool closeFence = true;

        const native_handle_t* outputBuffer;
        ComposerResources::ReplacedBufferHandle replacedOutputBuffer;
        ComposerResources::ReplacedHandle replacedOutputBuffer(true);
        auto err = mResources->getDisplayOutputBuffer(mCurrentDisplay, slot, useCache, rawhandle,
                                                      &outputBuffer, &replacedOutputBuffer);
        if (err == Error::NONE) {
@@ -369,7 +369,7 @@ class ComposerCommandEngine : protected CommandReaderBase {
        bool closeFence = true;

        const native_handle_t* buffer;
        ComposerResources::ReplacedBufferHandle replacedBuffer;
        ComposerResources::ReplacedHandle replacedBuffer(true);
        auto err = mResources->getLayerBuffer(mCurrentDisplay, mCurrentLayer, slot, useCache,
                                              rawHandle, &buffer, &replacedBuffer);
        if (err == Error::NONE) {
@@ -489,7 +489,7 @@ class ComposerCommandEngine : protected CommandReaderBase {
        auto rawHandle = readHandle();

        const native_handle_t* stream;
        ComposerResources::ReplacedStreamHandle replacedStream;
        ComposerResources::ReplacedHandle replacedStream(false);
        auto err = mResources->getLayerSidebandStream(mCurrentDisplay, mCurrentLayer, rawHandle,
                                                      &stream, &replacedStream);
        if (err == Error::NONE) {
+49 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2019 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.

cc_library_shared {
    name: "android.hardware.graphics.composer@2.1-resources",
    defaults: ["hidl_defaults"],
    vendor_available: true,
    shared_libs: [
        "android.hardware.graphics.composer@2.1",
        "android.hardware.graphics.mapper@2.0",
        "android.hardware.graphics.mapper@3.0",
        "libcutils",
        "libhardware", // TODO remove hwcomposer2.h dependency
        "libhidlbase",
        "liblog",
        "libutils",
    ],
    export_shared_lib_headers: [
        "android.hardware.graphics.composer@2.1",
        "android.hardware.graphics.mapper@2.0",
        "android.hardware.graphics.mapper@3.0",
        "libhardware",
        "libhidlbase",
        "liblog",
        "libutils",
    ],
    header_libs: [
        "android.hardware.graphics.composer@2.1-command-buffer",
    ],
    export_header_lib_headers: [
        "android.hardware.graphics.composer@2.1-command-buffer",
    ],
    export_include_dirs: ["include"],
    srcs: [
        "ComposerResources.cpp",
    ],
}
Loading