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

Unified Diff: cc/tiles/tile.cc

Issue 2726343004: cc: Optimize decode scheduling for checker-images. (Closed)
Patch Set: fixed tile iteration Created 3 years, 8 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/tile.cc
diff --git a/cc/tiles/tile.cc b/cc/tiles/tile.cc
index b43383fd68bdb70d03ac717e0204c92e44f49974..c6f0b896d7cd88086928438ac62fd2ec23a9d064 100644
--- a/cc/tiles/tile.cc
+++ b/cc/tiles/tile.cc
@@ -68,6 +68,17 @@ void Tile::AsValueInto(base::trace_event::TracedValue* value) const {
base::saturated_cast<int>(GPUMemoryUsageInBytes()));
}
+void Tile::SetImageAnalysisResult(
+ std::vector<DrawImage> images_to_decode_before_raster,
+ std::vector<sk_sp<const SkImage>> images_to_checker) {
+ DCHECK(!is_image_analysis_performed_)
+ << "Image Analysis for a tile should be performed once only";
+
+ is_image_analysis_performed_ = true;
+ images_to_decode_before_raster_ = std::move(images_to_decode_before_raster);
+ images_to_checker_ = std::move(images_to_checker);
+}
+
size_t Tile::GPUMemoryUsageInBytes() const {
if (draw_info_.resource_) {
// We can use UncheckedSizeInBytes, since the tile size is determined by the

Powered by Google App Engine
This is Rietveld 408576698