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

Unified Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 860293004: Instrumenting GPU initialization for jank (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years, 11 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 | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index da8099ed2f0cd2f81ab4c59b0d4c8e8f927802bf..019ec13a5cd98fc66704674e840e4a519ce1666a 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -21,8 +21,8 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/trace_event/trace_event.h"
-#include "base/tracked_objects.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
@@ -128,18 +128,14 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL() {
TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl::MaybeInitializeGL");
- // Below, we perform an expensive one-time initialization that is required to
- // get first pixels to the screen. This can't be called "jank" since there is
- // nothing on the screen. Using TaskStopwatch to exclude the operation from
- // jank calculations.
- tracked_objects::TaskStopwatch stopwatch;
- stopwatch.Start();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/125248 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "125248 WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL"));
if (!CreateContext(surface_id_ != 0)) {
Destroy();
- stopwatch.Stop();
-
initialize_failed_ = true;
return false;
}
@@ -157,8 +153,6 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL() {
real_gl_->SetErrorMessageCallback(getErrorMessageCallback());
- stopwatch.Stop();
-
visible_ = true;
initialized_ = true;
return true;
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698