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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index abc63fc932eebfd8297d1bd0e020e9c3040b72a1..d893b33c3374787a4dd4c8ff18e61bf0dce27e8c 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -211,10 +211,6 @@ void LayerTreeHost::SetLayerTreeHostClientReady() {
proxy_->SetLayerTreeHostClientReady();
}
-static void LayerTreeHostOnOutputSurfaceCreatedCallback(Layer* layer) {
- layer->OnOutputSurfaceCreated();
-}
-
void LayerTreeHost::DeleteContentsTexturesOnImplThread(
ResourceProvider* resource_provider) {
DCHECK(proxy_->IsImplThread());
@@ -427,7 +423,7 @@ void LayerTreeHost::DidInitializeOutputSurface() {
if (root_layer()) {
LayerTreeHostCommon::CallFunctionForSubtree(
- root_layer(), base::Bind(&LayerTreeHostOnOutputSurfaceCreatedCallback));
+ root_layer(), [](Layer* layer) { layer->OnOutputSurfaceCreated(); });
}
client_->DidInitializeOutputSurface();
@@ -452,11 +448,8 @@ scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
host_impl->SetUseGpuRasterization(UseGpuRasterization());
shared_bitmap_manager_ = NULL;
gpu_memory_buffer_manager_ = NULL;
- if (settings_.calculate_top_controls_position &&
- host_impl->top_controls_manager()) {
- top_controls_manager_weak_ptr_ =
- host_impl->top_controls_manager()->AsWeakPtr();
- }
+ top_controls_manager_weak_ptr_ =
+ host_impl->top_controls_manager()->AsWeakPtr();
input_handler_weak_ptr_ = host_impl->AsWeakPtr();
return host_impl.Pass();
}
@@ -873,17 +866,12 @@ void LayerTreeHost::TriggerPrepaint() {
SetNeedsCommit();
}
-static void LayerTreeHostReduceMemoryCallback(Layer* layer) {
- layer->ReduceMemoryUsage();
-}
-
void LayerTreeHost::ReduceMemoryUsage() {
if (!root_layer())
return;
LayerTreeHostCommon::CallFunctionForSubtree(
- root_layer(),
- base::Bind(&LayerTreeHostReduceMemoryCallback));
+ root_layer(), [](Layer* layer) { layer->ReduceMemoryUsage(); });
}
void LayerTreeHost::SetPrioritiesForSurfaces(size_t surface_memory_bytes) {
@@ -1167,9 +1155,6 @@ void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) {
void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints,
TopControlsState current,
bool animate) {
- if (!settings_.calculate_top_controls_position)
- return;
-
// Top controls are only used in threaded mode.
proxy_->ImplThreadTaskRunner()->PostTask(
FROM_HERE,
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698