Index: cc/tiles/tile_manager.h |
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h |
index 90041452c868fb31f0f0247be66102dbb1fcb031..eb9ed2d87fce233e7bc10fafd312bd68a65d146b 100644 |
--- a/cc/tiles/tile_manager.h |
+++ b/cc/tiles/tile_manager.h |
@@ -21,12 +21,14 @@ |
#include "cc/raster/raster_buffer_provider.h" |
#include "cc/resources/memory_history.h" |
#include "cc/resources/resource_pool.h" |
+#include "cc/tiles/checker_image_tracker.h" |
#include "cc/tiles/decoded_image_tracker.h" |
#include "cc/tiles/eviction_tile_priority_queue.h" |
#include "cc/tiles/image_controller.h" |
#include "cc/tiles/raster_tile_priority_queue.h" |
#include "cc/tiles/tile.h" |
#include "cc/tiles/tile_draw_info.h" |
+#include "cc/tiles/tile_manager_settings.h" |
#include "cc/tiles/tile_task_manager.h" |
namespace base { |
@@ -79,6 +81,11 @@ class CC_EXPORT TileManagerClient { |
// Requests the color space into which tiles should be rasterized. |
virtual gfx::ColorSpace GetTileColorSpace() const = 0; |
+ // Requests that a pending tree be scheduled to invalidate content on the |
+ // pending on active tree. This is currently used when tiles that are |
+ // rasterized with missing images need to be invalidated. |
+ virtual void RequestImplSideInvalidation() = 0; |
+ |
protected: |
virtual ~TileManagerClient() {} |
}; |
@@ -96,15 +103,14 @@ RasterTaskCompletionStatsAsValue(const RasterTaskCompletionStats& stats); |
// should no longer have any memory assigned to them. Tile objects are "owned" |
// by layers; they automatically register with the manager when they are |
// created, and unregister from the manager when they are deleted. |
-class CC_EXPORT TileManager { |
+class CC_EXPORT TileManager : CheckerImageTrackerClient { |
public: |
TileManager(TileManagerClient* client, |
base::SequencedTaskRunner* origin_task_runner, |
scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner, |
size_t scheduled_raster_task_limit, |
- bool use_partial_raster, |
- bool check_tile_priority_inversion); |
- virtual ~TileManager(); |
+ const TileManagerSettings& tile_manager_settings); |
+ ~TileManager() override; |
// Assigns tile memory and schedules work to prepare tiles for drawing. |
// - Runs client_->NotifyReadyToActivate() when all tiles required for |
@@ -144,6 +150,9 @@ class CC_EXPORT TileManager { |
bool IsReadyToActivate() const; |
bool IsReadyToDraw() const; |
+ const std::unordered_set<ImageId>& TakeImagesToInvalidateOnSyncTree(); |
+ void DidActivateSyncTree(); |
+ |
std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
BasicStateAsValue() const; |
void BasicStateAsValueInto(base::trace_event::TracedValue* dict) const; |
@@ -217,6 +226,9 @@ class CC_EXPORT TileManager { |
void SetDecodedImageTracker(DecodedImageTracker* decoded_image_tracker); |
+ // CheckerImageTrackerClient implementation. |
+ void NeedsInvalidationForCheckerImagedTiles() override; |
+ |
protected: |
friend class Tile; |
// Must be called by tile during destruction. |
@@ -316,7 +328,8 @@ class CC_EXPORT TileManager { |
RasterBufferProvider* raster_buffer_provider_; |
GlobalStateThatImpactsTilePriority global_state_; |
size_t scheduled_raster_task_limit_; |
- const bool use_partial_raster_; |
+ |
+ const TileManagerSettings tile_manager_settings_; |
bool use_gpu_rasterization_; |
std::unordered_map<Tile::Id, Tile*> tiles_; |
@@ -328,6 +341,7 @@ class CC_EXPORT TileManager { |
bool did_oom_on_last_assign_; |
ImageController image_controller_; |
+ CheckerImageTracker checker_image_tracker_; |
RasterTaskCompletionStats flush_stats_; |
@@ -353,7 +367,6 @@ class CC_EXPORT TileManager { |
std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; |
std::vector<scoped_refptr<TileTask>> locked_image_tasks_; |
- const bool check_tile_priority_inversion_; |
// We need two WeakPtrFactory objects as the invalidation pattern of each is |
// different. The |task_set_finished_weak_ptr_factory_| is invalidated any |