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

Commit fa37ad52 authored by Dan Stoza's avatar Dan Stoza Committed by android-build-merger
Browse files

SF: Prime shader cache before boot animation

am: 4e63777f

Change-Id: I6dcd5b280ea8385550d616c274aa21c2df68d3c3
parents d1d9d717 4e63777f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -436,6 +436,13 @@ EGLConfig RenderEngine::chooseEglConfig(EGLDisplay display, int format) {
    return config;
}


void RenderEngine::primeCache() const {
    // Getting the ProgramCache instance causes it to prime its shader cache,
    // which is performed in its constructor
    ProgramCache::getInstance();
}

// ---------------------------------------------------------------------------
}; // namespace android
// ---------------------------------------------------------------------------
+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ public:

    static EGLConfig chooseEglConfig(EGLDisplay display, int format);

    void primeCache() const;

    // dump the extension strings. always call the base class.
    virtual void dump(String8& result);

+2 −0
Original line number Diff line number Diff line
@@ -509,6 +509,8 @@ void SurfaceFlinger::init() {
    // set initial conditions (e.g. unblank default device)
    initializeDisplays();

    mRenderEngine->primeCache();

    // start boot animation
    startBootAnim();

+2 −0
Original line number Diff line number Diff line
@@ -538,6 +538,8 @@ void SurfaceFlinger::init() {
    // set initial conditions (e.g. unblank default device)
    initializeDisplays();

    mRenderEngine->primeCache();

    // start boot animation
    startBootAnim();
}