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

Commit bbf0b8f2 authored by Yifan Hong's avatar Yifan Hong Committed by Automerger Merge Worker
Browse files

Merge "Remove vr_hwc." am: 968098af

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1695065

Change-Id: I557350298687076c9ba10f14c5c1e868e58ebfc7
parents d2a1a455 968098af
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -106,42 +106,6 @@ cc_library_static {
    ],
}

cc_binary {
    name: "vr_hwc",
    enabled: false,
    system_ext_specific: true,
    vintf_fragments: ["manifest_vr_hwc.xml"],
    srcs: [
        "vr_hardware_composer_service.cpp",
    ],
    static_libs: [
        "libvr_hwc-impl",
        // NOTE: This needs to be included after the *-impl lib otherwise the
        // symbols in the *-binder library get optimized out.
        "libvr_hwc-binder",
    ],
    shared_libs: [
        "android.frameworks.vr.composer@2.0",
        "android.hardware.graphics.composer@2.3",
        "libbase",
        "libbinder",
        "liblog",
        "libhardware",
        "libhidlbase",
        "libui",
        "libutils",
        "libvr_hwc-hal",
    ],
    cflags: [
        "-DLOG_TAG=\"vr_hwc\"",
        "-Wall",
        "-Werror",
    ],
    init_rc: [
        "vr_hwc.rc",
    ],
}

cc_test {
    name: "vr_hwc_test",
    gtest: true,
+0 −11
Original line number Diff line number Diff line
<manifest version="1.0" type="framework">
    <hal>
      <name>android.hardware.graphics.composer</name>
      <transport>hwbinder</transport>
      <version>2.1</version>
      <interface>
          <name>IComposer</name>
          <instance>vr</instance>
      </interface>
    </hal>
</manifest>
+0 −55
Original line number Diff line number Diff line
/*
 * Copyright 2017 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.
 */
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <hwbinder/IPCThreadState.h>
#include <impl/vr_hwc.h>
#include <inttypes.h>

#include "vr_composer.h"

int main() {
  android::ProcessState::self()->startThreadPool();

  // Register the hwbinder HWC HAL service used by SurfaceFlinger while in VR
  // mode.
  android::sp<android::dvr::VrHwc> service = new android::dvr::VrHwc();

  LOG_ALWAYS_FATAL_IF(!service.get(), "Failed to get service");
  LOG_ALWAYS_FATAL_IF(service->isRemote(), "Service is remote");

  const char instance[] = "vr";
  LOG_ALWAYS_FATAL_IF(service->registerAsService(instance) != android::OK,
                      "Failed to register service");

  android::sp<android::dvr::VrComposer> composer =
      new android::dvr::VrComposer(service.get());

  android::sp<android::IServiceManager> sm(android::defaultServiceManager());

  // Register the binder service used by VR Window Manager service to receive
  // frame information from VR HWC HAL.
  android::status_t status = sm->addService(
      android::dvr::VrComposer::SERVICE_NAME(), composer.get(),
      false /* allowIsolated */);
  LOG_ALWAYS_FATAL_IF(status != android::OK,
                      "VrDisplay service failed to start: %" PRId32, status);

  android::hardware::ProcessState::self()->startThreadPool();
  android::hardware::IPCThreadState::self()->joinThreadPool();

  return 0;
}
+0 −6
Original line number Diff line number Diff line
service vr_hwc /system/bin/vr_hwc
  class hal animation
  user system
  group system graphics
  onrestart restart surfaceflinger
  writepid /dev/cpuset/system-background/tasks