| OLD | NEW |
| 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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 CreateAndSetRenderer(output_surface.get(), resource_provider.get()); | 1520 CreateAndSetRenderer(output_surface.get(), resource_provider.get()); |
| 1521 | 1521 |
| 1522 if (!renderer_) | 1522 if (!renderer_) |
| 1523 return false; | 1523 return false; |
| 1524 | 1524 |
| 1525 if (settings_.impl_side_painting) { | 1525 if (settings_.impl_side_painting) { |
| 1526 bool using_map_image = GetRendererCapabilities().using_map_image; | 1526 bool using_map_image = GetRendererCapabilities().using_map_image; |
| 1527 tile_manager_ = TileManager::Create(this, | 1527 tile_manager_ = TileManager::Create(this, |
| 1528 resource_provider.get(), | 1528 resource_provider.get(), |
| 1529 settings_.num_raster_threads, | 1529 settings_.num_raster_threads, |
| 1530 settings_.use_color_estimator, | |
| 1531 rendering_stats_instrumentation_, | 1530 rendering_stats_instrumentation_, |
| 1532 using_map_image); | 1531 using_map_image); |
| 1533 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 1532 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
| 1534 } | 1533 } |
| 1535 | 1534 |
| 1536 // Setup BeginFrameEmulation if it's not supported natively | 1535 // Setup BeginFrameEmulation if it's not supported natively |
| 1537 if (!settings_.begin_frame_scheduling_enabled) { | 1536 if (!settings_.begin_frame_scheduling_enabled) { |
| 1538 const base::TimeDelta display_refresh_interval = | 1537 const base::TimeDelta display_refresh_interval = |
| 1539 base::TimeDelta::FromMicroseconds( | 1538 base::TimeDelta::FromMicroseconds( |
| 1540 base::Time::kMicrosecondsPerSecond / | 1539 base::Time::kMicrosecondsPerSecond / |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2339 } | 2338 } |
| 2340 | 2339 |
| 2341 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2340 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
| 2342 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2341 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
| 2343 paint_time_counter_->ClearHistory(); | 2342 paint_time_counter_->ClearHistory(); |
| 2344 | 2343 |
| 2345 debug_state_ = debug_state; | 2344 debug_state_ = debug_state; |
| 2346 } | 2345 } |
| 2347 | 2346 |
| 2348 } // namespace cc | 2347 } // namespace cc |
| OLD | NEW |