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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | crypto/capi_util.h » ('j') | 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/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 TRACE_EVENT0("cc", "ThreadProxy::LayerTreeHostClosedOnImplThread"); 1210 TRACE_EVENT0("cc", "ThreadProxy::LayerTreeHostClosedOnImplThread");
1211 DCHECK(IsImplThread()); 1211 DCHECK(IsImplThread());
1212 DCHECK(IsMainThreadBlocked()); 1212 DCHECK(IsMainThreadBlocked());
1213 layer_tree_host()->DeleteContentsTexturesOnImplThread( 1213 layer_tree_host()->DeleteContentsTexturesOnImplThread(
1214 impl().layer_tree_host_impl->resource_provider()); 1214 impl().layer_tree_host_impl->resource_provider());
1215 impl().current_resource_update_controller = nullptr; 1215 impl().current_resource_update_controller = nullptr;
1216 impl().layer_tree_host_impl->SetNeedsBeginFrames(false); 1216 impl().layer_tree_host_impl->SetNeedsBeginFrames(false);
1217 impl().scheduler = nullptr; 1217 impl().scheduler = nullptr;
1218 impl().layer_tree_host_impl = nullptr; 1218 impl().layer_tree_host_impl = nullptr;
1219 impl().weak_factory.InvalidateWeakPtrs(); 1219 impl().weak_factory.InvalidateWeakPtrs();
1220 // We need to explicitly cancel the notifier, since it isn't using weak ptrs. 1220 // We need to explicitly shutdown the notifier to destroy any weakptrs it is
1221 // TODO(vmpstr): We should see if we can make it use weak ptrs and still keep 1221 // holding while still on the compositor thread. This also ensures any
1222 // the convention of having a weak ptr factory initialized last. Alternatively 1222 // callbacks holding a ThreadProxy pointer are cancelled.
1223 // we should moved the notifier (and RenewTreePriority) to LTHI. See 1223 impl().smoothness_priority_expiration_notifier.Shutdown();
1224 // crbug.com/411972
1225 impl().smoothness_priority_expiration_notifier.Cancel();
1226 impl().contents_texture_manager = NULL; 1224 impl().contents_texture_manager = NULL;
1227 completion->Signal(); 1225 completion->Signal();
1228 } 1226 }
1229 1227
1230 size_t ThreadProxy::MaxPartialTextureUpdates() const { 1228 size_t ThreadProxy::MaxPartialTextureUpdates() const {
1231 return ResourceUpdateController::MaxPartialTextureUpdates(); 1229 return ResourceUpdateController::MaxPartialTextureUpdates();
1232 } 1230 }
1233 1231
1234 ThreadProxy::BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() 1232 ThreadProxy::BeginMainFrameAndCommitState::BeginMainFrameAndCommitState()
1235 : memory_allocation_limit_bytes(0), 1233 : memory_allocation_limit_bytes(0),
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 1362
1365 impl().timing_history.DidActivateSyncTree(); 1363 impl().timing_history.DidActivateSyncTree();
1366 } 1364 }
1367 1365
1368 void ThreadProxy::DidManageTiles() { 1366 void ThreadProxy::DidManageTiles() {
1369 DCHECK(IsImplThread()); 1367 DCHECK(IsImplThread());
1370 impl().scheduler->DidManageTiles(); 1368 impl().scheduler->DidManageTiles();
1371 } 1369 }
1372 1370
1373 } // namespace cc 1371 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | crypto/capi_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698