| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index 03ff4553cfd82e4f9cea5791b38851d9e7386687..39d1a65f60d65b05b19a6f9bf7be9ea0bbed3a6f 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -648,12 +648,8 @@ bool PictureLayerImpl::RasterSourceUsesLCDText() const {
|
| }
|
|
|
| void PictureLayerImpl::NotifyTileStateChanged(const Tile* tile) {
|
| - if (layer_tree_impl()->IsActiveTree()) {
|
| - gfx::Rect layer_damage_rect = gfx::ScaleToEnclosingRect(
|
| - tile->content_rect(), 1.f / tile->raster_scales().width(),
|
| - 1.f / tile->raster_scales().height());
|
| - AddDamageRect(layer_damage_rect);
|
| - }
|
| + if (layer_tree_impl()->IsActiveTree())
|
| + AddDamageRect(tile->enclosing_layer_rect());
|
| if (tile->draw_info().NeedsRaster()) {
|
| PictureLayerTiling* tiling =
|
| tilings_->FindTilingWithScaleKey(tile->contents_scale_key());
|
| @@ -732,8 +728,10 @@ const PictureLayerTiling* PictureLayerImpl::GetPendingOrActiveTwinTiling(
|
| PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer();
|
| if (!twin_layer)
|
| return nullptr;
|
| - return twin_layer->tilings_->FindTilingWithScaleKey(
|
| - tiling->contents_scale_key());
|
| + const PictureLayerTiling* twin_tiling = twin_layer->tilings_->FindTilingWithScaleKey(tiling->contents_scale_key());
|
| + DCHECK(tiling->raster_transform().translation() == gfx::Vector2dF());
|
| + DCHECK(!twin_tiling || twin_tiling->raster_transform().translation() == gfx::Vector2dF());
|
| + return twin_tiling;
|
| }
|
|
|
| bool PictureLayerImpl::RequiresHighResToDraw() const {
|
| @@ -894,7 +892,7 @@ PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) {
|
| DCHECK_GE(contents_scale, MinimumContentsScale());
|
| DCHECK_LE(contents_scale, MaximumContentsScale());
|
| DCHECK(raster_source_->HasRecordings());
|
| - return tilings_->AddTiling(contents_scale, raster_source_);
|
| + return tilings_->AddTiling(ScaleTranslate2d(contents_scale, gfx::Vector2dF()), raster_source_);
|
| }
|
|
|
| void PictureLayerImpl::RemoveAllTilings() {
|
|
|