Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49b2e136 authored by Dan Stoza's avatar Dan Stoza Committed by Android Git Automerger
Browse files

am 6a25a287: am 806334aa: am 1998615f: Merge "sf: Initialize EventThread before creating HWC"

* commit '6a25a287':
  sf: Initialize EventThread before creating HWC
parents ad3d7893 6a25a287
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -442,6 +442,15 @@ void SurfaceFlinger::init() {
    mEGLDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    mEGLDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    eglInitialize(mEGLDisplay, NULL, NULL);
    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
    // Initialize the H/W composer object.  There may or may not be an
    // actual hardware composer underneath.
    // actual hardware composer underneath.
    mHwc = new HWComposer(this,
    mHwc = new HWComposer(this,
@@ -493,15 +502,6 @@ void SurfaceFlinger::init() {
    // (which may happens before we render something)
    // (which may happens before we render something)
    getDefaultDisplayDevice()->makeCurrent(mEGLDisplay, mEGLContext);
    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 = new EventControlThread(this);
    mEventControlThread->run("EventControl", PRIORITY_URGENT_DISPLAY);
    mEventControlThread->run("EventControl", PRIORITY_URGENT_DISPLAY);