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

Unified Diff: cc/tiles/software_image_decode_controller.h

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: Fixed BUILD.gn's DEPS 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/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 700913e9240c21452a957132837728d714e2adbe..893cf3d36ac8ba889bcf26669f022574f6a08fb0 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"
#include "ui/gfx/geometry/rect.h"
@@ -102,7 +103,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;
@@ -264,6 +266,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