| 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 output_surface.get(), settings_.highp_threshold_min); | 1382 output_surface.get(), settings_.highp_threshold_min); |
| 1383 if (!resource_provider) | 1383 if (!resource_provider) |
| 1384 return false; | 1384 return false; |
| 1385 | 1385 |
| 1386 if (settings_.impl_side_painting) { | 1386 if (settings_.impl_side_painting) { |
| 1387 tile_manager_.reset(new TileManager(this, | 1387 tile_manager_.reset(new TileManager(this, |
| 1388 resource_provider.get(), | 1388 resource_provider.get(), |
| 1389 settings_.num_raster_threads, | 1389 settings_.num_raster_threads, |
| 1390 settings_.use_color_estimator, | 1390 settings_.use_color_estimator, |
| 1391 settings_.prediction_benchmarking, | 1391 settings_.prediction_benchmarking, |
| 1392 rendering_stats_instrumentation_)); | 1392 rendering_stats_instrumentation_, |
| 1393 settings_.use_gpu_memory_buffers)); |
| 1393 UpdateTileManagerMemoryPolicy(managed_memory_policy_); | 1394 UpdateTileManagerMemoryPolicy(managed_memory_policy_); |
| 1394 } | 1395 } |
| 1395 | 1396 |
| 1396 if (output_surface->capabilities().has_parent_compositor) { | 1397 if (output_surface->capabilities().has_parent_compositor) { |
| 1397 renderer_ = DelegatingRenderer::Create(this, output_surface.get(), | 1398 renderer_ = DelegatingRenderer::Create(this, output_surface.get(), |
| 1398 resource_provider.get()); | 1399 resource_provider.get()); |
| 1399 } else if (output_surface->context3d()) { | 1400 } else if (output_surface->context3d()) { |
| 1400 renderer_ = GLRenderer::Create(this, | 1401 renderer_ = GLRenderer::Create(this, |
| 1401 output_surface.get(), | 1402 output_surface.get(), |
| 1402 resource_provider.get(), | 1403 resource_provider.get(), |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 } | 2164 } |
| 2164 | 2165 |
| 2165 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2166 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
| 2166 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2167 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
| 2167 paint_time_counter_->ClearHistory(); | 2168 paint_time_counter_->ClearHistory(); |
| 2168 | 2169 |
| 2169 debug_state_ = debug_state; | 2170 debug_state_ = debug_state; |
| 2170 } | 2171 } |
| 2171 | 2172 |
| 2172 } // namespace cc | 2173 } // namespace cc |
| OLD | NEW |