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

Unified Diff: cc/tiles/software_image_decode_controller.h

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: Fixed DEPS. Created 4 years, 4 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/tiles/software_image_decode_controller.h
diff --git a/cc/tiles/software_image_decode_controller.h b/cc/tiles/software_image_decode_controller.h
index e8a490f63f2ad7a675644c425d2e41fb864d67d3..5f872bc00189616fac5ea065ce8e6c3f803c6dab 100644
--- a/cc/tiles/software_image_decode_controller.h
+++ b/cc/tiles/software_image_decode_controller.h
@@ -24,6 +24,7 @@
#include "cc/playback/draw_image.h"
#include "cc/resources/resource_format.h"
#include "cc/tiles/image_decode_controller.h"
+#include "components/memory_coordinator/common/memory_coordinator_client.h"
#include "third_party/skia/include/core/SkRefCnt.h"
namespace cc {
@@ -101,7 +102,8 @@ struct ImageDecodeControllerKeyHash {
class CC_EXPORT SoftwareImageDecodeController
: public ImageDecodeController,
- public base::trace_event::MemoryDumpProvider {
+ public base::trace_event::MemoryDumpProvider,
+ public memory_coordinator::MemoryCoordinatorClient {
public:
using ImageKey = ImageDecodeControllerKey;
using ImageKeyHash = ImageDecodeControllerKeyHash;
@@ -263,6 +265,10 @@ class CC_EXPORT SoftwareImageDecodeController
const char* cache_name,
base::trace_event::ProcessMemoryDump* pmd) const;
+ // Overriden from memory_coordinator::MemoryCoordinatorClient.
+ void OnMemoryStateChange(
+ memory_coordinator::mojom::MemoryState state) override;
+
std::unordered_map<ImageKey, scoped_refptr<TileTask>, ImageKeyHash>
pending_image_tasks_;

Powered by Google App Engine
This is Rietveld 408576698