From 06630f837ae5f1829c8850146a18fae42ad35477 Mon Sep 17 00:00:00 2001 From: "jamesr@chromium.org" <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Thu, 29 May 2014 23:15:14 +0000 Subject: Add tracing for places that make sync GL calls in compositor init We make several synchronous GL calls during compositor initialization, some of which appear unnecessary. This adds some more tracing to make these calls easier to understand. R=jbauman Review URL: https://codereview.chromium.org/304513005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273649 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/gpu/client/command_buffer_proxy_impl.cc | 1 + content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 2 ++ 2 files changed, 3 insertions(+) (limited to 'content/common') diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc index 59153d6..e2bd974 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.cc +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc @@ -128,6 +128,7 @@ void CommandBufferProxyImpl::SetChannelErrorCallback( } bool CommandBufferProxyImpl::Initialize() { + TRACE_EVENT0("gpu", "CommandBufferProxyImpl::Initialize"); shared_state_shm_.reset(channel_->factory()->AllocateSharedMemory( sizeof(*shared_state())).release()); if (!shared_state_shm_) diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index 4ac84e9..1708af2 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -181,6 +181,7 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL() { }; GLint pvalues[pcount] = { 0, 0, 0, 0 }; + TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl initializing actual attributes"); gl_->GetMultipleIntegervCHROMIUM(pnames, pcount, pvalues, sizeof(pvalues)); @@ -257,6 +258,7 @@ bool WebGraphicsContext3DCommandBufferImpl::InitializeCommandBuffer( } bool WebGraphicsContext3DCommandBufferImpl::CreateContext(bool onscreen) { + TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl::CreateContext"); // Ensure the gles2 library is initialized first in a thread safe way. g_gles2_initializer.Get(); -- cgit v1.1