[M108 Migration][VD] Avoid pending frame counter becoming negative
[platform/framework/web/chromium-efl.git] / cc / tiles / image_decode_cache_utils.h
1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_TILES_IMAGE_DECODE_CACHE_UTILS_H_
6 #define CC_TILES_IMAGE_DECODE_CACHE_UTILS_H_
7
8 #include "base/memory/memory_pressure_listener.h"
9 #include "build/build_config.h"
10 #include "cc/cc_export.h"
11 #include "cc/paint/paint_flags.h"
12 #include "third_party/skia/include/core/SkPixmap.h"
13
14 namespace cc {
15
16 class CC_EXPORT ImageDecodeCacheUtils {
17  public:
18   static bool ShouldEvictCaches(
19       base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
20
21   // Returns budget bytes for decoded images that may be different depending
22   // whether it's for renderer or for the ui compositor.
23   static size_t GetWorkingSetBytesForImageDecode(bool for_renderer);
24 };
25
26 }  // namespace cc
27
28 #endif  // CC_TILES_IMAGE_DECODE_CACHE_UTILS_H_