summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-06-30 17:24:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-30 17:24:40 +0000
commit806334aacd089d1c419ed77021a2b1bb4f7644ef (patch)
tree6adfbaee9081bee76bcd70e3d899b2d6b5a58423 /services
parent9c8efe6dfddc9a4800283952caacdaf9b898c43d (diff)
parent1998615f8b5becc6d2bb309a4a1686fe24c71bbc (diff)
downloadframeworks_native-806334aacd089d1c419ed77021a2b1bb4f7644ef.zip
frameworks_native-806334aacd089d1c419ed77021a2b1bb4f7644ef.tar.gz
frameworks_native-806334aacd089d1c419ed77021a2b1bb4f7644ef.tar.bz2
am 1998615f: Merge "sf: Initialize EventThread before creating HWC"
* commit '1998615f8b5becc6d2bb309a4a1686fe24c71bbc': 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 067ac69..bf9b886 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -438,6 +438,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,
@@ -489,15 +498,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);