Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 328113006: cc: Recreate TileManager in DeferredInitialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whitespace to match Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
2037 CreateAndSetRenderer(); 2038 CreateAndSetRenderer();
2039 EnforceZeroBudget(false);
2040 CreateAndSetTileManager();
2038 2041
2039 EnforceZeroBudget(false);
2040 client_->SetNeedsCommitOnImplThread(); 2042 client_->SetNeedsCommitOnImplThread();
2041 } 2043 }
2042 2044
2043 void LayerTreeHostImpl::ReleaseGL() { 2045 void LayerTreeHostImpl::ReleaseGL() {
2044 DCHECK(output_surface_->capabilities().deferred_gl_initialization); 2046 DCHECK(output_surface_->capabilities().deferred_gl_initialization);
2045 DCHECK(settings_.impl_side_painting); 2047 DCHECK(settings_.impl_side_painting);
2046 DCHECK(output_surface_->context_provider()); 2048 DCHECK(output_surface_->context_provider());
2047 2049
2048 ReleaseTreeResources(); 2050 ReleaseTreeResources();
2049 renderer_.reset(); 2051 renderer_.reset();
2050 DestroyTileManager(); 2052 DestroyTileManager();
2053
2051 resource_provider_->InitializeSoftware(); 2054 resource_provider_->InitializeSoftware();
2055 output_surface_->ReleaseContextProvider();
2052 2056
2053 output_surface_->ReleaseContextProvider();
2054 CreateAndSetRenderer(); 2057 CreateAndSetRenderer();
2055
2056 EnforceZeroBudget(true); 2058 EnforceZeroBudget(true);
2057 CreateAndSetTileManager(); 2059 CreateAndSetTileManager();
2058 2060
2059 client_->SetNeedsCommitOnImplThread(); 2061 client_->SetNeedsCommitOnImplThread();
2060 } 2062 }
2061 2063
2062 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { 2064 void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) {
2063 if (device_viewport_size == device_viewport_size_) 2065 if (device_viewport_size == device_viewport_size_)
2064 return; 2066 return;
2065 2067
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
3129 swap_promise_monitor_.erase(monitor); 3131 swap_promise_monitor_.erase(monitor);
3130 } 3132 }
3131 3133
3132 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3134 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3133 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3135 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3134 for (; it != swap_promise_monitor_.end(); it++) 3136 for (; it != swap_promise_monitor_.end(); it++)
3135 (*it)->OnSetNeedsRedrawOnImpl(); 3137 (*it)->OnSetNeedsRedrawOnImpl();
3136 } 3138 }
3137 3139
3138 } // namespace cc 3140 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698