Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: cc/resources/resource_pool.h

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: Fixed windows build failure Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698