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

Commit c89dff95 authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "bootanimation: do not create texture for parts with count=1" into main...

Merge "bootanimation: do not create texture for parts with count=1" into main am: 13399aef am: 2484bfca am: f9ec8533

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2646620



Change-Id: I70ad3cee002751686e9d442ad7db5d2766bfa516
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 358a3028 f9ec8533
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1523,6 +1523,7 @@ bool BootAnimation::playAnimation(const Animation& animation) {
    for (size_t i=0 ; i<pcount ; i++) {
        const Animation::Part& part(animation.parts[i]);
        const size_t fcount = part.frames.size();
        glBindTexture(GL_TEXTURE_2D, 0);

        // Handle animation package
        if (part.animation != nullptr) {
@@ -1599,8 +1600,10 @@ bool BootAnimation::playAnimation(const Animation& animation) {
                if (r > 0) {
                    glBindTexture(GL_TEXTURE_2D, frame.tid);
                } else {
                    if (part.count != 1) {
                        glGenTextures(1, &frame.tid);
                        glBindTexture(GL_TEXTURE_2D, frame.tid);
                    }
                    int w, h;
                    // Set decoding option to alpha unpremultiplied so that the R, G, B channels
                    // of transparent pixels are preserved.