summaryrefslogtreecommitdiff
path: root/drmhwctwo.cpp
diff options
context:
space:
mode:
authorAdrian Salido <salidoa@google.com>2017-02-16 10:29:46 -0800
committerSean Paul <seanpaul@chromium.org>2017-04-25 14:41:03 -0400
commitfa37f67815c29aaa17501569a19037b18512db99 (patch)
tree5e717fc08e35e30774802eb7da7979a06c16375a /drmhwctwo.cpp
parentac8741504befec1d8aa2067a6eb5c2088bc84160 (diff)
drm_hwcomposer: refactor Worker
Make use of standard library mutex and conditions which simplifies use of condition variables and benefits from things like scoped locking. Also add tests to make sure it runs as expected. Change-Id: Iaf92e17e1f6757dce490eddee61f84cb1f953b0c
Diffstat (limited to 'drmhwctwo.cpp')
-rw-r--r--drmhwctwo.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp
index 138f5fa..b13fce1 100644
--- a/drmhwctwo.cpp
+++ b/drmhwctwo.cpp
@@ -236,11 +236,7 @@ HWC2::Error DrmHwcTwo::HwcDisplay::RegisterVsyncCallback(
hwc2_callback_data_t data, hwc2_function_pointer_t func) {
supported(__func__);
auto callback = std::make_shared<DrmVsyncCallback>(data, func);
- int ret = vsync_worker_.RegisterCallback(std::move(callback));
- if (ret) {
- ALOGE("Failed to register callback d=%" PRIu64 " ret=%d", handle_, ret);
- return HWC2::Error::BadDisplay;
- }
+ vsync_worker_.RegisterCallback(std::move(callback));
return HWC2::Error::None;
}