Add 8k bitmap render support
Support vendor configure max bitmap size, because of 8k bitmap was over 100M [Test Report] 1. AC on/off PASS 2. boot to launcher PASS 3. VTS/CTS command run cts -m MediatekCtsMtkImageDecoderTest -t android.mtk.cts.ImageDecoderTest#testDecoder8KPerformance -l VERBOSE 4. CTS report 004_Release > C5_temp > QSC_Result > MM_Result_Report cts_imagedecoderplugin_test.rar Bug: 178353420 Change-Id: I582883cca51d42505ec8a81044e471998b88854b Merged-In: I582883cca51d42505ec8a81044e471998b88854b
This commit is contained in:
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
|
||||
import android.util.Pools.SynchronizedPool;
|
||||
import android.view.DisplayListCanvas;
|
||||
import android.view.TextureLayer;
|
||||
import android.os.SystemProperties;
|
||||
|
||||
import dalvik.annotation.optimization.CriticalNative;
|
||||
import dalvik.annotation.optimization.FastNative;
|
||||
@@ -41,7 +42,14 @@ public final class RecordingCanvas extends DisplayListCanvas {
|
||||
private static final int POOL_LIMIT = 25;
|
||||
|
||||
/** @hide */
|
||||
public static final int MAX_BITMAP_SIZE = 100 * 1024 * 1024; // 100 MB
|
||||
private static int getPanelFrameSize() {
|
||||
final int DefaultSize = 100 * 1024 * 1024; // 100 MB;
|
||||
return Math.max(SystemProperties.getInt("ro.hwui.max_texture_allocation_size", DefaultSize),
|
||||
DefaultSize);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public static final int MAX_BITMAP_SIZE = getPanelFrameSize();
|
||||
|
||||
private static final SynchronizedPool<RecordingCanvas> sPool =
|
||||
new SynchronizedPool<>(POOL_LIMIT);
|
||||
|
||||
Reference in New Issue
Block a user