| 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.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 namespace { | 44 namespace { |
| 45 static base::StaticAtomicSequenceNumber s_layer_tree_host_sequence_number; | 45 static base::StaticAtomicSequenceNumber s_layer_tree_host_sequence_number; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace cc { | 48 namespace cc { |
| 49 | 49 |
| 50 RendererCapabilities::RendererCapabilities(ResourceFormat best_texture_format, | 50 RendererCapabilities::RendererCapabilities(ResourceFormat best_texture_format, |
| 51 bool allow_partial_texture_updates, | 51 bool allow_partial_texture_updates, |
| 52 bool using_offscreen_context3d, | 52 bool using_offscreen_context3d, |
| 53 int max_texture_size, | 53 int max_texture_size, |
| 54 bool using_shared_memory_resources) | 54 bool using_shared_memory_resources, |
| 55 bool allow_rasterize_on_demand) |
| 55 : best_texture_format(best_texture_format), | 56 : best_texture_format(best_texture_format), |
| 56 allow_partial_texture_updates(allow_partial_texture_updates), | 57 allow_partial_texture_updates(allow_partial_texture_updates), |
| 57 using_offscreen_context3d(using_offscreen_context3d), | 58 using_offscreen_context3d(using_offscreen_context3d), |
| 58 max_texture_size(max_texture_size), | 59 max_texture_size(max_texture_size), |
| 59 using_shared_memory_resources(using_shared_memory_resources) {} | 60 using_shared_memory_resources(using_shared_memory_resources), |
| 61 allow_rasterize_on_demand(allow_rasterize_on_demand) {} |
| 60 | 62 |
| 61 RendererCapabilities::RendererCapabilities() | 63 RendererCapabilities::RendererCapabilities() |
| 62 : best_texture_format(RGBA_8888), | 64 : best_texture_format(RGBA_8888), |
| 63 allow_partial_texture_updates(false), | 65 allow_partial_texture_updates(false), |
| 64 using_offscreen_context3d(false), | 66 using_offscreen_context3d(false), |
| 65 max_texture_size(0), | 67 max_texture_size(0), |
| 66 using_shared_memory_resources(false) {} | 68 using_shared_memory_resources(false), |
| 69 allow_rasterize_on_demand(false) {} |
| 67 | 70 |
| 68 RendererCapabilities::~RendererCapabilities() {} | 71 RendererCapabilities::~RendererCapabilities() {} |
| 69 | 72 |
| 70 scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded( | 73 scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded( |
| 71 LayerTreeHostClient* client, | 74 LayerTreeHostClient* client, |
| 72 SharedBitmapManager* manager, | 75 SharedBitmapManager* manager, |
| 73 const LayerTreeSettings& settings, | 76 const LayerTreeSettings& settings, |
| 74 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) { | 77 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) { |
| 75 DCHECK(impl_task_runner); | 78 DCHECK(impl_task_runner); |
| 76 scoped_ptr<LayerTreeHost> layer_tree_host( | 79 scoped_ptr<LayerTreeHost> layer_tree_host( |
| (...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 swap_promise_list_.push_back(swap_promise.Pass()); | 1323 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1321 } | 1324 } |
| 1322 | 1325 |
| 1323 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1326 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1324 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1327 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1325 swap_promise_list_[i]->DidNotSwap(reason); | 1328 swap_promise_list_[i]->DidNotSwap(reason); |
| 1326 swap_promise_list_.clear(); | 1329 swap_promise_list_.clear(); |
| 1327 } | 1330 } |
| 1328 | 1331 |
| 1329 } // namespace cc | 1332 } // namespace cc |
| OLD | NEW |