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

Unified Diff: cc/resources/resource_pool.h

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: Patch for landing 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
« no previous file with comments | « cc/raster/staging_buffer_pool.cc ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_pool.h
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h
index d9961ef19f790e4b46fc05ec21903c32f2babc72..378ce0168ddbb72c38323df81cd6795d07426ba1 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -13,6 +13,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/memory_coordinator_client.h"
#include "base/memory/ptr_util.h"
#include "base/trace_event/memory_dump_provider.h"
#include "cc/base/cc_export.h"
@@ -22,7 +23,8 @@
namespace cc {
-class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider {
+class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider,
+ public base::MemoryCoordinatorClient {
public:
// Delay before a resource is considered expired.
static base::TimeDelta kDefaultExpirationDelay;
@@ -156,6 +158,9 @@ class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider {
bool HasEvictableResources() const;
base::TimeTicks GetUsageTimeForLRUResource() const;
+ // Overriden from base::MemoryCoordinatorClient.
+ void OnMemoryStateChange(base::MemoryState state) override;
+
ResourceProvider* resource_provider_;
bool use_gpu_memory_buffers_;
gfx::BufferUsage usage_;
« no previous file with comments | « cc/raster/staging_buffer_pool.cc ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698