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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 23171014: Fix UpdateTilePriorities viewport in Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 221292 Created 7 years, 3 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_impl.h ('k') | content/browser/android/in_process/synchronous_compositor_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 52a539b94f461e920800d4421991b37e3283012a..0d4fbf9fd0806d37a567c2559c45470da83ad913 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -207,7 +207,7 @@ void LayerTreeImpl::SetPageScaleDelta(float delta) {
}
gfx::SizeF LayerTreeImpl::ScrollableViewportSize() const {
- return gfx::ScaleSize(layer_tree_host_impl_->VisibleViewportSize(),
+ return gfx::ScaleSize(layer_tree_host_impl_->UnscaledScrollableViewportSize(),
1.0f / total_page_scale_factor());
}
@@ -272,8 +272,9 @@ void LayerTreeImpl::UpdateSolidColorScrollbars() {
ScrollableViewportSize());
float vertical_adjust = 0.0f;
if (RootContainerLayer())
- vertical_adjust = layer_tree_host_impl_->VisibleViewportSize().height() -
- RootContainerLayer()->bounds().height();
+ vertical_adjust =
+ layer_tree_host_impl_->UnscaledScrollableViewportSize().height() -
+ RootContainerLayer()->bounds().height();
if (ScrollbarLayerImplBase* horiz =
root_scroll->horizontal_scrollbar_layer()) {
horiz->SetVerticalAdjust(vertical_adjust);
@@ -317,8 +318,8 @@ void LayerTreeImpl::UpdateDrawProperties() {
source_frame_number_);
LayerTreeHostCommon::CalcDrawPropsImplInputs inputs(
root_layer(),
- layer_tree_host_impl_->DeviceViewport().size(),
- layer_tree_host_impl_->DeviceTransform(),
+ DrawViewportSize(),
+ layer_tree_host_impl_->DrawTransform(),
device_scale_factor(),
total_page_scale_factor(),
root_scroll_layer_ ? root_scroll_layer_->parent() : NULL,
@@ -454,6 +455,10 @@ MemoryHistory* LayerTreeImpl::memory_history() const {
return layer_tree_host_impl_->memory_history();
}
+bool LayerTreeImpl::device_viewport_valid_for_tile_management() const {
+ return layer_tree_host_impl_->device_viewport_valid_for_tile_management();
+}
+
bool LayerTreeImpl::IsActiveTree() const {
return layer_tree_host_impl_->active_tree() == this;
}
@@ -504,6 +509,10 @@ void LayerTreeImpl::SetNeedsCommit() {
layer_tree_host_impl_->SetNeedsCommit();
}
+gfx::Size LayerTreeImpl::DrawViewportSize() const {
+ return layer_tree_host_impl_->DrawViewportSize();
+}
+
void LayerTreeImpl::SetNeedsRedraw() {
layer_tree_host_impl_->SetNeedsRedraw();
}
@@ -516,10 +525,6 @@ float LayerTreeImpl::device_scale_factor() const {
return layer_tree_host_impl_->device_scale_factor();
}
-gfx::Size LayerTreeImpl::device_viewport_size() const {
- return layer_tree_host_impl_->device_viewport_size();
-}
-
DebugRectHistory* LayerTreeImpl::debug_rect_history() const {
return layer_tree_host_impl_->debug_rect_history();
}
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/browser/android/in_process/synchronous_compositor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698