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

Unified Diff: cc/trees/thread_proxy.cc

Issue 144463016: cc: add more devtools instrumentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: capitalized instrumentation functions name Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 1740e964f68769e98dca9b9b199b381620fcdd6c..0cd3f29d180b45fc5584786de777aa91bd13cf33 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -13,6 +13,7 @@
#include "base/metrics/histogram.h"
#include "cc/base/swap_promise.h"
#include "cc/debug/benchmark_instrumentation.h"
+#include "cc/debug/devtools_instrumentation.h"
#include "cc/input/input_handler.h"
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
@@ -83,7 +84,7 @@ ThreadProxy::ThreadProxy(
: Proxy(impl_task_runner),
main_thread_only_vars_unsafe_(this, layer_tree_host->id()),
main_thread_or_blocked_vars_unsafe_(layer_tree_host),
- compositor_thread_vars_unsafe_(this) {
+ compositor_thread_vars_unsafe_(this, layer_tree_host->id()) {
TRACE_EVENT0("cc", "ThreadProxy::ThreadProxy");
DCHECK(IsMainThread());
DCHECK(this->layer_tree_host());
@@ -119,8 +120,10 @@ ThreadProxy::MainThreadOrBlockedMainThread::contents_texture_manager() {
return layer_tree_host->contents_texture_manager();
}
-ThreadProxy::CompositorThreadOnly::CompositorThreadOnly(ThreadProxy* proxy)
- : contents_texture_manager(NULL),
+ThreadProxy::CompositorThreadOnly::CompositorThreadOnly(ThreadProxy* proxy,
+ int layer_tree_host_id)
+ : layer_tree_host_id(layer_tree_host_id),
+ contents_texture_manager(NULL),
begin_main_frame_sent_completion_event(NULL),
readback_request(NULL),
commit_completion_event(NULL),
@@ -680,8 +683,7 @@ void ThreadProxy::Start() {
FROM_HERE,
base::Bind(&ThreadProxy::InitializeImplOnImplThread,
base::Unretained(this),
- &completion,
- main().layer_tree_host_id));
+ &completion));
completion.Wait();
main_thread_weak_ptr_ = main().weak_factory.GetWeakPtr();
@@ -774,7 +776,8 @@ void ThreadProxy::ScheduledActionSendBeginMainFrame() {
base::Bind(&ThreadProxy::BeginMainFrame,
main_thread_weak_ptr_,
base::Passed(&begin_main_frame_state)));
-
+ devtools_instrumentation::DidRequestMainThreadFrame(
+ impl().layer_tree_host_id);
if (impl().begin_main_frame_sent_completion_event) {
impl().begin_main_frame_sent_completion_event->Signal();
impl().begin_main_frame_sent_completion_event = NULL;
@@ -1406,8 +1409,7 @@ void ThreadProxy::HasInitializedOutputSurfaceOnImplThread(
completion->Signal();
}
-void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion,
- int layer_tree_host_id) {
+void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) {
TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread");
DCHECK(IsImplThread());
impl().layer_tree_host_impl =
@@ -1426,7 +1428,7 @@ void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion,
scheduler_settings.throttle_frame_production =
settings.throttle_frame_production;
impl().scheduler =
- Scheduler::Create(this, scheduler_settings, layer_tree_host_id);
+ Scheduler::Create(this, scheduler_settings, impl().layer_tree_host_id);
impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible());
impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr();
« 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