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

Commit b923c258 authored by Gabriele M's avatar Gabriele M Committed by Arne Coucheron
Browse files

Gallery2: Increase the size of the tiles when decoding images

BitmapRegionDecoder was refactored in Android N [1] and bigger tiles
are now better to render images, so increase the size of each tile.

[1] https://issuetracker.google.com/issues/37136991#comment11

BUGBASH-188
BUGBASH-299

Change-Id: Ie9c282fc5a98c9da6bb8ae3bcfe869b8b422a84b
parent ccaf2e44
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -154,9 +154,9 @@ public class TileImageView extends GLView {
        mTileDecoder = mThreadPool.submit(new TileDecoder());
        if (sTileSize == 0) {
            if (isHighResolution(context.getAndroidContext())) {
                sTileSize = 512 ;
                sTileSize = 2048;
            } else {
                sTileSize = 256;
                sTileSize = 1024;
            }
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ public class TiledImageRenderer {
    }

    public static int suggestedTileSize(Context context) {
        return isHighResolution(context) ? 512 : 256;
        return isHighResolution(context) ? 2048 : 1024;
    }

    private static boolean isHighResolution(Context context) {