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/checker_image_tracker.h

Issue 2857923004: cc: Keep PaintImage in DrawImage. (Closed)
Patch Set: rebased Created 3 years, 7 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/checker_image_tracker.h
diff --git a/cc/tiles/checker_image_tracker.h b/cc/tiles/checker_image_tracker.h
index db5ccf404594a38c5cede7ce3e683180e73a7be8..97135f7809400f3420094039e9b3dea08dc54820 100644
--- a/cc/tiles/checker_image_tracker.h
+++ b/cc/tiles/checker_image_tracker.h
@@ -8,6 +8,7 @@
#include <unordered_map>
#include <vector>
+#include "base/optional.h"
#include "cc/cc_export.h"
#include "cc/paint/image_id.h"
#include "cc/tiles/image_controller.h"
@@ -39,9 +40,9 @@ class CC_EXPORT CheckerImageTracker {
// Returns true if the decode for |image| will be deferred to the image decode
// service and it should be be skipped during raster.
- bool ShouldCheckerImage(const sk_sp<const SkImage>& image, WhichTree tree);
+ bool ShouldCheckerImage(const PaintImage& image, WhichTree tree);
- using ImageDecodeQueue = std::vector<sk_sp<const SkImage>>;
+ using ImageDecodeQueue = std::vector<PaintImage>;
void ScheduleImageDecodeQueue(ImageDecodeQueue image_decode_queue);
// Returns the set of images to invalidate on the sync tree.
@@ -88,7 +89,7 @@ class CC_EXPORT CheckerImageTracker {
// The currently outstanding image decode that has been scheduled with the
// decode service. There can be only one outstanding decode at a time.
- sk_sp<const SkImage> outstanding_image_decode_;
+ base::Optional<PaintImage> outstanding_image_decode_;
// A map of ImageId to its DecodePolicy.
// TODO(khushalsagar): Limit the size of this set.

Powered by Google App Engine
This is Rietveld 408576698