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

Unified Diff: cc/tiles/checker_image_tracker.cc

Issue 2939243002: cc/blink: Veto checker-imaging for multipart image resources. (Closed)
Patch Set: 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
Index: cc/tiles/checker_image_tracker.cc
diff --git a/cc/tiles/checker_image_tracker.cc b/cc/tiles/checker_image_tracker.cc
index e076983ad7e9f3452a042accf35c69efd2895b57..a44bd648937cb9dab0434ae542c63e7c8c923faf 100644
--- a/cc/tiles/checker_image_tracker.cc
+++ b/cc/tiles/checker_image_tracker.cc
@@ -26,12 +26,14 @@ std::string ToString(PaintImage::Id paint_image_id,
bool complete,
bool static_image,
bool fits_size_constraints,
+ bool is_multi_part,
size_t size) {
std::ostringstream str;
str << "paint_image_id[" << paint_image_id << "] sk_image_id[" << sk_image_id
<< "] complete[" << complete << "] static[" << static_image
<< "], fits_size_constraints[" << fits_size_constraints << "], size["
- << size << "]";
+ << size << "]"
+ << " is_multi_part[" << is_multi_part << "]";
return str.str();
}
@@ -182,15 +184,17 @@ bool CheckerImageTracker::ShouldCheckerImage(const DrawImage& draw_image,
// Only checker images that are static and completely loaded and fit within
// the size constraints.
- bool can_checker_image = complete && static_image && fits_size_constraints;
+ bool can_checker_image = complete && static_image &&
vmpstr 2017/06/16 17:35:36 Can you update the comment to state in words when
+ fits_size_constraints && !image.is_multi_part();
if (can_checker_image)
it->second.policy = DecodePolicy::ASYNC;
- TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("cc.debug"),
- "CheckerImageTracker::CheckerImagingDecision",
- "can_checker_image", can_checker_image, "image_params",
- ToString(image_id, image.sk_image()->uniqueID(), complete,
- static_image, fits_size_constraints, size));
+ TRACE_EVENT2(
+ TRACE_DISABLED_BY_DEFAULT("cc.debug"),
+ "CheckerImageTracker::CheckerImagingDecision", "can_checker_image",
+ can_checker_image, "image_params",
+ ToString(image_id, image.sk_image()->uniqueID(), complete, static_image,
+ fits_size_constraints, image.is_multi_part(), size));
}
// Update the decode state from the latest image we have seen. Note that it

Powered by Google App Engine
This is Rietveld 408576698