Chromium Code Reviews| Index: cc/trees/layer_tree_host.cc |
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
| index 4808117756acd65a3d578450b7f1cbb4f91f3a98..c7b90856f854b8417589ebed661f9e58915b2a65 100644 |
| --- a/cc/trees/layer_tree_host.cc |
| +++ b/cc/trees/layer_tree_host.cc |
| @@ -127,7 +127,9 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client, |
| id_(s_layer_tree_host_sequence_number.GetNext() + 1), |
| next_commit_forces_redraw_(false), |
| shared_bitmap_manager_(shared_bitmap_manager), |
| - gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { |
| + gpu_memory_buffer_manager_(gpu_memory_buffer_manager), |
| + surface_id_namespace_(0), |
| + next_surface_sequence_(1) { |
|
jamesr
2014/10/29 00:51:10
these two are uints, so 0u / 1u
|
| if (settings_.accelerated_animation_enabled) |
| animation_registrar_ = AnimationRegistrar::Create(); |
| rendering_stats_instrumentation_->set_record_rendering_stats( |
| @@ -166,15 +168,15 @@ void LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) { |
| LayerTreeHost::~LayerTreeHost() { |
| TRACE_EVENT0("cc", "LayerTreeHost::~LayerTreeHost"); |
| - DCHECK(swap_promise_monitor_.empty()); |
| - |
| - BreakSwapPromises(SwapPromise::COMMIT_FAILS); |
| - |
| overhang_ui_resource_ = nullptr; |
| if (root_layer_.get()) |
| root_layer_->SetLayerTreeHost(NULL); |
| + DCHECK(swap_promise_monitor_.empty()); |
| + |
| + BreakSwapPromises(SwapPromise::COMMIT_FAILS); |
| + |
| if (proxy_) { |
| DCHECK(proxy_->IsMainThread()); |
| proxy_->Stop(); |
| @@ -1338,4 +1340,12 @@ void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| swap_promise_list_.clear(); |
| } |
| +void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { |
| + surface_id_namespace_ = id_namespace; |
| +} |
| + |
| +SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { |
| + return SurfaceSequence(surface_id_namespace_, ++next_surface_sequence_); |
| +} |
| + |
| } // namespace cc |