| Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| index 0c43205d3d80b81a60230fba718914d1348b886f..13da253fd94be5f970511334f36a23c451fd5d33 100644
|
| --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/debug/trace_event.h"
|
| #include "base/synchronization/waitable_event.h"
|
| #include "base/threading/thread_restrictions.h"
|
| +#include "base/tracked_objects.h"
|
| #include "content/browser/gpu/gpu_data_manager_impl.h"
|
| #include "content/browser/gpu/gpu_process_host.h"
|
| #include "content/browser/gpu/gpu_surface_tracker.h"
|
| @@ -169,6 +170,11 @@ void BrowserGpuChannelHostFactory::EstablishRequest::FinishOnMain() {
|
| void BrowserGpuChannelHostFactory::EstablishRequest::Wait() {
|
| DCHECK(main_loop_->BelongsToCurrentThread());
|
| {
|
| + // Since the current task synchronously waits for establishing a GPU
|
| + // channel, it shouldn't be tallied because its execution time has nothing
|
| + // to do with its efficiency. Using task stopwatch to exclude the waiting
|
| + // time from the current task run time.
|
| + tracked_objects::TaskStopwatch stopwatch;
|
| // We're blocking the UI thread, which is generally undesirable.
|
| // In this case we need to wait for this before we can show any UI
|
| // /anyway/, so it won't cause additional jank.
|
| @@ -177,6 +183,8 @@ void BrowserGpuChannelHostFactory::EstablishRequest::Wait() {
|
| "BrowserGpuChannelHostFactory::EstablishGpuChannelSync");
|
| base::ThreadRestrictions::ScopedAllowWait allow_wait;
|
| event_.Wait();
|
| +
|
| + stopwatch.Stop();
|
| }
|
| FinishOnMain();
|
| }
|
|
|