Loading libs/vr/libvrflinger/hardware_composer.cpp +0 −28 Original line number Diff line number Diff line Loading @@ -45,9 +45,6 @@ namespace dvr { namespace { const char kBacklightBrightnessSysFile[] = "/sys/class/leds/lcd-backlight/brightness"; const char kDvrPerformanceProperty[] = "sys.dvr.performance"; const char kDvrStandaloneProperty[] = "ro.boot.vr"; Loading Loading @@ -257,13 +254,6 @@ void HardwareComposer::OnPostThreadResumed() { EnableVsync(true); // TODO(skiazyk): We need to do something about accessing this directly, // supposedly there is a backlight service on the way. // TODO(steventhomas): When we change the backlight setting, will surface // flinger (or something else) set it back to its original value once we give // control of the display back to surface flinger? SetBacklightBrightness(255); // Trigger target-specific performance mode change. property_set(kDvrPerformanceProperty, "performance"); } Loading Loading @@ -698,16 +688,6 @@ void HardwareComposer::PostThread() { bool thread_policy_setup = SetThreadPolicy("graphics:high", "/system/performance"); #if ENABLE_BACKLIGHT_BRIGHTNESS // TODO(hendrikw): This isn't required at the moment. It's possible that there // is another method to access this when needed. // Open the backlight brightness control sysfs node. backlight_brightness_fd_ = LocalHandle(kBacklightBrightnessSysFile, O_RDWR); ALOGW_IF(!backlight_brightness_fd_, "HardwareComposer: Failed to open backlight brightness control: %s", strerror(errno)); #endif // ENABLE_BACKLIGHT_BRIGHTNESS // Create a timerfd based on CLOCK_MONOTINIC. vsync_sleep_timer_fd_.Reset(timerfd_create(CLOCK_MONOTONIC, 0)); LOG_ALWAYS_FATAL_IF( Loading Loading @@ -983,14 +963,6 @@ void HardwareComposer::SetVSyncCallback(VSyncCallback callback) { vsync_callback_ = callback; } void HardwareComposer::SetBacklightBrightness(int brightness) { if (backlight_brightness_fd_) { std::array<char, 32> text; const int length = snprintf(text.data(), text.size(), "%d", brightness); write(backlight_brightness_fd_.Get(), text.data(), length); } } Return<void> HardwareComposer::ComposerCallback::onHotplug( Hwc2::Display display, IComposerCallback::Connection conn) { // Our first onHotplug callback is always for the primary display. Loading libs/vr/libvrflinger/hardware_composer.h +0 −5 Original line number Diff line number Diff line Loading @@ -391,8 +391,6 @@ class HardwareComposer { HWC::Error Validate(hwc2_display_t display); HWC::Error Present(hwc2_display_t display); void SetBacklightBrightness(int brightness); void PostLayers(); void PostThread(); Loading Loading @@ -499,9 +497,6 @@ class HardwareComposer { // notified via post_thread_wait_. bool boot_finished_ = false; // Backlight LED brightness sysfs node. pdx::LocalHandle backlight_brightness_fd_; // VSync sleep timerfd. pdx::LocalHandle vsync_sleep_timer_fd_; Loading Loading
libs/vr/libvrflinger/hardware_composer.cpp +0 −28 Original line number Diff line number Diff line Loading @@ -45,9 +45,6 @@ namespace dvr { namespace { const char kBacklightBrightnessSysFile[] = "/sys/class/leds/lcd-backlight/brightness"; const char kDvrPerformanceProperty[] = "sys.dvr.performance"; const char kDvrStandaloneProperty[] = "ro.boot.vr"; Loading Loading @@ -257,13 +254,6 @@ void HardwareComposer::OnPostThreadResumed() { EnableVsync(true); // TODO(skiazyk): We need to do something about accessing this directly, // supposedly there is a backlight service on the way. // TODO(steventhomas): When we change the backlight setting, will surface // flinger (or something else) set it back to its original value once we give // control of the display back to surface flinger? SetBacklightBrightness(255); // Trigger target-specific performance mode change. property_set(kDvrPerformanceProperty, "performance"); } Loading Loading @@ -698,16 +688,6 @@ void HardwareComposer::PostThread() { bool thread_policy_setup = SetThreadPolicy("graphics:high", "/system/performance"); #if ENABLE_BACKLIGHT_BRIGHTNESS // TODO(hendrikw): This isn't required at the moment. It's possible that there // is another method to access this when needed. // Open the backlight brightness control sysfs node. backlight_brightness_fd_ = LocalHandle(kBacklightBrightnessSysFile, O_RDWR); ALOGW_IF(!backlight_brightness_fd_, "HardwareComposer: Failed to open backlight brightness control: %s", strerror(errno)); #endif // ENABLE_BACKLIGHT_BRIGHTNESS // Create a timerfd based on CLOCK_MONOTINIC. vsync_sleep_timer_fd_.Reset(timerfd_create(CLOCK_MONOTONIC, 0)); LOG_ALWAYS_FATAL_IF( Loading Loading @@ -983,14 +963,6 @@ void HardwareComposer::SetVSyncCallback(VSyncCallback callback) { vsync_callback_ = callback; } void HardwareComposer::SetBacklightBrightness(int brightness) { if (backlight_brightness_fd_) { std::array<char, 32> text; const int length = snprintf(text.data(), text.size(), "%d", brightness); write(backlight_brightness_fd_.Get(), text.data(), length); } } Return<void> HardwareComposer::ComposerCallback::onHotplug( Hwc2::Display display, IComposerCallback::Connection conn) { // Our first onHotplug callback is always for the primary display. Loading
libs/vr/libvrflinger/hardware_composer.h +0 −5 Original line number Diff line number Diff line Loading @@ -391,8 +391,6 @@ class HardwareComposer { HWC::Error Validate(hwc2_display_t display); HWC::Error Present(hwc2_display_t display); void SetBacklightBrightness(int brightness); void PostLayers(); void PostThread(); Loading Loading @@ -499,9 +497,6 @@ class HardwareComposer { // notified via post_thread_wait_. bool boot_finished_ = false; // Backlight LED brightness sysfs node. pdx::LocalHandle backlight_brightness_fd_; // VSync sleep timerfd. pdx::LocalHandle vsync_sleep_timer_fd_; Loading