summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-06-30 17:38:41 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-30 17:38:41 +0000
commit6a25a2872852f23058268adcec61600460fcdfb6 (patch)
tree7fcc5d2baed33a66259bd35812cc75238d0a47d3 /services
parentb5b21d1837ba2039293feb283117e8ee441ec2a8 (diff)
parent806334aacd089d1c419ed77021a2b1bb4f7644ef (diff)
downloadframeworks_native-6a25a2872852f23058268adcec61600460fcdfb6.zip
frameworks_native-6a25a2872852f23058268adcec61600460fcdfb6.tar.gz
frameworks_native-6a25a2872852f23058268adcec61600460fcdfb6.tar.bz2
am 806334aa: am 1998615f: Merge "sf: Initialize EventThread before creating HWC"
* commit '806334aacd089d1c419ed77021a2b1bb4f7644ef': sf: Initialize EventThread before creating HWC
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index de0f921..9b9867d 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -442,6 +442,15 @@ void SurfaceFlinger::init() {
mEGLDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
eglInitialize(mEGLDisplay, NULL, NULL);
+ // start the EventThread
+ sp<VSyncSource> vsyncSrc = new DispSyncSource(&mPrimaryDispSync,
+ vsyncPhaseOffsetNs, true, "app");
+ mEventThread = new EventThread(vsyncSrc);
+ sp<VSyncSource> sfVsyncSrc = new DispSyncSource(&mPrimaryDispSync,
+ sfVsyncPhaseOffsetNs, true, "sf");
+ mSFEventThread = new EventThread(sfVsyncSrc);
+ mEventQueue.setEventThread(mSFEventThread);
+
// Initialize the H/W composer object. There may or may not be an
// actual hardware composer underneath.
mHwc = new HWComposer(this,
@@ -493,15 +502,6 @@ void SurfaceFlinger::init() {
// (which may happens before we render something)
getDefaultDisplayDevice()->makeCurrent(mEGLDisplay, mEGLContext);
- // start the EventThread
- sp<VSyncSource> vsyncSrc = new DispSyncSource(&mPrimaryDispSync,
- vsyncPhaseOffsetNs, true, "app");
- mEventThread = new EventThread(vsyncSrc);
- sp<VSyncSource> sfVsyncSrc = new DispSyncSource(&mPrimaryDispSync,
- sfVsyncPhaseOffsetNs, true, "sf");
- mSFEventThread = new EventThread(sfVsyncSrc);
- mEventQueue.setEventThread(mSFEventThread);
-
mEventControlThread = new EventControlThread(this);
mEventControlThread->run("EventControl", PRIORITY_URGENT_DISPLAY);