| Index: cc/tiles/picture_layer_tiling.h
|
| diff --git a/cc/tiles/picture_layer_tiling.h b/cc/tiles/picture_layer_tiling.h
|
| index b718ca1882a0839b66c99f870912c8c6be51aa7f..116baf5eec9476714d28013b38a5b4f2b6dcbd76 100644
|
| --- a/cc/tiles/picture_layer_tiling.h
|
| +++ b/cc/tiles/picture_layer_tiling.h
|
| @@ -16,6 +16,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "cc/base/region.h"
|
| +#include "cc/base/scale_translate2d.h"
|
| #include "cc/base/tiling_data.h"
|
| #include "cc/cc_export.h"
|
| #include "cc/tiles/tile.h"
|
| @@ -81,7 +82,7 @@ class CC_EXPORT PictureLayerTiling {
|
| static const int kBorderTexels = 1;
|
|
|
| PictureLayerTiling(WhichTree tree,
|
| - float raster_scale,
|
| + const ScaleTranslate2d& raster_transform,
|
| scoped_refptr<RasterSource> raster_source,
|
| PictureLayerTilingClient* client,
|
| float min_preraster_distance,
|
| @@ -120,7 +121,8 @@ class CC_EXPORT PictureLayerTiling {
|
| gfx::Size tiling_size() const { return tiling_data_.tiling_size(); }
|
| gfx::Rect live_tiles_rect() const { return live_tiles_rect_; }
|
| gfx::Size tile_size() const { return tiling_data_.max_texture_size(); }
|
| - float contents_scale() const { return contents_scale_; }
|
| + float contents_scale_key() const { return raster_transform_.scale(); }
|
| + const ScaleTranslate2d& raster_transform() const { return raster_transform_; }
|
| const TilingData* tiling_data() const { return &tiling_data_; }
|
|
|
| Tile* TileAt(int i, int j) const {
|
| @@ -169,7 +171,7 @@ class CC_EXPORT PictureLayerTiling {
|
|
|
| void SetAllTilesOccludedForTesting() {
|
| gfx::Rect viewport_in_layer_space =
|
| - ScaleToEnclosingRect(current_visible_rect_, 1.f / contents_scale_);
|
| + EnclosingLayerRectFromContentsRect(current_visible_rect_);
|
| current_occlusion_in_layer_space_ =
|
| Occlusion(gfx::Transform(),
|
| SimpleEnclosedRegion(viewport_in_layer_space),
|
| @@ -220,7 +222,7 @@ class CC_EXPORT PictureLayerTiling {
|
| const PictureLayerTiling* tiling_ = nullptr;
|
| gfx::Size coverage_rect_max_bounds_;
|
| gfx::Rect coverage_rect_;
|
| - float coverage_to_content_scale_;
|
| + ScaleTranslate2d coverage_to_content_;
|
|
|
| Tile* current_tile_ = nullptr;
|
| gfx::Rect current_geometry_rect_;
|
| @@ -330,8 +332,13 @@ class CC_EXPORT PictureLayerTiling {
|
| }
|
| void RemoveTilesInRegion(const Region& layer_region, bool recreate_tiles);
|
|
|
| + gfx::Rect EnclosingContentsRectFromLayerRect(
|
| + const gfx::Rect& layer_rect) const;
|
| + gfx::Rect EnclosingLayerRectFromContentsRect(
|
| + const gfx::Rect& contents_rect) const;
|
| +
|
| // Given properties.
|
| - const float contents_scale_;
|
| + const ScaleTranslate2d raster_transform_;
|
| PictureLayerTilingClient* const client_;
|
| const WhichTree tree_;
|
| scoped_refptr<RasterSource> raster_source_;
|
| @@ -353,7 +360,7 @@ class CC_EXPORT PictureLayerTiling {
|
| gfx::Rect current_soon_border_rect_;
|
| gfx::Rect current_eventually_rect_;
|
| // Other properties used for tile iteration and prioritization.
|
| - float current_content_to_screen_scale_;
|
| + float current_content_to_screen_scale_ = 0.f;
|
| Occlusion current_occlusion_in_layer_space_;
|
| float max_skewport_extent_in_screen_space_ = 0.f;
|
|
|
|
|