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

Unified Diff: cc/tiles/tile_manager.cc

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/tiles/tile_manager.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index dd45d3a40729f3a9ed42be261872c22ecc68b5d4..e251ac6049ed836c31bf7670ea8c2400bdbc94b0 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -851,7 +851,7 @@ void TileManager::PartitionImagesForCheckering(
const PrioritizedTile& prioritized_tile,
const gfx::ColorSpace& raster_color_space,
std::vector<DrawImage>* sync_decoded_images,
- std::vector<sk_sp<const SkImage>>* checkered_images) {
+ std::vector<PaintImage>* checkered_images) {
Tile* tile = prioritized_tile.tile();
std::vector<DrawImage> images_in_tile;
prioritized_tile.raster_source()->GetDiscardableImagesInRect(
@@ -860,8 +860,9 @@ void TileManager::PartitionImagesForCheckering(
WhichTree tree = tile->tiling()->tree();
for (auto& draw_image : images_in_tile) {
- if (checker_image_tracker_.ShouldCheckerImage(draw_image.image(), tree))
- checkered_images->push_back(draw_image.image());
+ if (checker_image_tracker_.ShouldCheckerImage(draw_image.paint_image(),
+ tree))
+ checkered_images->push_back(draw_image.paint_image());
else
sync_decoded_images->push_back(draw_image);
}
@@ -879,8 +880,9 @@ void TileManager::AddCheckeredImagesToDecodeQueue(
WhichTree tree = tile->tiling()->tree();
for (auto& draw_image : images_in_tile) {
- if (checker_image_tracker_.ShouldCheckerImage(draw_image.image(), tree))
- image_decode_queue->push_back(draw_image.image());
+ if (checker_image_tracker_.ShouldCheckerImage(draw_image.paint_image(),
+ tree))
+ image_decode_queue->push_back(draw_image.paint_image());
}
}
@@ -1088,12 +1090,11 @@ scoped_refptr<TileTask> TileManager::CreateRasterTask(
scheduled_draw_images_[tile->id()];
sync_decoded_images.clear();
if (!playback_settings.skip_images) {
- std::vector<sk_sp<const SkImage>> checkered_images;
+ std::vector<PaintImage> checkered_images;
PartitionImagesForCheckering(prioritized_tile, color_space,
&sync_decoded_images, &checkered_images);
for (const auto& image : checkered_images) {
- ImageId image_id = image->uniqueID();
- playback_settings.images_to_skip.insert(image_id);
+ playback_settings.images_to_skip.insert(image.sk_image()->uniqueID());
// This can be the case for tiles on the active tree that will be replaced
// or are occluded on the pending tree. While we still need to continue
@@ -1387,7 +1388,7 @@ void TileManager::MarkTilesOutOfMemory(
}
}
-const ImageIdFlatSet& TileManager::TakeImagesToInvalidateOnSyncTree() {
+const PaintImageIdFlatSet& TileManager::TakeImagesToInvalidateOnSyncTree() {
return checker_image_tracker_.TakeImagesToInvalidateOnSyncTree();
}
« no previous file with comments | « cc/tiles/tile_manager.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698