Index: cc/resources/resource_pool.h |
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h |
index d9961ef19f790e4b46fc05ec21903c32f2babc72..6a075422136c81784ca27729786370724c70900f 100644 |
--- a/cc/resources/resource_pool.h |
+++ b/cc/resources/resource_pool.h |
@@ -19,10 +19,13 @@ |
#include "cc/resources/resource.h" |
#include "cc/resources/resource_format.h" |
#include "cc/resources/scoped_resource.h" |
+#include "components/memory_coordinator/common/memory_coordinator_client.h" |
namespace cc { |
-class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider { |
+class CC_EXPORT ResourcePool |
+ : public base::trace_event::MemoryDumpProvider, |
+ public memory_coordinator::MemoryCoordinatorClient { |
public: |
// Delay before a resource is considered expired. |
static base::TimeDelta kDefaultExpirationDelay; |
@@ -156,6 +159,10 @@ class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider { |
bool HasEvictableResources() const; |
base::TimeTicks GetUsageTimeForLRUResource() const; |
+ // Overriden from memory_coordinator::MemoryCoordinatorClient. |
+ void OnMemoryStateChange( |
+ memory_coordinator::mojom::MemoryState state) override; |
+ |
ResourceProvider* resource_provider_; |
bool use_gpu_memory_buffers_; |
gfx::BufferUsage usage_; |