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

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

Issue 290573007: cc: Move gpu rasterization flag from tree-impl to tree-host-impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 page_scale_delta = sync_tree->page_scale_delta(); 340 page_scale_delta = sync_tree->page_scale_delta();
341 sent_page_scale_delta = sync_tree->sent_page_scale_delta(); 341 sent_page_scale_delta = sync_tree->sent_page_scale_delta();
342 sync_tree->set_sent_page_scale_delta(1.f); 342 sync_tree->set_sent_page_scale_delta(1.f);
343 } 343 }
344 344
345 sync_tree->SetPageScaleFactorAndLimits(page_scale_factor_, 345 sync_tree->SetPageScaleFactorAndLimits(page_scale_factor_,
346 min_page_scale_factor_, 346 min_page_scale_factor_,
347 max_page_scale_factor_); 347 max_page_scale_factor_);
348 sync_tree->SetPageScaleDelta(page_scale_delta / sent_page_scale_delta); 348 sync_tree->SetPageScaleDelta(page_scale_delta / sent_page_scale_delta);
349 349
350 sync_tree->SetUseGpuRasterization(UseGpuRasterization());
351
352 sync_tree->PassSwapPromises(&swap_promise_list_); 350 sync_tree->PassSwapPromises(&swap_promise_list_);
353 351
352 host_impl->SetUseGpuRasterization(UseGpuRasterization());
354 host_impl->SetViewportSize(device_viewport_size_); 353 host_impl->SetViewportSize(device_viewport_size_);
355 host_impl->SetOverdrawBottomHeight(overdraw_bottom_height_); 354 host_impl->SetOverdrawBottomHeight(overdraw_bottom_height_);
356 host_impl->SetDeviceScaleFactor(device_scale_factor_); 355 host_impl->SetDeviceScaleFactor(device_scale_factor_);
357 host_impl->SetDebugState(debug_state_); 356 host_impl->SetDebugState(debug_state_);
358 if (pending_page_scale_animation_) { 357 if (pending_page_scale_animation_) {
359 host_impl->StartPageScaleAnimation( 358 host_impl->StartPageScaleAnimation(
360 pending_page_scale_animation_->target_offset, 359 pending_page_scale_animation_->target_offset,
361 pending_page_scale_animation_->use_anchor, 360 pending_page_scale_animation_->use_anchor,
362 pending_page_scale_animation_->scale, 361 pending_page_scale_animation_->scale,
363 pending_page_scale_animation_->duration); 362 pending_page_scale_animation_->duration);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl( 425 scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
427 LayerTreeHostImplClient* client) { 426 LayerTreeHostImplClient* client) {
428 DCHECK(proxy_->IsImplThread()); 427 DCHECK(proxy_->IsImplThread());
429 scoped_ptr<LayerTreeHostImpl> host_impl = 428 scoped_ptr<LayerTreeHostImpl> host_impl =
430 LayerTreeHostImpl::Create(settings_, 429 LayerTreeHostImpl::Create(settings_,
431 client, 430 client,
432 proxy_.get(), 431 proxy_.get(),
433 rendering_stats_instrumentation_.get(), 432 rendering_stats_instrumentation_.get(),
434 shared_bitmap_manager_, 433 shared_bitmap_manager_,
435 id_); 434 id_);
435 host_impl->SetUseGpuRasterization(UseGpuRasterization());
436 shared_bitmap_manager_ = NULL; 436 shared_bitmap_manager_ = NULL;
437 if (settings_.calculate_top_controls_position && 437 if (settings_.calculate_top_controls_position &&
438 host_impl->top_controls_manager()) { 438 host_impl->top_controls_manager()) {
439 top_controls_manager_weak_ptr_ = 439 top_controls_manager_weak_ptr_ =
440 host_impl->top_controls_manager()->AsWeakPtr(); 440 host_impl->top_controls_manager()->AsWeakPtr();
441 } 441 }
442 input_handler_weak_ptr_ = host_impl->AsWeakPtr(); 442 input_handler_weak_ptr_ = host_impl->AsWeakPtr();
443 return host_impl.Pass(); 443 return host_impl.Pass();
444 } 444 }
445 445
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 swap_promise_list_.push_back(swap_promise.Pass()); 1250 swap_promise_list_.push_back(swap_promise.Pass());
1251 } 1251 }
1252 1252
1253 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1253 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1254 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1254 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1255 swap_promise_list_[i]->DidNotSwap(reason); 1255 swap_promise_list_[i]->DidNotSwap(reason);
1256 swap_promise_list_.clear(); 1256 swap_promise_list_.clear();
1257 } 1257 }
1258 1258
1259 } // namespace cc 1259 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698