#ifndef CC_TILES_IMAGE_DECODE_CACHE_UTILS_CC_
#define CC_TILES_IMAGE_DECODE_CACHE_UTILS_CC_
#include "cc/tiles/image_decode_cache_utils.h"
#include "base/check.h"
#include "cc/paint/paint_flags.h"
#include "components/miracle_parameter/common/public/miracle_parameter.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkPixmap.h"
#if !BUILDFLAG(IS_ANDROID)
#include "base/system/sys_info.h"
#endif
namespace cc {
namespace {
BASE_FEATURE(…);
MIRACLE_PARAMETER_FOR_INT(GetDefaultDecodedImageWorkingSetBudgetBytes,
kImageDecodeConfigurableFeature,
"DefaultDecodedImageWorkingSetBudgetBytes",
128 * 1024 * 1024)
#if !BUILDFLAG(IS_ANDROID)
MIRACLE_PARAMETER_FOR_INT(GetDecodedImageWorkingSetBudgetBytesForLowEndDevice,
kImageDecodeConfigurableFeature,
"DecodedImageWorkingSetBudgetBytesForLowEndDevice",
32 * 1024 * 1024)
MIRACLE_PARAMETER_FOR_INT(GetDecodedImageWorkingSetBudgetBytesForAboveThreshold,
kImageDecodeConfigurableFeature,
"DecodedImageWorkingSetBudgetBytesForAboveThreshold",
256 * 1024 * 1024)
MIRACLE_PARAMETER_FOR_INT(GetImageDecodeMemoryThresholdMB,
kImageDecodeConfigurableFeature,
"ImageDecodeMemoryThresholdMB",
4 * 1024)
#endif
}
bool ImageDecodeCacheUtils::ShouldEvictCaches(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { … }
size_t ImageDecodeCacheUtils::GetWorkingSetBytesForImageDecode(
bool for_renderer) { … }
}
#endif