OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_VIZ_FRAME_SINKS_FRAME_EVICTION_MANAGER_H_ | 5 #ifndef COMPONENTS_VIZ_FRAME_SINKS_FRAME_EVICTION_MANAGER_H_ |
6 #define COMPONENTS_VIZ_FRAME_SINKS_FRAME_EVICTION_MANAGER_H_ | 6 #define COMPONENTS_VIZ_FRAME_SINKS_FRAME_EVICTION_MANAGER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
11 #include <map> | 11 #include <map> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/memory_coordinator_client.h" | 14 #include "base/memory/memory_coordinator_client.h" |
15 #include "base/memory/memory_pressure_listener.h" | 15 #include "base/memory/memory_pressure_listener.h" |
16 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
17 #include "components/viz/frame_sinks/viz_export.h" | 17 #include "components/viz/viz_export.h" |
18 | 18 |
19 namespace viz { | 19 namespace viz { |
20 | 20 |
21 class VIZ_EXPORT FrameEvictionManagerClient { | 21 class VIZ_EXPORT FrameEvictionManagerClient { |
22 public: | 22 public: |
23 virtual ~FrameEvictionManagerClient() {} | 23 virtual ~FrameEvictionManagerClient() {} |
24 virtual void EvictCurrentFrame() = 0; | 24 virtual void EvictCurrentFrame() = 0; |
25 }; | 25 }; |
26 | 26 |
27 // This class is responsible for globally managing which renderers keep their | 27 // This class is responsible for globally managing which renderers keep their |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 std::list<FrameEvictionManagerClient*> unlocked_frames_; | 73 std::list<FrameEvictionManagerClient*> unlocked_frames_; |
74 size_t max_number_of_saved_frames_; | 74 size_t max_number_of_saved_frames_; |
75 float max_handles_; | 75 float max_handles_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(FrameEvictionManager); | 77 DISALLOW_COPY_AND_ASSIGN(FrameEvictionManager); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace viz | 80 } // namespace viz |
81 | 81 |
82 #endif // COMPONENTS_VIZ_FRAME_SINKS_FRAME_EVICTION_MANAGER_H_ | 82 #endif // COMPONENTS_VIZ_FRAME_SINKS_FRAME_EVICTION_MANAGER_H_ |
OLD | NEW |