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

Commit 275fb46d authored by Mike Ma's avatar Mike Ma Committed by Android (Google) Code Review
Browse files

Merge "Rev up vr_hwc to composer@2.3"

parents bfb0d554 94e91f62
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -178,6 +178,10 @@ Status<std::string> DisplayClient::GetConfigurationData(
  return status;
}

Status<uint8_t> DisplayClient::GetDisplayIdentificationPort() {
  return InvokeRemoteMethod<DisplayProtocol::GetDisplayIdentificationPort>();
}

Status<std::unique_ptr<Surface>> DisplayClient::CreateSurface(
    const SurfaceAttributes& attributes) {
  int error;
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ class DisplayClient : public pdx::ClientBase<DisplayClient> {
 public:
  pdx::Status<Metrics> GetDisplayMetrics();
  pdx::Status<std::string> GetConfigurationData(ConfigFileType config_type);
  pdx::Status<uint8_t> GetDisplayIdentificationPort();
  pdx::Status<std::unique_ptr<IonBuffer>> SetupGlobalBuffer(
      DvrGlobalBufferKey key, size_t size, uint64_t usage);
  pdx::Status<void> DeleteGlobalBuffer(DvrGlobalBufferKey key);
+3 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ struct DisplayProtocol {
    kOpGetSurfaceInfo,
    kOpCreateQueue,
    kOpSetAttributes,
    kOpGetDisplayIdentificationPort,
  };

  // Aliases.
@@ -221,6 +222,8 @@ struct DisplayProtocol {
  PDX_REMOTE_METHOD(GetMetrics, kOpGetMetrics, Metrics(Void));
  PDX_REMOTE_METHOD(GetConfigurationData, kOpGetConfigurationData,
                    std::string(ConfigFileType config_type));
  PDX_REMOTE_METHOD(GetDisplayIdentificationPort,
                    kOpGetDisplayIdentificationPort, uint8_t(Void));
  PDX_REMOTE_METHOD(SetupGlobalBuffer, kOpSetupGlobalBuffer,
                    LocalNativeBufferHandle(DvrGlobalBufferKey key, size_t size,
                                            uint64_t usage));
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ staticLibraries = [
]

sharedLibraries = [
    "android.frameworks.vr.composer@1.0",
    "android.frameworks.vr.composer@2.0",
    "android.hardware.graphics.allocator@2.0",
    "android.hardware.graphics.composer@2.1",
    "android.hardware.graphics.composer@2.2",
+12 −1
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ DisplayService::DisplayService(Hwc2::Composer* hidl,

    uint8_t port;
    const auto error = hidl->getDisplayIdentificationData(
        primary_display_id, &port, &display_identification_data_);
        primary_display_id, &display_identification_port_,
        &display_identification_data_);
    if (error != android::hardware::graphics::composer::V2_1::Error::NONE) {
      if (error !=
          android::hardware::graphics::composer::V2_1::Error::UNSUPPORTED) {
@@ -151,6 +152,11 @@ Status<void> DisplayService::HandleMessage(pdx::Message& message) {
          *this, &DisplayService::OnGetConfigurationData, message);
      return {};

    case DisplayProtocol::GetDisplayIdentificationPort::Opcode:
      DispatchRemoteMethod<DisplayProtocol::GetDisplayIdentificationPort>(
          *this, &DisplayService::OnGetDisplayIdentificationPort, message);
      return {};

    case DisplayProtocol::CreateSurface::Opcode:
      DispatchRemoteMethod<DisplayProtocol::CreateSurface>(
          *this, &DisplayService::OnCreateSurface, message);
@@ -238,6 +244,11 @@ pdx::Status<std::string> DisplayService::OnGetConfigurationData(
  return std::move(data);
}

pdx::Status<uint8_t> DisplayService::OnGetDisplayIdentificationPort(
    pdx::Message& /*message*/) {
  return display_identification_port_;
}

// Creates a new DisplaySurface and associates it with this channel. This may
// only be done once per channel.
Status<display::SurfaceInfo> DisplayService::OnCreateSurface(
Loading