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

Commit 8f06763f authored by xplodwild's avatar xplodwild Committed by Steve Kondik
Browse files

Add SURFACEFLINGER_FORCE_SCREEN_RELEASE to fix screen off flicker

Needed on (at least) crespo, aries and galaxys2

Change-Id: Iaff5379775b9a19bd3cd8598e885e885cc0e8492
parent aee170f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ ifeq ($(TARGET_BOARD_PLATFORM), omap4)
	LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
endif
ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
	LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY -DNEVER_DEFAULT_TO_ASYNC_MODE
	LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY -DNEVER_DEFAULT_TO_ASYNC_MODE -DSURFACEFLINGER_FORCE_SCREEN_RELEASE
	LOCAL_CFLAGS += -DREFRESH_RATE=56
endif

+10 −0
Original line number Diff line number Diff line
@@ -1612,6 +1612,11 @@ uint32_t SurfaceFlinger::setClientStateLocked(

void SurfaceFlinger::screenReleased(int dpy)
{
#ifdef SURFACEFLINGER_FORCE_SCREEN_RELEASE
    const DisplayHardware& hw = graphicPlane(0).displayHardware();
    hw.releaseScreen();
#endif

    // this may be called by a signal handler, we can't do too much in here
    android_atomic_or(eConsoleReleased, &mConsoleSignals);
    signalEvent();
@@ -2131,6 +2136,11 @@ status_t SurfaceFlinger::electronBeamOffAnimationImplLocked()
    glDeleteTextures(1, &tname);
    glDisable(GL_TEXTURE_2D);
    glDisable(GL_BLEND);

#ifdef SURFACEFLINGER_FORCE_SCREEN_RELEASE
    hw.releaseScreen();
#endif

    return NO_ERROR;
}