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

Unified Diff: cc/tiles/checker_image_tracker.h

Issue 2857923004: cc: Keep PaintImage in DrawImage. (Closed)
Patch Set: .. 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
« no previous file with comments | « cc/test/fake_recording_source.h ('k') | cc/tiles/checker_image_tracker.cc » ('j') | no next file with comments »
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 7f662e51cdcb7bdd7a871c8dfae60b27a4411e59..9f64d8d3f06232b30e79f7f2ce2ec6084a7720ee 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,13 +40,13 @@ 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.
- const ImageIdFlatSet& TakeImagesToInvalidateOnSyncTree();
+ const PaintImageIdFlatSet& TakeImagesToInvalidateOnSyncTree();
// Called when the sync tree is activated. Each call to
// TakeImagesToInvalidateOnSyncTree() must be followed by this when the
@@ -86,7 +87,7 @@ class CC_EXPORT CheckerImageTracker {
DISALLOW_COPY_AND_ASSIGN(ScopedDecodeHolder);
};
- void DidFinishImageDecode(ImageId image_id,
+ void DidFinishImageDecode(PaintImage::Id image_id,
ImageController::ImageDecodeRequestId request_id,
ImageController::ImageDecodeResult result);
@@ -100,10 +101,10 @@ class CC_EXPORT CheckerImageTracker {
// A set of images which have been decoded and are pending invalidation for
// raster on the checkered tiles.
- ImageIdFlatSet images_pending_invalidation_;
+ PaintImageIdFlatSet images_pending_invalidation_;
// A set of images which were invalidated on the current sync tree.
- ImageIdFlatSet invalidated_images_on_current_sync_tree_;
+ PaintImageIdFlatSet invalidated_images_on_current_sync_tree_;
// 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
@@ -112,13 +113,13 @@ 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.
- std::unordered_map<ImageId, DecodePolicy> image_async_decode_state_;
+ std::unordered_map<PaintImage::Id, DecodePolicy> image_async_decode_state_;
// A map of image id to image decode request id for images to be unlocked.
- std::unordered_map<ImageId, std::unique_ptr<ScopedDecodeHolder>>
+ std::unordered_map<PaintImage::Id, std::unique_ptr<ScopedDecodeHolder>>
image_id_to_decode_;
base::WeakPtrFactory<CheckerImageTracker> weak_factory_;
« no previous file with comments | « cc/test/fake_recording_source.h ('k') | cc/tiles/checker_image_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698