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

Commit 887c2eea authored by Romain Guy's avatar Romain Guy
Browse files

Use the actual screen size for the max bitmap cache size.

Change-Id: I2177f91aea7c449c377fde6337180d15487cecef
parent 67b3a9ea
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -305,8 +305,9 @@ public class ViewConfiguration {
        mScaledTouchExplorationTapSlop = (int) (density * TOUCH_EXPLORATION_TAP_SLOP + 0.5f);
        mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f);

        final Display display = WindowManagerImpl.getDefault().getDefaultDisplay();
        // Size of the screen in bytes, in ARGB_8888 format
        mMaximumDrawingCacheSize = 4 * metrics.widthPixels * metrics.heightPixels;
        mMaximumDrawingCacheSize = 4 * display.getRawWidth() * display.getRawHeight();

        mOverscrollDistance = (int) (sizeAndDensity * OVERSCROLL_DISTANCE + 0.5f);
        mOverflingDistance = (int) (sizeAndDensity * OVERFLING_DISTANCE + 0.5f);