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

Unified Diff: cc/tiles/checker_image_tracker.h

Issue 2927573003: cc: Disallow img.decode images from being checker imaged. (Closed)
Patch Set: update Created 3 years, 6 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') | 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 9f64d8d3f06232b30e79f7f2ce2ec6084a7720ee..205e4937ff54acfa6fe3fcde1ce85d333079ee1f 100644
--- a/cc/tiles/checker_image_tracker.h
+++ b/cc/tiles/checker_image_tracker.h
@@ -58,6 +58,14 @@ class CC_EXPORT CheckerImageTracker {
// in re-checkering any images already decoded by the tracker.
void ClearTracker(bool can_clear_decode_policy_tracking);
+ // Informs the tracker to not checker the given image. This can be used to opt
+ // out of the checkering behavior for certain images, such as ones that were
+ // decoded using the img.decode api.
+ // Note that if the image is already being checkered, then it will continue to
+ // do so. This call is meant to be issued prior to the image appearing during
+ // raster.
+ void DisallowCheckeringForImage(const PaintImage& image);
+
private:
enum class DecodePolicy {
// The image can be decoded asynchronously from raster. When set, the image
@@ -65,10 +73,9 @@ class CC_EXPORT CheckerImageTracker {
// image until it has been decoded using the decode service.
ASYNC,
// The image has been decoded asynchronously once and should now be
- // synchronously rasterized with the content.
- SYNC_DECODED_ONCE,
- // The image has been permanently vetoed from being decoded async.
- SYNC_PERMANENT,
+ // synchronously rasterized with the content or the image has been
+ // permanently vetoed from being decoded async.
+ SYNC
};
// Wrapper to unlock an image decode requested from the ImageController on
@@ -123,6 +130,8 @@ class CC_EXPORT CheckerImageTracker {
image_id_to_decode_;
base::WeakPtrFactory<CheckerImageTracker> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(CheckerImageTracker);
};
} // namespace cc
« no previous file with comments | « no previous file | cc/tiles/checker_image_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698