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

Commit 29e146b2 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

fakehwc, libvr_hwc-hal: ComposerClient is moved

ComposerClient is moved to another library with some changes.  This
allows us to kill the has-a relation between VrComposerClient and
ComposerClientImpl in VR.

Test: builds
Change-Id: I0c32386f7d62f33e2e4d1271be42953f6880fd75
parent 69f8fb7e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ cc_test {
        "libutils",
    ],
    static_libs: [
        "libhwcomposer-client",
        "libtrace_proto",
        "libgmock"
    ],
+1 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

#define HWC2_USE_CPP11
#define HWC2_INCLUDE_STRINGIFICATION
#include "ComposerClient.h"
#include <composer-hal/2.1/ComposerClient.h>
#undef HWC2_USE_CPP11
#undef HWC2_INCLUDE_STRINGIFICATION
#include "RenderState.h"
@@ -32,7 +32,6 @@

using namespace android::hardware::graphics::composer::V2_1;
using namespace android::hardware::graphics::composer::V2_1::hal;
using namespace android::hardware::graphics::composer::V2_1::implementation;
using namespace android::hardware;
using namespace std::chrono_literals;

+3 −1
Original line number Diff line number Diff line
@@ -46,7 +46,9 @@ Return<void> FakeComposerService::dumpDebugInfo(dumpDebugInfo_cb hidl_cb) {

Return<void> FakeComposerService::createClient(createClient_cb hidl_cb) {
    ALOGI("FakeComposerService::createClient %p", mClient.get());
    mClient->initialize();
    if (!mClient->init()) {
        LOG_ALWAYS_FATAL("failed to initialize ComposerClient");
    }
    hidl_cb(Error::NONE, mClient);
    return Void();
}
+2 −2
Original line number Diff line number Diff line
@@ -16,10 +16,10 @@

#pragma once

#include "ComposerClient.h"
#include <composer-hal/2.1/ComposerClient.h>

using namespace android::hardware::graphics::composer::V2_1;
using namespace android::hardware::graphics::composer::V2_1::implementation;
using namespace android::hardware::graphics::composer::V2_1::hal;
using android::hardware::Return;

namespace sftest {
+2 −2
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ void DisplayTest::SetUp() {
    // interface instead of the current Composer interface might also
    // change the situation.
    mMockComposer = new MockComposerClient;
    sp<ComposerClient> client = new ComposerClient(*mMockComposer);
    sp<ComposerClient> client = new ComposerClient(mMockComposer);
    mMockComposer->setClient(client.get());
    mFakeService = new FakeComposerService(client);
    (void)mFakeService->registerAsService("mock");
@@ -446,7 +446,7 @@ void TransactionTest::SetUpTestCase() {
    // TODO: See TODO comment at DisplayTest::SetUp for background on
    // the lifetime of the FakeComposerClient.
    sFakeComposer = new FakeComposerClient;
    sp<ComposerClient> client = new ComposerClient(*sFakeComposer);
    sp<ComposerClient> client = new ComposerClient(sFakeComposer);
    sFakeComposer->setClient(client.get());
    sp<IComposer> fakeService = new FakeComposerService(client);
    (void)fakeService->registerAsService("mock");
Loading