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

Commit 05dc4e92 authored by mk.lee's avatar mk.lee Committed by Jay Patel
Browse files

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
parent e4b4df1e
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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);