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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 1134123005: cc: split UpdateGpuRasterizationStatus() into two parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes per review comments Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if (sync_tree->IsActiveTree()) 323 if (sync_tree->IsActiveTree())
324 sync_tree->elastic_overscroll()->PushPendingToActive(); 324 sync_tree->elastic_overscroll()->PushPendingToActive();
325 325
326 sync_tree->PassSwapPromises(&swap_promise_list_); 326 sync_tree->PassSwapPromises(&swap_promise_list_);
327 327
328 sync_tree->set_top_controls_shrink_blink_size( 328 sync_tree->set_top_controls_shrink_blink_size(
329 top_controls_shrink_blink_size_); 329 top_controls_shrink_blink_size_);
330 sync_tree->set_top_controls_height(top_controls_height_); 330 sync_tree->set_top_controls_height(top_controls_height_);
331 sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_); 331 sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_);
332 332
333 host_impl->set_has_gpu_rasterization_trigger(has_gpu_rasterization_trigger_); 333 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_);
334 host_impl->set_content_is_suitable_for_gpu_rasterization( 334 host_impl->SetContentIsSuitableForGpuRasterization(
335 content_is_suitable_for_gpu_rasterization_); 335 content_is_suitable_for_gpu_rasterization_);
336 RecordGpuRasterizationHistogram(); 336 RecordGpuRasterizationHistogram();
337 337
338 host_impl->SetViewportSize(device_viewport_size_); 338 host_impl->SetViewportSize(device_viewport_size_);
339 host_impl->SetDeviceScaleFactor(device_scale_factor_); 339 host_impl->SetDeviceScaleFactor(device_scale_factor_);
340 host_impl->SetDebugState(debug_state_); 340 host_impl->SetDebugState(debug_state_);
341 if (pending_page_scale_animation_) { 341 if (pending_page_scale_animation_) {
342 sync_tree->SetPendingPageScaleAnimation( 342 sync_tree->SetPendingPageScaleAnimation(
343 pending_page_scale_animation_.Pass()); 343 pending_page_scale_animation_.Pass());
344 } 344 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 client_->DidFailToInitializeOutputSurface(); 427 client_->DidFailToInitializeOutputSurface();
428 } 428 }
429 429
430 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl( 430 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
431 LayerTreeHostImplClient* client) { 431 LayerTreeHostImplClient* client) {
432 DCHECK(proxy_->IsImplThread()); 432 DCHECK(proxy_->IsImplThread());
433 scoped_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create( 433 scoped_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
434 settings_, client, proxy_.get(), rendering_stats_instrumentation_.get(), 434 settings_, client, proxy_.get(), rendering_stats_instrumentation_.get(),
435 shared_bitmap_manager_, gpu_memory_buffer_manager_, task_graph_runner_, 435 shared_bitmap_manager_, gpu_memory_buffer_manager_, task_graph_runner_,
436 id_); 436 id_);
437 host_impl->set_has_gpu_rasterization_trigger(has_gpu_rasterization_trigger_); 437 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_);
438 host_impl->set_content_is_suitable_for_gpu_rasterization( 438 host_impl->SetContentIsSuitableForGpuRasterization(
439 content_is_suitable_for_gpu_rasterization_); 439 content_is_suitable_for_gpu_rasterization_);
440 shared_bitmap_manager_ = NULL; 440 shared_bitmap_manager_ = NULL;
441 gpu_memory_buffer_manager_ = NULL; 441 gpu_memory_buffer_manager_ = NULL;
442 task_graph_runner_ = NULL; 442 task_graph_runner_ = NULL;
443 top_controls_manager_weak_ptr_ = 443 top_controls_manager_weak_ptr_ =
444 host_impl->top_controls_manager()->AsWeakPtr(); 444 host_impl->top_controls_manager()->AsWeakPtr();
445 input_handler_weak_ptr_ = host_impl->AsWeakPtr(); 445 input_handler_weak_ptr_ = host_impl->AsWeakPtr();
446 return host_impl.Pass(); 446 return host_impl.Pass();
447 } 447 }
448 448
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 const BeginFrameArgs& args) const { 1301 const BeginFrameArgs& args) const {
1302 client_->SendBeginFramesToChildren(args); 1302 client_->SendBeginFramesToChildren(args);
1303 } 1303 }
1304 1304
1305 void LayerTreeHost::SetAuthoritativeVSyncInterval( 1305 void LayerTreeHost::SetAuthoritativeVSyncInterval(
1306 const base::TimeDelta& interval) { 1306 const base::TimeDelta& interval) {
1307 proxy_->SetAuthoritativeVSyncInterval(interval); 1307 proxy_->SetAuthoritativeVSyncInterval(interval);
1308 } 1308 }
1309 1309
1310 } // namespace cc 1310 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698