summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/EventThread.cpp
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2018-01-31 16:46:15 -0800
committer Lloyd Pique <lpique@google.com> 2018-02-01 16:20:27 -0800
commit755e319d6a656dc92bd4f2b486d8f5a44b0e7350 (patch)
tree8be971a0f2e73e5da833174c63c6e3e5c1c25d52 /services/surfaceflinger/EventThread.cpp
parent78ce418ea76033a19663dcc0905e0390d21e5baf (diff)
SF: Cleanup EventControlThread
Primarily the goal was to eliminate the use of RefBase in various forms from EventControlThread. 1) SurfaceFlinger only needs a std::unique_ptr<> and not an android::sp<> to own the created instance. 2) Convert from android::Thread to std::thread, along with using std::mutex and std::condition_variable to keep consistency. 3) The code only needs a reference to a function to call, rather than a reference to all of SurfaceFlinger. This removes an unnecessary full dependency. 4) Switch the header to #pragma once. 5) Added Clang thread annotations and enabled the corresponding warning. 6) Simplified the thread function to eliminate unnecessary locals and indentation. 7) Added proper thread shutdown handling (invoked by dtor). Bug: None Test: Verified event control thread still works on Pixel XL Change-Id: I2d5621b0cbbfb9e0f8c5831ccfc94704c95a4a55
Diffstat (limited to 'services/surfaceflinger/EventThread.cpp')
0 files changed, 0 insertions, 0 deletions