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

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

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.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/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // there as the main thread is not blocked, so any posted tasks inside 362 // there as the main thread is not blocked, so any posted tasks inside
363 // the swap buffers will execute first. 363 // the swap buffers will execute first.
364 BlockingTaskRunner::CapturePostTasks blocked; 364 BlockingTaskRunner::CapturePostTasks blocked;
365 365
366 layer_tree_host_impl_->SwapBuffers(frame); 366 layer_tree_host_impl_->SwapBuffers(frame);
367 } 367 }
368 DidSwapFrame(); 368 DidSwapFrame();
369 } 369 }
370 } 370 }
371 371
372 void SingleThreadProxy::AsValueInto(base::debug::TracedValue* state) const { 372 scoped_ptr<base::Value> SingleThreadProxy::AsValue() const {
373 // The following line casts away const modifiers because it is just 373 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
374 // setting debug state. We still want the AsValue() function and its 374 {
375 // call chain to be const throughout. 375 // The following line casts away const modifiers because it is just
376 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); 376 // setting debug state. We still want the AsValue() function and its
377 // call chain to be const throughout.
378 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this));
377 379
378 state->BeginDictionary("layer_tree_host_impl"); 380 state->Set("layer_tree_host_impl",
379 layer_tree_host_impl_->AsValueInto(state); 381 layer_tree_host_impl_->AsValue().release());
380 state->EndDictionary(); 382 }
383 return state.PassAs<base::Value>();
381 } 384 }
382 385
383 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { 386 void SingleThreadProxy::ForceSerializeOnSwapBuffers() {
384 { 387 {
385 DebugScopedSetImplThread impl(this); 388 DebugScopedSetImplThread impl(this);
386 if (layer_tree_host_impl_->renderer()) { 389 if (layer_tree_host_impl_->renderer()) {
387 DCHECK(!layer_tree_host_->output_surface_lost()); 390 DCHECK(!layer_tree_host_->output_surface_lost());
388 layer_tree_host_impl_->renderer()->DoNoOp(); 391 layer_tree_host_impl_->renderer()->DoNoOp();
389 } 392 }
390 } 393 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 void SingleThreadProxy::DidSwapFrame() { 457 void SingleThreadProxy::DidSwapFrame() {
455 if (next_frame_is_newly_committed_frame_) { 458 if (next_frame_is_newly_committed_frame_) {
456 next_frame_is_newly_committed_frame_ = false; 459 next_frame_is_newly_committed_frame_ = false;
457 layer_tree_host_->DidCommitAndDrawFrame(); 460 layer_tree_host_->DidCommitAndDrawFrame();
458 } 461 }
459 } 462 }
460 463
461 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 464 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
462 465
463 } // namespace cc 466 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698