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

Commit 6ef9ffe2 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "surfaceflinger: allow targets to override the electronbeam duration" into gingerbread

parents 5e7955f3 1d7c1ae2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -46,6 +46,10 @@ ifeq ($(BOARD_AVOID_DRAW_TEXTURE_EXTENSION), true)
	LOCAL_CFLAGS += -DAVOID_DRAW_TEXTURE
endif

ifneq ($(TARGET_ELECTRONBEAM_FRAMES),)
	LOCAL_CFLAGS += -DELECTRONBEAM_FRAMES=$(TARGET_ELECTRONBEAM_FRAMES)
endif

# need "-lrt" on Linux simulator to pick up clock_gettime
ifeq ($(TARGET_SIMULATOR),true)
	ifeq ($(HOST_OS),linux)
+6 −2
Original line number Diff line number Diff line
@@ -1708,6 +1708,10 @@ status_t SurfaceFlinger::renderScreenToTextureLocked(DisplayID dpy,

// ---------------------------------------------------------------------------

#ifndef ELECTRONBEAM_FRAMES
 #define ELECTRONBEAM_FRAMES 12
#endif

status_t SurfaceFlinger::electronBeamOffAnimationImplLocked()
{
    status_t result = PERMISSION_DENIED;
@@ -1790,8 +1794,8 @@ status_t SurfaceFlinger::electronBeamOffAnimationImplLocked()
        }
    };

    // the full animation is 24 frames
    const int nbFrames = 12;
    // the full animation is 2*ELECTRONBEAM_FRAMES frames
    const int nbFrames = ELECTRONBEAM_FRAMES;
    s_curve_interpolator itr(nbFrames, 7.5f);
    s_curve_interpolator itg(nbFrames, 8.0f);
    s_curve_interpolator itb(nbFrames, 8.5f);