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

Commit 0560ed0d authored by Liana Kazanova's avatar Liana Kazanova Committed by Android (Google) Code Review
Browse files

Revert "Be prepared for 8k video frames in bitmaps"

This reverts commit 97396260.

Reason for revert: DroidMonitor. Potential culprit for b/340310512 - verifying through ABTD before submission.

Change-Id: Ic45f5f844e00202d0122a7c22cc336868c6dd34d
parent 97396260
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -40,7 +40,7 @@ public final class RecordingCanvas extends BaseRecordingCanvas {


    /** @hide */
    /** @hide */
    private static int getPanelFrameSize() {
    private static int getPanelFrameSize() {
        final int DefaultSize = 150 * 1024 * 1024; // 150 MB;
        final int DefaultSize = 100 * 1024 * 1024; // 100 MB;
        return Math.max(SystemProperties.getInt("ro.hwui.max_texture_allocation_size", DefaultSize),
        return Math.max(SystemProperties.getInt("ro.hwui.max_texture_allocation_size", DefaultSize),
                DefaultSize);
                DefaultSize);
    }
    }
@@ -262,7 +262,7 @@ public final class RecordingCanvas extends BaseRecordingCanvas {
    protected void throwIfCannotDraw(Bitmap bitmap) {
    protected void throwIfCannotDraw(Bitmap bitmap) {
        super.throwIfCannotDraw(bitmap);
        super.throwIfCannotDraw(bitmap);
        int bitmapSize = bitmap.getByteCount();
        int bitmapSize = bitmap.getByteCount();
        if (bitmap.getConfig() != Bitmap.Config.HARDWARE && bitmapSize > MAX_BITMAP_SIZE) {
        if (bitmapSize > MAX_BITMAP_SIZE) {
            throw new RuntimeException(
            throw new RuntimeException(
                    "Canvas: trying to draw too large(" + bitmapSize + "bytes) bitmap.");
                    "Canvas: trying to draw too large(" + bitmapSize + "bytes) bitmap.");
        }
        }