Skip to content
Snippets Groups Projects
Commit 97396260 authored by John Reck's avatar John Reck
Browse files

Be prepared for 8k video frames in bitmaps

Two tweaks:

1) Allow software bitmaps up to 150MB, which can fit 8k (~130MB)
bitmaps

2) Always allow hardware bitmaps - we've already paid the cost
and already know it'll work

Fixes: 337114346
Test: make
Change-Id: Ia295dffb842b3f365cdf25f9a62ad1cd2920d542
parent 73a196df
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ public final class RecordingCanvas extends BaseRecordingCanvas {
/** @hide */
private static int getPanelFrameSize() {
final int DefaultSize = 100 * 1024 * 1024; // 100 MB;
final int DefaultSize = 150 * 1024 * 1024; // 150 MB;
return Math.max(SystemProperties.getInt("ro.hwui.max_texture_allocation_size", DefaultSize),
DefaultSize);
}
......@@ -262,7 +262,7 @@ public final class RecordingCanvas extends BaseRecordingCanvas {
protected void throwIfCannotDraw(Bitmap bitmap) {
super.throwIfCannotDraw(bitmap);
int bitmapSize = bitmap.getByteCount();
if (bitmapSize > MAX_BITMAP_SIZE) {
if (bitmap.getConfig() != Bitmap.Config.HARDWARE && bitmapSize > MAX_BITMAP_SIZE) {
throw new RuntimeException(
"Canvas: trying to draw too large(" + bitmapSize + "bytes) bitmap.");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment