| Index: cc/tiles/tile.h
|
| diff --git a/cc/tiles/tile.h b/cc/tiles/tile.h
|
| index 16d37d1491d88a5f9b7938eada47ed21ea32d2d2..83414f54028b51081998a1e4f25e23ed44efe052 100644
|
| --- a/cc/tiles/tile.h
|
| +++ b/cc/tiles/tile.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "cc/paint/draw_image.h"
|
| #include "cc/raster/tile_task.h"
|
| #include "cc/tiles/tile_draw_info.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| @@ -113,6 +114,29 @@ class CC_EXPORT Tile {
|
| return is_solid_color_analysis_performed_;
|
| }
|
|
|
| + void SetImageAnalysisResult(
|
| + std::vector<DrawImage> images_to_decode_before_raster,
|
| + std::vector<sk_sp<const SkImage>> images_to_checker);
|
| + bool is_image_analysis_performed() const {
|
| + return is_image_analysis_performed_;
|
| + }
|
| + const std::vector<DrawImage>& images_to_decode_before_raster() const {
|
| + return images_to_decode_before_raster_;
|
| + }
|
| + const std::vector<sk_sp<const SkImage>>& images_to_checker() const {
|
| + return images_to_checker_;
|
| + }
|
| +
|
| + bool set_raster_task_scheduled_with_checker_images(bool has_checker_images) {
|
| + bool previous_raster_task_scheduled_with_checker_images =
|
| + raster_task_scheduled_with_checker_images_;
|
| + raster_task_scheduled_with_checker_images_ = has_checker_images;
|
| + return previous_raster_task_scheduled_with_checker_images;
|
| + }
|
| + bool raster_task_scheduled_with_checker_images() const {
|
| + return raster_task_scheduled_with_checker_images_;
|
| + }
|
| +
|
| const PictureLayerTiling* tiling() const { return tiling_; }
|
| void set_tiling(const PictureLayerTiling* tiling) { tiling_ = tiling; }
|
|
|
| @@ -134,6 +158,18 @@ class CC_EXPORT Tile {
|
| const gfx::Rect enclosing_layer_rect_;
|
| const float contents_scale_;
|
|
|
| + // Image analysis is used partitions the images in a tile into 2 sets:
|
| + // 1) The images for which the decode must be available *before* the
|
| + // rasterization of a tile can be started.
|
| + // 2) The images which are checkered, i.e., will be skipped when rasterizing
|
| + // this tile.
|
| + // Note that these sets are only valid for tiles that are considered for
|
| + // rasterization with images. For instance, for low resolution tiles, all
|
| + // images are skipped.
|
| + bool is_image_analysis_performed_ = false;
|
| + std::vector<DrawImage> images_to_decode_before_raster_;
|
| + std::vector<sk_sp<const SkImage>> images_to_checker_;
|
| +
|
| TileDrawInfo draw_info_;
|
|
|
| const int layer_id_;
|
| @@ -154,6 +190,10 @@ class CC_EXPORT Tile {
|
| Id invalidated_id_;
|
|
|
| unsigned scheduled_priority_;
|
| +
|
| + // Set to true if there is a raster task scheduled for this tile that will
|
| + // rasterize a resource with checker images.
|
| + bool raster_task_scheduled_with_checker_images_ = false;
|
| scoped_refptr<TileTask> raster_task_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Tile);
|
|
|