Index: cc/tiles/tile_manager.h |
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h |
index f1a933e1f6344e01b24ae45cc07a2f6c5e1c2a3a..4d79fc4c0c8ded9ca726b2de555339a23378a4c7 100644 |
--- a/cc/tiles/tile_manager.h |
+++ b/cc/tiles/tile_manager.h |
@@ -21,6 +21,7 @@ |
#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" |
@@ -79,6 +80,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 +102,16 @@ 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(); |
+ bool check_tile_priority_inversion, |
+ bool enable_checker_imaging); |
+ ~TileManager() override; |
// Assigns tile memory and schedules work to prepare tiles for drawing. |
// - Runs client_->NotifyReadyToActivate() when all tiles required for |
@@ -140,6 +147,9 @@ class CC_EXPORT TileManager { |
bool IsReadyToActivate() const; |
bool IsReadyToDraw() const; |
+ void AddImplSideInvalidations(LayerTreeImpl* sync_tree); |
+ void DidActivateSyncTree(); |
+ |
std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
BasicStateAsValue() const; |
void BasicStateAsValueInto(base::trace_event::TracedValue* dict) const; |
@@ -212,6 +222,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. |
@@ -321,6 +334,7 @@ class CC_EXPORT TileManager { |
bool did_oom_on_last_assign_; |
ImageController image_controller_; |
+ CheckerImageTracker checker_image_tracker_; |
RasterTaskCompletionStats flush_stats_; |