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

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

Issue 879913002: mechanical rename of base::debug -> base::trace_event for /cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part3
Patch Set: Edited a comment Created 5 years, 10 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
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | 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/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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 return ResourceUpdateController::MaxPartialTextureUpdates(); 1225 return ResourceUpdateController::MaxPartialTextureUpdates();
1226 } 1226 }
1227 1227
1228 ThreadProxy::BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() 1228 ThreadProxy::BeginMainFrameAndCommitState::BeginMainFrameAndCommitState()
1229 : memory_allocation_limit_bytes(0), 1229 : memory_allocation_limit_bytes(0),
1230 memory_allocation_priority_cutoff(0), 1230 memory_allocation_priority_cutoff(0),
1231 evicted_ui_resources(false) {} 1231 evicted_ui_resources(false) {}
1232 1232
1233 ThreadProxy::BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {} 1233 ThreadProxy::BeginMainFrameAndCommitState::~BeginMainFrameAndCommitState() {}
1234 1234
1235 void ThreadProxy::AsValueInto(base::debug::TracedValue* state) const { 1235 void ThreadProxy::AsValueInto(base::trace_event::TracedValue* state) const {
1236 CompletionEvent completion; 1236 CompletionEvent completion;
1237 { 1237 {
1238 DebugScopedSetMainThreadBlocked main_thread_blocked( 1238 DebugScopedSetMainThreadBlocked main_thread_blocked(
1239 const_cast<ThreadProxy*>(this)); 1239 const_cast<ThreadProxy*>(this));
1240 scoped_refptr<base::debug::TracedValue> state_refptr(state); 1240 scoped_refptr<base::trace_event::TracedValue> state_refptr(state);
1241 Proxy::ImplThreadTaskRunner()->PostTask( 1241 Proxy::ImplThreadTaskRunner()->PostTask(
1242 FROM_HERE, 1242 FROM_HERE,
1243 base::Bind(&ThreadProxy::AsValueOnImplThread, 1243 base::Bind(&ThreadProxy::AsValueOnImplThread,
1244 impl_thread_weak_ptr_, 1244 impl_thread_weak_ptr_,
1245 &completion, 1245 &completion,
1246 state_refptr)); 1246 state_refptr));
1247 completion.Wait(); 1247 completion.Wait();
1248 } 1248 }
1249 } 1249 }
1250 1250
1251 void ThreadProxy::AsValueOnImplThread(CompletionEvent* completion, 1251 void ThreadProxy::AsValueOnImplThread(
1252 base::debug::TracedValue* state) const { 1252 CompletionEvent* completion,
1253 base::trace_event::TracedValue* state) const {
1253 state->BeginDictionary("layer_tree_host_impl"); 1254 state->BeginDictionary("layer_tree_host_impl");
1254 impl().layer_tree_host_impl->AsValueInto(state); 1255 impl().layer_tree_host_impl->AsValueInto(state);
1255 state->EndDictionary(); 1256 state->EndDictionary();
1256 completion->Signal(); 1257 completion->Signal();
1257 } 1258 }
1258 1259
1259 bool ThreadProxy::MainFrameWillHappenForTesting() { 1260 bool ThreadProxy::MainFrameWillHappenForTesting() {
1260 DCHECK(IsMainThread()); 1261 DCHECK(IsMainThread());
1261 CompletionEvent completion; 1262 CompletionEvent completion;
1262 bool main_frame_will_happen = false; 1263 bool main_frame_will_happen = false;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 } 1368 }
1368 1369
1369 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1370 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1370 DCHECK(IsImplThread()); 1371 DCHECK(IsImplThread());
1371 Proxy::MainThreadTaskRunner()->PostTask( 1372 Proxy::MainThreadTaskRunner()->PostTask(
1372 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1373 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1373 main_thread_weak_ptr_)); 1374 main_thread_weak_ptr_));
1374 } 1375 }
1375 1376
1376 } // namespace cc 1377 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698