Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index 5e89bbeda7ebed65b7fb2dde7c04b8d84c2f968a..dd9e85c7f8f473f3bf83c55f9f6df00a02d1e78e 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1117,10 +1117,8 @@ DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) { |
"SourceFrameNumber", |
active_tree_->source_frame_number()); |
- if (need_to_update_visible_tiles_before_draw_ && |
- tile_manager_ && tile_manager_->UpdateVisibleTiles()) { |
- DidInitializeVisibleTile(); |
- } |
+ if (need_to_update_visible_tiles_before_draw_ && tile_manager_) |
+ tile_manager_->UpdateVisibleTiles(); |
need_to_update_visible_tiles_before_draw_ = true; |
UMA_HISTOGRAM_CUSTOM_COUNTS( |
@@ -1269,8 +1267,8 @@ void LayerTreeHostImpl::DidModifyTilePriorities() { |
} |
void LayerTreeHostImpl::DidInitializeVisibleTile() { |
- if (client_ && !client_->IsInsideDraw()) |
- client_->DidInitializeVisibleTileOnImplThread(); |
+ DCHECK(!client_->IsInsideDraw()); |
+ client_->DidInitializeVisibleTileOnImplThread(); |
} |
void LayerTreeHostImpl::GetPictureLayerImplPairs( |
@@ -1330,7 +1328,8 @@ void LayerTreeHostImpl::NotifyReadyToActivate() { |
client_->NotifyReadyToActivate(); |
} |
-void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { |
+void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile, |
+ bool visible_tile) { |
TRACE_EVENT0("cc", "LayerTreeHostImpl::NotifyTileStateChanged"); |
if (active_tree_) { |
@@ -1346,6 +1345,9 @@ void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { |
if (layer_impl) |
layer_impl->NotifyTileStateChanged(tile); |
} |
+ |
+ if (visible_tile && !client_->IsInsideDraw()) |
enne (OOO)
2014/10/28 18:09:22
I don't think we want to redraw if a tile gets rem
danakj
2014/10/28 18:24:48
Ya.. though that's like flaky at best if you scrol
enne (OOO)
2014/10/28 18:47:33
No, it's true that it's flaky at best. But, it se
danakj
2014/10/31 20:02:01
Actually, I don't think I agree. If we're evicting
|
+ SetNeedsRedraw(); |
} |
void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { |
@@ -2991,6 +2993,12 @@ void LayerTreeHostImpl::PinchGestureEnd() { |
if (top_controls_manager_) |
top_controls_manager_->PinchEnd(); |
client_->SetNeedsCommitOnImplThread(); |
+ // When a pinch ends, we may be displaying content cached at incorrect scales, |
+ // so updating draw properties and drawing will ensure we are using the right |
+ // scales that we want when we're not inside a pinch. |
+ LOG(ERROR) << "END PINCH"; |
+ active_tree_->set_needs_update_draw_properties(); |
+ SetNeedsRedraw(); |
enne (OOO)
2014/10/28 18:09:21
Do you need the set needs redraw as well? Is this
enne (OOO)
2014/10/28 18:09:21
Do you need the set needs redraw as well? Is this
danakj
2014/10/28 18:24:48
We need this in order to trigger an UpdateDrawProp
enne (OOO)
2014/10/28 18:47:33
As I said elsewhere, the redraw part of that seems
danakj
2014/10/31 20:02:01
I think we agreed this is not racey. The Draw will
|
} |
static void CollectScrollDeltas(ScrollAndScaleSet* scroll_info, |