Loading services/vr/hardware_composer/Android.bp 0 → 100644 +96 −0 Original line number Diff line number Diff line cc_library_static { name: "libvr_hwc-binder", srcs: [ "aidl/android/dvr/IVrComposer.aidl", "aidl/android/dvr/IVrComposerCallback.aidl", "aidl/android/dvr/parcelable_composer_frame.cpp", "aidl/android/dvr/parcelable_composer_layer.cpp", "aidl/android/dvr/parcelable_unique_fd.cpp", ], aidl: { include_dirs: ["frameworks/native/services/vr/hardware_composer/aidl"], export_aidl_headers: true, }, export_include_dirs: ["aidl"], shared_libs: [ "libbinder", "libui", "libutils", "libvrhwc", ], } cc_library_static { name: "libvr_hwc-impl", srcs: [ "vr_composer.cpp", ], static_libs: [ "libvr_hwc-binder", ], shared_libs: [ "libbase", "libbinder", "liblog", "libui", "libutils", "libvrhwc", ], export_shared_lib_headers: [ "libvrhwc", ], cflags: [ "-DLOG_TAG=\"vr_hwc\"", ], } cc_binary { name: "vr_hwc", 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.dvr.composer@1.0", "android.hardware.graphics.composer@2.1", "libbase", "libbinder", "liblog", "libhardware", "libhwbinder", "libui", "libutils", "libvrhwc", ], cflags: [ "-DLOG_TAG=\"vr_hwc\"", ], init_rc: [ "vr_hwc.rc", ], } cc_test { name: "vr_hwc_test", gtest: true, srcs: ["tests/vr_composer_test.cpp"], static_libs: [ "libgtest", "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: [ "libbase", "libbinder", "liblog", "libui", "libutils", ], } services/vr/hardware_composer/aidl/android/dvr/IVrComposer.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line package android.dvr; import android.dvr.IVrComposerCallback; /** * Service interface exposed by VR HWC exposed to system apps which allows one * system app to connect to get SurfaceFlinger's outputs (all displays). This * is active when SurfaceFlinger is in VR mode, where all 2D output is * redirected to VR HWC. * * @hide */ interface IVrComposer { const String SERVICE_NAME = "vr_hwc"; /** * Registers a callback used to receive frame notifications. */ void registerObserver(in IVrComposerCallback callback); } services/vr/hardware_composer/aidl/android/dvr/IVrComposerCallback.aidl 0 → 100644 +22 −0 Original line number Diff line number Diff line package android.dvr; import android.dvr.ParcelableComposerFrame; import android.dvr.ParcelableUniqueFd; /** * A system app will implement and register this callback with VRComposer * to receive the layers SurfaceFlinger presented when in VR mode. * * @hide */ interface IVrComposerCallback { /** * Called by the VR HWC service when a new frame is ready to be presented. * * @param frame The new frame VR HWC wants to present. * @return A fence FD used to signal when the previous frame is no longer * used by the client. This may be an invalid fence (-1) if the client is not * using the previous frame, in which case the previous frame may be re-used * at any point in time. */ ParcelableUniqueFd onNewFrame(in ParcelableComposerFrame frame); } services/vr/hardware_composer/aidl/android/dvr/ParcelableComposerFrame.aidl 0 → 100644 +3 −0 Original line number Diff line number Diff line package android.dvr; parcelable ParcelableComposerFrame cpp_header "android/dvr/parcelable_composer_frame.h"; services/vr/hardware_composer/aidl/android/dvr/ParcelableComposerLayer.aidl 0 → 100644 +3 −0 Original line number Diff line number Diff line package android.dvr; parcelable ParcelableComposerLayer cpp_header "android/dvr/parcelable_composer_layer.h"; Loading
services/vr/hardware_composer/Android.bp 0 → 100644 +96 −0 Original line number Diff line number Diff line cc_library_static { name: "libvr_hwc-binder", srcs: [ "aidl/android/dvr/IVrComposer.aidl", "aidl/android/dvr/IVrComposerCallback.aidl", "aidl/android/dvr/parcelable_composer_frame.cpp", "aidl/android/dvr/parcelable_composer_layer.cpp", "aidl/android/dvr/parcelable_unique_fd.cpp", ], aidl: { include_dirs: ["frameworks/native/services/vr/hardware_composer/aidl"], export_aidl_headers: true, }, export_include_dirs: ["aidl"], shared_libs: [ "libbinder", "libui", "libutils", "libvrhwc", ], } cc_library_static { name: "libvr_hwc-impl", srcs: [ "vr_composer.cpp", ], static_libs: [ "libvr_hwc-binder", ], shared_libs: [ "libbase", "libbinder", "liblog", "libui", "libutils", "libvrhwc", ], export_shared_lib_headers: [ "libvrhwc", ], cflags: [ "-DLOG_TAG=\"vr_hwc\"", ], } cc_binary { name: "vr_hwc", 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.dvr.composer@1.0", "android.hardware.graphics.composer@2.1", "libbase", "libbinder", "liblog", "libhardware", "libhwbinder", "libui", "libutils", "libvrhwc", ], cflags: [ "-DLOG_TAG=\"vr_hwc\"", ], init_rc: [ "vr_hwc.rc", ], } cc_test { name: "vr_hwc_test", gtest: true, srcs: ["tests/vr_composer_test.cpp"], static_libs: [ "libgtest", "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: [ "libbase", "libbinder", "liblog", "libui", "libutils", ], }
services/vr/hardware_composer/aidl/android/dvr/IVrComposer.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line package android.dvr; import android.dvr.IVrComposerCallback; /** * Service interface exposed by VR HWC exposed to system apps which allows one * system app to connect to get SurfaceFlinger's outputs (all displays). This * is active when SurfaceFlinger is in VR mode, where all 2D output is * redirected to VR HWC. * * @hide */ interface IVrComposer { const String SERVICE_NAME = "vr_hwc"; /** * Registers a callback used to receive frame notifications. */ void registerObserver(in IVrComposerCallback callback); }
services/vr/hardware_composer/aidl/android/dvr/IVrComposerCallback.aidl 0 → 100644 +22 −0 Original line number Diff line number Diff line package android.dvr; import android.dvr.ParcelableComposerFrame; import android.dvr.ParcelableUniqueFd; /** * A system app will implement and register this callback with VRComposer * to receive the layers SurfaceFlinger presented when in VR mode. * * @hide */ interface IVrComposerCallback { /** * Called by the VR HWC service when a new frame is ready to be presented. * * @param frame The new frame VR HWC wants to present. * @return A fence FD used to signal when the previous frame is no longer * used by the client. This may be an invalid fence (-1) if the client is not * using the previous frame, in which case the previous frame may be re-used * at any point in time. */ ParcelableUniqueFd onNewFrame(in ParcelableComposerFrame frame); }
services/vr/hardware_composer/aidl/android/dvr/ParcelableComposerFrame.aidl 0 → 100644 +3 −0 Original line number Diff line number Diff line package android.dvr; parcelable ParcelableComposerFrame cpp_header "android/dvr/parcelable_composer_frame.h";
services/vr/hardware_composer/aidl/android/dvr/ParcelableComposerLayer.aidl 0 → 100644 +3 −0 Original line number Diff line number Diff line package android.dvr; parcelable ParcelableComposerLayer cpp_header "android/dvr/parcelable_composer_layer.h";