Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 676953003: cc: Always keep the PictureLayerImpl::twin_layer_ pointer valid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: twins: anothercheck Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 1d8553902c054fe96520f57a3bc0c6361419a552..771826febfb2c441c26ca5ddcc2fb4d403f09b67 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -149,7 +149,8 @@ Tile* PictureLayerTiling::CreateTile(int i,
}
void PictureLayerTiling::CreateMissingTilesInLiveTilesRect() {
- const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
+ const PictureLayerTiling* twin_tiling =
+ client_->GetPendingOrActiveTwinTiling(this);
bool include_borders = false;
for (TilingData::Iterator iter(
&tiling_data_, live_tiles_rect_, include_borders);
@@ -226,7 +227,8 @@ void PictureLayerTiling::UpdateTilesToCurrentPile(
// If the layer grew, the live_tiles_rect_ is not changed, but a new row
// and/or column of tiles may now exist inside the same live_tiles_rect_.
- const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
+ const PictureLayerTiling* twin_tiling =
+ client_->GetPendingOrActiveTwinTiling(this);
if (after_right > before_right) {
DCHECK_EQ(after_right, before_right + 1);
for (int j = before_top; j <= after_bottom; ++j)
@@ -630,7 +632,8 @@ void PictureLayerTiling::SetLiveTilesRect(
RemoveTileAt(iter.index_x(), iter.index_y(), recycled_twin);
}
- const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
+ const PictureLayerTiling* twin_tiling =
+ client_->GetPendingOrActiveTwinTiling(this);
// Iterate to allocate new tiles for all regions with newly exposed area.
for (TilingData::DifferenceIterator iter(&tiling_data_,
@@ -718,7 +721,8 @@ bool PictureLayerTiling::IsTileRequiredForActivation(const Tile* tile) const {
if (client_->RequiresHighResToDraw())
return true;
- const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
+ const PictureLayerTiling* twin_tiling =
+ client_->GetPendingOrActiveTwinTiling(this);
if (!twin_tiling)
return true;
@@ -741,7 +745,8 @@ bool PictureLayerTiling::IsTileRequiredForActivation(const Tile* tile) const {
void PictureLayerTiling::UpdateTileAndTwinPriority(Tile* tile) const {
UpdateTilePriority(tile);
- const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
+ const PictureLayerTiling* twin_tiling =
+ client_->GetPendingOrActiveTwinTiling(this);
if (!tile->is_shared() || !twin_tiling) {
WhichTree tree = client_->GetTree();
WhichTree twin_tree = tree == ACTIVE_TREE ? PENDING_TREE : ACTIVE_TREE;
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698