fix integration issue with 6eae1c4
Incorporate changes done for e5c7565i ("drm_hwcomposer: refactor Worker")
Change-Id: If2f14bdafb4d7e0c44e3afed978fb64a654e7ac0
diff --git a/vsyncworker.cpp b/vsyncworker.cpp
index 6caf56f..2177521 100644
--- a/vsyncworker.cpp
+++ b/vsyncworker.cpp
@@ -48,21 +48,10 @@
return InitWorker();
}
-int VSyncWorker::RegisterCallback(std::shared_ptr<VsyncCallback> callback) {
- int ret = Lock();
- if (ret) {
- ALOGE("Failed to lock vsync worker lock %d\n", ret);
- return ret;
- }
-
+void VSyncWorker::RegisterCallback(std::shared_ptr<VsyncCallback> callback) {
+ Lock();
callback_ = callback;
-
- ret = Unlock();
- if (ret) {
- ALOGE("Failed to unlock vsync worker lock %d\n", ret);
- return ret;
- }
- return 0;
+ Unlock();
}
void VSyncWorker::VSyncControl(bool enabled) {
@@ -138,10 +127,7 @@
int display = display_;
std::shared_ptr<VsyncCallback> callback(callback_);
- ret = Unlock();
- if (ret) {
- ALOGE("Failed to unlock worker %d", ret);
- }
+ Unlock();
if (!enabled)
return;