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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.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 5e89bbeda7ebed65b7fb2dde7c04b8d84c2f968a..be9fd58282b19b90a93fd6e3d261c7a5bdafc131 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -249,7 +249,7 @@ scoped_ptr<LayerTreeHostImpl> LayerTreeHostImpl::Create(
Proxy* proxy,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
SharedBitmapManager* shared_bitmap_manager,
- GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
int id) {
return make_scoped_ptr(new LayerTreeHostImpl(settings,
client,
@@ -266,7 +266,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(
Proxy* proxy,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
SharedBitmapManager* shared_bitmap_manager,
- GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
int id)
: BeginFrameSourceMixIn(),
client_(client),
@@ -1183,12 +1183,6 @@ void LayerTreeHostImpl::ResetTreesForTesting() {
recycle_tree_ = nullptr;
}
-void LayerTreeHostImpl::ResetRecycleTreeForTesting() {
- if (recycle_tree_)
- recycle_tree_->DetachLayerTree();
- recycle_tree_ = nullptr;
-}
-
void LayerTreeHostImpl::EnforceManagedMemoryPolicy(
const ManagedMemoryPolicy& policy) {
@@ -1286,7 +1280,7 @@ void LayerTreeHostImpl::GetPictureLayerImplPairs(
if (!layer->HasValidTilePriorities())
continue;
- PictureLayerImpl* twin_layer = layer->GetTwinLayer();
+ PictureLayerImpl* twin_layer = layer->GetPendingOrActiveTwinLayer();
// Ignore the twin layer when tile priorities are invalid.
// TODO(vmpstr): Iterators should handle this instead. crbug.com/381704
@@ -2991,6 +2985,14 @@ 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.
+ active_tree_->set_needs_update_draw_properties();
+ SetNeedsRedraw();
+ // TODO(danakj): Don't set root damage. Just updating draw properties and
+ // getting new tiles rastered should be enough! crbug.com/427423
+ SetFullRootLayerDamage();
}
static void CollectScrollDeltas(ScrollAndScaleSet* scroll_info,
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698