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

Side by Side Diff: cc/tiles/tile_manager.cc

Issue 2555363004: [6/6] git cl format (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/tiles/tile_manager.h" 5 #include "cc/tiles/tile_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 } 880 }
881 881
882 const std::vector<PrioritizedTile>& tiles_to_process_for_images = 882 const std::vector<PrioritizedTile>& tiles_to_process_for_images =
883 work_to_schedule.tiles_to_process_for_images; 883 work_to_schedule.tiles_to_process_for_images;
884 std::vector<DrawImage> new_locked_images; 884 std::vector<DrawImage> new_locked_images;
885 for (const PrioritizedTile& prioritized_tile : tiles_to_process_for_images) { 885 for (const PrioritizedTile& prioritized_tile : tiles_to_process_for_images) {
886 Tile* tile = prioritized_tile.tile(); 886 Tile* tile = prioritized_tile.tile();
887 887
888 std::vector<DrawImage> images; 888 std::vector<DrawImage> images;
889 prioritized_tile.raster_source()->GetDiscardableImagesInRect( 889 prioritized_tile.raster_source()->GetDiscardableImagesInRect(
890 tile->enclosing_layer_rect(), tile->raster_transform().scale(), &images) ; 890 tile->enclosing_layer_rect(), tile->raster_transform().scale(),
891 &images);
891 new_locked_images.insert(new_locked_images.end(), images.begin(), 892 new_locked_images.insert(new_locked_images.end(), images.begin(),
892 images.end()); 893 images.end());
893 } 894 }
894 895
895 // TODO(vmpstr): SOON is misleading here, but these images can come from 896 // TODO(vmpstr): SOON is misleading here, but these images can come from
896 // several diffent tiles. Rethink what we actually want to trace here. Note 897 // several diffent tiles. Rethink what we actually want to trace here. Note
897 // that I'm using SOON, since it can't be NOW (these are prepaint). 898 // that I'm using SOON, since it can't be NOW (these are prepaint).
898 ImageDecodeCache::TracingInfo tracing_info(prepare_tiles_count_, 899 ImageDecodeCache::TracingInfo tracing_info(prepare_tiles_count_,
899 TilePriority::SOON); 900 TilePriority::SOON);
900 std::vector<scoped_refptr<TileTask>> new_locked_image_tasks = 901 std::vector<scoped_refptr<TileTask>> new_locked_image_tasks =
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 RasterSource::PlaybackSettings playback_settings; 984 RasterSource::PlaybackSettings playback_settings;
984 playback_settings.skip_images = 985 playback_settings.skip_images =
985 prioritized_tile.priority().resolution == LOW_RESOLUTION; 986 prioritized_tile.priority().resolution == LOW_RESOLUTION;
986 987
987 // Create and queue all image decode tasks that this tile depends on. 988 // Create and queue all image decode tasks that this tile depends on.
988 TileTask::Vector decode_tasks; 989 TileTask::Vector decode_tasks;
989 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; 990 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()];
990 images.clear(); 991 images.clear();
991 if (!playback_settings.skip_images) { 992 if (!playback_settings.skip_images) {
992 prioritized_tile.raster_source()->GetDiscardableImagesInRect( 993 prioritized_tile.raster_source()->GetDiscardableImagesInRect(
993 tile->enclosing_layer_rect(), tile->raster_transform().scale(), &images) ; 994 tile->enclosing_layer_rect(), tile->raster_transform().scale(),
995 &images);
994 } 996 }
995 997
996 // We can skip the image hijack canvas if we have no images. 998 // We can skip the image hijack canvas if we have no images.
997 playback_settings.use_image_hijack_canvas = !images.empty(); 999 playback_settings.use_image_hijack_canvas = !images.empty();
998 1000
999 // Get the tasks for the required images. 1001 // Get the tasks for the required images.
1000 ImageDecodeCache::TracingInfo tracing_info( 1002 ImageDecodeCache::TracingInfo tracing_info(
1001 prepare_tiles_count_, prioritized_tile.priority().priority_bin); 1003 prepare_tiles_count_, prioritized_tile.priority().priority_bin);
1002 image_manager_.GetTasksForImagesAndRef(&images, &decode_tasks, tracing_info); 1004 image_manager_.GetTasksForImagesAndRef(&images, &decode_tasks, tracing_info);
1003 1005
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 all_tile_tasks_completed = false; 1345 all_tile_tasks_completed = false;
1344 did_notify_all_tile_tasks_completed = false; 1346 did_notify_all_tile_tasks_completed = false;
1345 } 1347 }
1346 1348
1347 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; 1349 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default;
1348 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( 1350 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule(
1349 PrioritizedWorkToSchedule&& other) = default; 1351 PrioritizedWorkToSchedule&& other) = default;
1350 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; 1352 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default;
1351 1353
1352 } // namespace cc 1354 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile.h ('k') | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698