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

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

Merge "Add VrFlinger dumpsys to SurfaceFlinger" into oc-dr1-dev

parents d16d2978 171155a5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@ class VrFlinger {
  // Called on a binder thread.
  void OnHardwareComposerRefresh();

  // dump all vr flinger state.
  std::string Dump();

 private:
  VrFlinger();
  bool Init(Hwc2::Composer* hidl,
+5 −1
Original line number Diff line number Diff line
@@ -139,6 +139,11 @@ void VrFlinger::OnHardwareComposerRefresh() {
  display_service_->OnHardwareComposerRefresh();
}

std::string VrFlinger::Dump() {
  // TODO(karthikrs): Add more state information here.
  return display_service_->DumpState(0/*unused*/);
}

void VrFlinger::PersistentVrStateCallback::onPersistentVrStateChanged(
    bool enabled) {
  ALOGV("Notified persistent vr mode is %s", enabled ? "on" : "off");
@@ -146,6 +151,5 @@ void VrFlinger::PersistentVrStateCallback::onPersistentVrStateChanged(
  // Persistent VR mode is not enough.
  // request_display_callback_(enabled);
}

}  // namespace dvr
}  // namespace android
+9 −0
Original line number Diff line number Diff line
@@ -3770,6 +3770,15 @@ void SurfaceFlinger::dumpAllLocked(const Vector<String16>& args, size_t& index,
     */
    const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
    alloc.dump(result);

    /*
     * Dump VrFlinger state if in use.
     */
    if (mVrFlingerRequestsDisplay && mVrFlinger) {
        result.append("VrFlinger state:\n");
        result.append(mVrFlinger->Dump().c_str());
        result.append("\n");
    }
}

const Vector< sp<Layer> >&