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

Commit 130d5a3a authored by Changyeon Jo's avatar Changyeon Jo
Browse files

Update the default EVS HAL implementation

Remove H2BGraphicBufferProducer usages from the default EVS HAL
implementation.

Bug: 297601247
Bug: 298091684
Test: Run evs_app on the cuttlefish emulator.
Change-Id: Ibca21d8e9cf87deb79c0050f9adcf02b5f16d34b
parent 8d5e8a8e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -60,12 +60,15 @@ cc_binary {
        "libyuv",
    ],
    static_libs: [
        "android.frameworks.automotive.display-V1-ndk",
        "android.frameworks.automotive.display-V2-ndk",
        "android.hardware.automotive.evs-V2-ndk",
        "android.hardware.common-V2-ndk",
        "libaidlcommonsupport",
        "libcutils",
    ],
    header_libs: [
        "libgui_aidl_headers",
    ],
    local_include_dirs: ["include"],
    include_dirs: ["frameworks/native/include/"],
    required: ["evs_mock_hal_configuration.xml"],
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <aidl/android/hardware/automotive/evs/IEvsCamera.h>
#include <aidl/android/hardware/automotive/evs/IEvsEnumeratorStatusCallback.h>
#include <aidl/android/hardware/automotive/evs/Stream.h>
#include <android-base/thread_annotations.h>
#include <utils/Thread.h>

#include <atomic>
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <aidl/android/hardware/automotive/evs/BufferDesc.h>
#include <aidl/android/hardware/automotive/evs/DisplayDesc.h>
#include <aidl/android/hardware/automotive/evs/DisplayState.h>
#include <android-base/thread_annotations.h>

#include <thread>

+1 −8
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#include <aidl/android/frameworks/automotive/display/ICarDisplayProxy.h>
#include <aidl/android/hardware/automotive/evs/BufferDesc.h>
#include <android-base/logging.h>
#include <bufferqueueconverter/BufferQueueConverter.h>
#include <cutils/native_handle.h>

namespace aidl::android::hardware::automotive::evs::implementation {

@@ -33,7 +33,6 @@ namespace automotivedisplay = ::aidl::android::frameworks::automotive::display;

class GlWrapper {
  public:
    GlWrapper() : mSurfaceHolder(::android::SurfaceHolderUniquePtr(nullptr, nullptr)) {}
    bool initialize(const std::shared_ptr<automotivedisplay::ICarDisplayProxy>& svc,
                    uint64_t displayId);
    void shutdown();
@@ -53,9 +52,6 @@ class GlWrapper {
    unsigned getHeight() { return mHeight; };

  private:
    ::android::sp<::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer>
            mGfxBufferProducer;

    EGLDisplay mDisplay;
    EGLSurface mSurface;
    EGLContext mContext;
@@ -71,9 +67,6 @@ class GlWrapper {
    // Opaque handle for a native hardware buffer defined in
    // frameworks/native/opengl/include/EGL/eglplatform.h
    ANativeWindow* mWindow;

    // Pointer to a Surface wrapper.
    ::android::SurfaceHolderUniquePtr mSurfaceHolder;
};

}  // namespace aidl::android::hardware::automotive::evs::implementation
+1 −1
Original line number Diff line number Diff line
@@ -352,8 +352,8 @@ ScopedAStatus EvsGlDisplay::getTargetBuffer(BufferDesc* _aidl_return) {
    BufferDesc bufferDescToSend = {
            .buffer =
                    {
                            .handle = std::move(::android::dupToAidl(mBuffer.handle)),
                            .description = mBuffer.description,
                            .handle = std::move(::android::dupToAidl(mBuffer.handle)),
                    },
            .pixelSizeBytes = 4,  // RGBA_8888 is 4-byte-per-pixel format
            .bufferId = mBuffer.fingerprint,
Loading