Merge "Remove framebuffer_target" into oc-dev
am: c6c0c9c730
Change-Id: I6d65d8fb4d0586228890327c478bfce57cf3c7f7
diff --git a/libs/vr/libvrflinger/hardware_composer.cpp b/libs/vr/libvrflinger/hardware_composer.cpp
index 079d6fd..4c08284 100644
--- a/libs/vr/libvrflinger/hardware_composer.cpp
+++ b/libs/vr/libvrflinger/hardware_composer.cpp
@@ -49,10 +49,6 @@
// Offset before vsync to submit frames to hardware composer.
constexpr int64_t kFramePostOffsetNs = 4000000; // 4ms
-constexpr size_t kDefaultDisplayConfigCount = 32;
-
-constexpr float kMetersPerInch = 0.0254f;
-
const char kBacklightBrightnessSysFile[] =
"/sys/class/leds/lcd-backlight/brightness";
@@ -65,23 +61,6 @@
const char kRightEyeOffsetProperty[] = "dvr.right_eye_offset_ns";
-// Returns our best guess for the time the compositor will spend rendering the
-// next frame.
-int64_t GuessFrameTime(int compositor_visible_layer_count) {
- // The cost of asynchronous EDS and lens warp is currently measured at 2.5ms
- // for one layer and 7ms for two layers, but guess a higher frame time to
- // account for CPU overhead. This guess is only used before we've measured the
- // actual time to render a frame for the current compositor configuration.
- switch (compositor_visible_layer_count) {
- case 0:
- return 500000; // .5ms
- case 1:
- return 5000000; // 5ms
- default:
- return 10500000; // 10.5ms
- }
-}
-
// Get time offset from a vsync to when the pose for that vsync should be
// predicted out to. For example, if scanout gets halfway through the frame
// at the halfway point between vsyncs, then this could be half the period.
@@ -241,14 +220,6 @@
}
void HardwareComposer::OnPostThreadResumed() {
- constexpr int format = HAL_PIXEL_FORMAT_RGBA_8888;
- constexpr int usage =
- GRALLOC_USAGE_HW_FB | GRALLOC_USAGE_HW_COMPOSER | GRALLOC_USAGE_HW_RENDER;
-
- framebuffer_target_ = std::make_shared<IonBuffer>(
- native_display_metrics_.width, native_display_metrics_.height, format,
- usage);
-
hwc2_hidl_->resetCommands();
// Connect to pose service.
@@ -275,7 +246,6 @@
}
void HardwareComposer::OnPostThreadPaused() {
- framebuffer_target_.reset();
retire_fence_fds_.clear();
display_surfaces_.clear();
diff --git a/libs/vr/libvrflinger/hardware_composer.h b/libs/vr/libvrflinger/hardware_composer.h
index 5a75f42..20327a3 100644
--- a/libs/vr/libvrflinger/hardware_composer.h
+++ b/libs/vr/libvrflinger/hardware_composer.h
@@ -383,9 +383,6 @@
// Transform required to get from native to logical display orientation.
HWC::Transform display_transform_ = HWC::Transform::None;
- // Buffer for the background layer required by hardware composer.
- std::shared_ptr<IonBuffer> framebuffer_target_;
-
// Pending surface list. Set by the display service when DirectSurfaces are
// added, removed, or change visibility. Written by the message dispatch
// thread and read by the post thread.