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

Unified Diff: cc/tiles/software_image_decode_cache.h

Issue 2631453002: Revert of cc: Add image decode queue functionality to image manager. (Closed)
Patch Set: Created 3 years, 11 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/tiles/image_decode_cache.h ('k') | cc/tiles/software_image_decode_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/software_image_decode_cache.h
diff --git a/cc/tiles/software_image_decode_cache.h b/cc/tiles/software_image_decode_cache.h
index 1f3d72f27d83511d657d5c8d4220e364c996b2c4..9befb55dad464ba69139e7343a021cc20d29804c 100644
--- a/cc/tiles/software_image_decode_cache.h
+++ b/cc/tiles/software_image_decode_cache.h
@@ -109,8 +109,6 @@
using ImageKey = ImageDecodeCacheKey;
using ImageKeyHash = ImageDecodeCacheKeyHash;
- enum class DecodeTaskType { USE_IN_RASTER_TASKS, USE_OUT_OF_RASTER_TASKS };
-
SoftwareImageDecodeCache(ResourceFormat format,
size_t locked_memory_limit_bytes);
~SoftwareImageDecodeCache() override;
@@ -119,9 +117,6 @@
bool GetTaskForImageAndRef(const DrawImage& image,
const TracingInfo& tracing_info,
scoped_refptr<TileTask>* task) override;
- bool GetOutOfRasterDecodeTaskForImageAndRef(
- const DrawImage& image,
- scoped_refptr<TileTask>* task) override;
void UnrefImage(const DrawImage& image) override;
DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override;
void DrawWithImageFinished(const DrawImage& image,
@@ -133,11 +128,9 @@
// Decode the given image and store it in the cache. This is only called by an
// image decode task from a worker thread.
- void DecodeImage(const ImageKey& key,
- const DrawImage& image,
- DecodeTaskType task_type);
-
- void RemovePendingTask(const ImageKey& key, DecodeTaskType task_type);
+ void DecodeImage(const ImageKey& key, const DrawImage& image);
+
+ void RemovePendingTask(const ImageKey& key);
// MemoryDumpProvider overrides.
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
@@ -274,17 +267,8 @@
// Overriden from base::MemoryCoordinatorClient.
void OnMemoryStateChange(base::MemoryState state) override;
- // Helper method to get the different tasks. Note that this should be used as
- // if it was public (ie, all of the locks need to be properly acquired).
- bool GetTaskForImageAndRefInternal(const DrawImage& image,
- const TracingInfo& tracing_info,
- DecodeTaskType type,
- scoped_refptr<TileTask>* task);
-
std::unordered_map<ImageKey, scoped_refptr<TileTask>, ImageKeyHash>
- pending_in_raster_image_tasks_;
- std::unordered_map<ImageKey, scoped_refptr<TileTask>, ImageKeyHash>
- pending_out_of_raster_image_tasks_;
+ pending_image_tasks_;
// The members below this comment can only be accessed if the lock is held to
// ensure that they are safe to access on multiple threads.
« no previous file with comments | « cc/tiles/image_decode_cache.h ('k') | cc/tiles/software_image_decode_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698