Chromium Code Reviews| 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 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2024 client_->CommitVSyncParameters(timebase, interval); | 2024 client_->CommitVSyncParameters(timebase, interval); |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 void LayerTreeHostImpl::DeferredInitialize() { | 2027 void LayerTreeHostImpl::DeferredInitialize() { |
| 2028 DCHECK(output_surface_->capabilities().deferred_gl_initialization); | 2028 DCHECK(output_surface_->capabilities().deferred_gl_initialization); |
| 2029 DCHECK(settings_.impl_side_painting); | 2029 DCHECK(settings_.impl_side_painting); |
| 2030 DCHECK(output_surface_->context_provider()); | 2030 DCHECK(output_surface_->context_provider()); |
| 2031 | 2031 |
| 2032 ReleaseTreeResources(); | 2032 ReleaseTreeResources(); |
| 2033 renderer_.reset(); | 2033 renderer_.reset(); |
| 2034 DestroyTileManager(); | |
| 2034 | 2035 |
| 2035 resource_provider_->InitializeGL(); | 2036 resource_provider_->InitializeGL(); |
| 2036 | 2037 |
|
danakj
2014/06/11 18:49:17
This method now looks exactly the same as ReleaseG
boliu
2014/06/11 20:00:03
Made whitespace changes so they match
| |
| 2037 CreateAndSetRenderer(); | 2038 CreateAndSetRenderer(); |
| 2038 | 2039 |
| 2039 EnforceZeroBudget(false); | 2040 EnforceZeroBudget(false); |
| 2041 CreateAndSetTileManager(); | |
| 2042 | |
| 2040 client_->SetNeedsCommitOnImplThread(); | 2043 client_->SetNeedsCommitOnImplThread(); |
| 2041 } | 2044 } |
| 2042 | 2045 |
| 2043 void LayerTreeHostImpl::ReleaseGL() { | 2046 void LayerTreeHostImpl::ReleaseGL() { |
| 2044 DCHECK(output_surface_->capabilities().deferred_gl_initialization); | 2047 DCHECK(output_surface_->capabilities().deferred_gl_initialization); |
| 2045 DCHECK(settings_.impl_side_painting); | 2048 DCHECK(settings_.impl_side_painting); |
| 2046 DCHECK(output_surface_->context_provider()); | 2049 DCHECK(output_surface_->context_provider()); |
| 2047 | 2050 |
| 2048 ReleaseTreeResources(); | 2051 ReleaseTreeResources(); |
| 2049 renderer_.reset(); | 2052 renderer_.reset(); |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3129 swap_promise_monitor_.erase(monitor); | 3132 swap_promise_monitor_.erase(monitor); |
| 3130 } | 3133 } |
| 3131 | 3134 |
| 3132 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3135 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
| 3133 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3136 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
| 3134 for (; it != swap_promise_monitor_.end(); it++) | 3137 for (; it != swap_promise_monitor_.end(); it++) |
| 3135 (*it)->OnSetNeedsRedrawOnImpl(); | 3138 (*it)->OnSetNeedsRedrawOnImpl(); |
| 3136 } | 3139 } |
| 3137 | 3140 |
| 3138 } // namespace cc | 3141 } // namespace cc |
| OLD | NEW |