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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 13817003: Damage root layer when viewport or top controls changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayerTreeHostDelegatedTestLayerUsesFrameDamage Created 7 years, 8 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/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7152fcbb5f7bb94c98e6a163deeb4eef3d01d7d2..4eeaf464dab2f94611049a2d0713ce41bccfaa25 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1160,7 +1160,7 @@ void LayerTreeHostImpl::Readback(void* pixels,
renderer_->GetFramebufferPixels(pixels, rect_in_device_viewport);
}
-bool LayerTreeHostImpl::haveRootScrollLayer() const {
+bool LayerTreeHostImpl::HaveRootScrollLayer() const {
return !!RootScrollLayer();
}
@@ -1383,6 +1383,7 @@ void LayerTreeHostImpl::SetViewportSize(gfx::Size layout_viewport_size,
renderer_->ViewportChanged();
client_->OnCanDrawStateChanged(CanDraw());
+ SetFullRootLayerDamage();
}
static void AdjustScrollsForPageScaleChange(LayerImpl* layer_impl,
@@ -1408,6 +1409,7 @@ void LayerTreeHostImpl::SetOverdrawBottomHeight(float overdraw_bottom_height) {
overdraw_bottom_height_ = overdraw_bottom_height;
UpdateMaxScrollOffset();
+ SetFullRootLayerDamage();
}
void LayerTreeHostImpl::SetDeviceScaleFactor(float device_scale_factor) {
@@ -1416,18 +1418,17 @@ void LayerTreeHostImpl::SetDeviceScaleFactor(float device_scale_factor) {
device_scale_factor_ = device_scale_factor;
UpdateMaxScrollOffset();
+ SetFullRootLayerDamage();
}
void LayerTreeHostImpl::UpdateMaxScrollOffset() {
active_tree_->UpdateMaxScrollOffset();
}
-void LayerTreeHostImpl::setActiveTreeNeedsUpdateDrawProperties() {
- active_tree_->set_needs_update_draw_properties();
-}
-
-void LayerTreeHostImpl::setNeedsRedraw() {
+void LayerTreeHostImpl::DidChangeTopControlsPosition() {
client_->SetNeedsRedrawOnImplThread();
+ active_tree_->set_needs_update_draw_properties();
+ SetFullRootLayerDamage();
}
bool LayerTreeHostImpl::EnsureRenderSurfaceLayerList() {
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698