Remove the VR compositor from the framework.
Remove the VR compositor framework and enable out-of-process VR composition
in VrCore.
This CL seems large due to the ripple effect of changing the VrFlinger
API and protocol types. There are three major modules that require
concurrent changes:
1. Protocol definitions and low-level VrFlinger API in libdisplay.
* Additional changes needed to keep old interfaces working for
a short time while replacing the dependent code (dvrGraphics*).
2. VrFlinger service implementation changes to support VrCore compositor
and the removal of the internal compositor.
3. Changes to libdvr platform library API due to changes in #1 and #2.
Because of the nature of the interdependence of types and other defs it is
difficult to break this CL into smaller chunks. However, review of the three
major modules (libdisplay, libdvr, and libvrflinger) may be done separately
to ease the mental burden on reviewers.
Change Summary:
- Remove obsolete screenshot service. VR screenshots will be implemented
by VrCore.
- Update display protocol definitions for changes in VrFlinger service
requirements. The majority of the changes in libdisplay are a
consequence of these protocol and service changes.
- Update VrFlinger to support two kinds of surfaces:
1. Application - use by VR apps.
2. Direct - used by VrCore (protected by permission check).
- Remove VrFlinger internal compositor and GL context.
- Remove obsolete debug console.
- Update VrFlinger hardware composer interface to handle direct
surfaces only, removing the concept of GPU (compositor) layers.
- Update display manager to expose access to application surface info
to VrCore (protected by permission check).
- Update libdvr platform library interfaces for changes to VrFlinger
API / protocol.
- Clean up libdvr API struct setup using a common include.
- Add C++ header-only helpers for DVR platform library opaque types.
Bug: 36401174
Test: Build; run VrFlinger display test tool.
Change-Id: I15abfde5f72dbb3725a3f58621486afba6b64902
diff --git a/libs/vr/libvrflinger/vsync_service.h b/libs/vr/libvrflinger/vsync_service.h
index 1c86d42..215948e 100644
--- a/libs/vr/libvrflinger/vsync_service.h
+++ b/libs/vr/libvrflinger/vsync_service.h
@@ -23,7 +23,7 @@
void Notify(int64_t timestamp);
private:
- int64_t OnWait(pdx::Message& message);
+ pdx::Status<int64_t> OnWait(pdx::Message& message);
pdx::Message message_;
int64_t timestamp_ = 0;
@@ -62,10 +62,9 @@
void OnChannelClose(pdx::Message& message,
const std::shared_ptr<pdx::Channel>& channel) override;
- // Called by the hardware composer HAL, or similar,
- // whenever a vsync event occurs.
- // |compositor_time_ns| is the number of ns before the next vsync when the
- // compositor will preempt the GPU to do EDS and lens warp.
+ // Called by the hardware composer HAL, or similar, whenever a vsync event
+ // occurs. |compositor_time_ns| is the number of ns before the next vsync when
+ // the compositor will preempt the GPU to do EDS and lens warp.
void VSyncEvent(int display, int64_t timestamp_ns, int64_t compositor_time_ns,
uint32_t vsync_count);
@@ -74,9 +73,9 @@
VSyncService();
- int64_t OnGetLastTimestamp(pdx::Message& message);
- VSyncSchedInfo OnGetSchedInfo(pdx::Message& message);
- int OnAcknowledge(pdx::Message& message);
+ pdx::Status<int64_t> OnGetLastTimestamp(pdx::Message& message);
+ pdx::Status<display::VSyncSchedInfo> OnGetSchedInfo(pdx::Message& message);
+ pdx::Status<void> OnAcknowledge(pdx::Message& message);
void NotifierThreadFunction();