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

Unified Diff: cc/tiles/image_manager.h

Issue 2339703005: cc: Add ImageManager to keep all the image locking in the same place. (Closed)
Patch Set: 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/image_manager.h
diff --git a/cc/tiles/image_manager.h b/cc/tiles/image_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc6c64fd14f576c78f1dbe2f78875311fde1ec33
--- /dev/null
+++ b/cc/tiles/image_manager.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TILES_IMAGE_MANAGER_H_
+#define CC_TILES_IMAGE_MANAGER_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "cc/base/cc_export.h"
+#include "cc/playback/draw_image.h"
+#include "cc/raster/tile_task.h"
+#include "cc/tiles/image_decode_controller.h"
+
+namespace cc {
+
+class CC_EXPORT ImageManager {
enne (OOO) 2016/09/15 17:42:15 What else do you see going into this class? I thin
vmpstr 2016/09/15 18:16:35 The next thing I was thinking is "SetPredecodeImag
+ public:
+ ImageManager();
+ ~ImageManager();
+
+ void SetImageDecodeController(ImageDecodeController* controller);
+ void GetTasksForImagesAndRef(
+ std::vector<DrawImage>* images,
+ std::vector<scoped_refptr<TileTask>>* tasks,
+ const ImageDecodeController::TracingInfo& tracing_info);
+ void UnrefImages(const std::vector<DrawImage>& images);
+ void ReduceMemoryUsage();
+
+ private:
+ ImageDecodeController* controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(ImageManager);
+};
+
+} // namespace cc
+
+#endif // CC_TILES_IMAGE_MANAGER_H_
« no previous file with comments | « cc/BUILD.gn ('k') | cc/tiles/image_manager.cc » ('j') | cc/tiles/image_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698