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

Unified Diff: cc/tiles/checker_image_tracker.h

Issue 2726343004: cc: Optimize decode scheduling for checker-images. (Closed)
Patch Set: .. Created 3 years, 9 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 | « no previous file | cc/tiles/checker_image_tracker.cc » ('j') | cc/tiles/checker_image_tracker.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/checker_image_tracker.h
diff --git a/cc/tiles/checker_image_tracker.h b/cc/tiles/checker_image_tracker.h
index b2a16ecf9b2d60c9e4b9cc1371c47329c9fd406e..ee99d483e5b21d4d8d0d3f410bbb00e279f1bce9 100644
--- a/cc/tiles/checker_image_tracker.h
+++ b/cc/tiles/checker_image_tracker.h
@@ -5,6 +5,7 @@
#ifndef CC_TILES_CHECKER_IMAGE_TRACKER_H_
#define CC_TILES_CHECKER_IMAGE_TRACKER_H_
+#include <queue>
#include <unordered_map>
#include <vector>
@@ -51,6 +52,8 @@ class CC_EXPORT CheckerImageTracker {
// Returns the set of images to invalidate on the sync tree.
const ImageIdFlatSet& TakeImagesToInvalidateOnSyncTree();
+ void ResetImageDecodeQueue();
+
void DidActivateSyncTree();
private:
@@ -64,6 +67,7 @@ class CC_EXPORT CheckerImageTracker {
WhichTree tree) const;
void ScheduleImageDecodeIfNecessary(const sk_sp<const SkImage>& image);
+ void RequestNextImageDecode();
vmpstr 2017/03/06 20:45:25 Comment, and if this is what I think it is, then i
Khushal 2017/03/07 00:31:08 Done.
ImageController* image_controller_;
CheckerImageTrackerClient* client_;
@@ -76,12 +80,14 @@ class CC_EXPORT CheckerImageTracker {
// A set of images which were invalidated on the current sync tree.
ImageIdFlatSet invalidated_images_on_current_sync_tree_;
- // A set of images which are currently pending decode from the image decode
- // service.
- // TODO(khushalsagar): This should be a queue that gets re-built each time we
- // do a PrepareTiles? See crbug.com/689184.
+ // The set of images in the image decode queue.
ImageIdFlatSet pending_image_decodes_;
+ // The queue of images pending decode. We maintain a queue to ensure that the
+ // order in which images are decoded is aligned with the priority of the tiles
+ // dependent on these images.
+ std::queue<sk_sp<const SkImage>> image_decode_request_queue_;
vmpstr 2017/03/06 20:45:25 std::queue's underlying type is std::deque which i
Khushal 2017/03/07 00:31:09 Done.
+
// A set of images which have been decoded at least once from the
// ImageDecodeService and should not be checkered again.
// TODO(khushalsagar): Limit the size of this set.
« no previous file with comments | « no previous file | cc/tiles/checker_image_tracker.cc » ('j') | cc/tiles/checker_image_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698