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 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1376 output_surface_.reset(); | 1376 output_surface_.reset(); |
1377 | 1377 |
1378 if (!output_surface->BindToClient(this)) | 1378 if (!output_surface->BindToClient(this)) |
1379 return false; | 1379 return false; |
1380 | 1380 |
1381 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( | 1381 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( |
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_.use_gpu_memory_buffers) | |
reveman
2013/05/17 01:48:08
Pass settings_.use_gpu_memory_buffers to the tile
kaanb
2013/05/17 21:27:36
Done.
| |
1387 resource_provider->SetUseGpuMemoryBuffers(true); | |
1388 | |
1386 if (settings_.impl_side_painting) { | 1389 if (settings_.impl_side_painting) { |
1387 tile_manager_.reset(new TileManager(this, | 1390 tile_manager_.reset(new TileManager(this, |
1388 resource_provider.get(), | 1391 resource_provider.get(), |
1389 settings_.num_raster_threads, | 1392 settings_.num_raster_threads, |
1390 settings_.use_color_estimator, | 1393 settings_.use_color_estimator, |
1391 settings_.prediction_benchmarking, | 1394 settings_.prediction_benchmarking, |
1392 rendering_stats_instrumentation_)); | 1395 rendering_stats_instrumentation_)); |
1393 UpdateTileManagerMemoryPolicy(managed_memory_policy_); | 1396 UpdateTileManagerMemoryPolicy(managed_memory_policy_); |
1394 } | 1397 } |
1395 | 1398 |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2163 } | 2166 } |
2164 | 2167 |
2165 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2168 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
2166 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2169 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
2167 paint_time_counter_->ClearHistory(); | 2170 paint_time_counter_->ClearHistory(); |
2168 | 2171 |
2169 debug_state_ = debug_state; | 2172 debug_state_ = debug_state; |
2170 } | 2173 } |
2171 | 2174 |
2172 } // namespace cc | 2175 } // namespace cc |
OLD | NEW |