summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 21:03:07 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 21:03:07 +0000
commit93a4d0ca68b07e9e84bdccd4218dadb39d0e09ee (patch)
tree9ad8207038cd3f38d9e67014542db3d4aa7238f0 /ui
parentd13783eae9c8a7670c7c3c97c322e7e5a045cf11 (diff)
downloadchromium_src-93a4d0ca68b07e9e84bdccd4218dadb39d0e09ee.zip
chromium_src-93a4d0ca68b07e9e84bdccd4218dadb39d0e09ee.tar.gz
chromium_src-93a4d0ca68b07e9e84bdccd4218dadb39d0e09ee.tar.bz2
Traces on MakeCurrent
Review URL: http://codereview.chromium.org/9931001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/gl/gl_context_cgl.cc2
-rw-r--r--ui/gfx/gl/gl_context_egl.cc4
-rw-r--r--ui/gfx/gl/gl_context_glx.cc2
-rw-r--r--ui/gfx/gl/gl_context_nsview.mm2
-rw-r--r--ui/gfx/gl/gl_context_wgl.cc4
5 files changed, 12 insertions, 2 deletions
diff --git a/ui/gfx/gl/gl_context_cgl.cc b/ui/gfx/gl/gl_context_cgl.cc
index 79fe282..1d5597b 100644
--- a/ui/gfx/gl/gl_context_cgl.cc
+++ b/ui/gfx/gl/gl_context_cgl.cc
@@ -7,6 +7,7 @@
#include <OpenGL/CGLRenderers.h>
#include <vector>
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "ui/gfx/gl/gl_bindings.h"
#include "ui/gfx/gl/gl_implementation.h"
@@ -87,6 +88,7 @@ void GLContextCGL::Destroy() {
}
bool GLContextCGL::MakeCurrent(GLSurface* surface) {
+ TRACE_EVENT0("gpu", "GLContextCGL::MakeCurrent");
DCHECK(context_);
if (IsCurrent(surface))
return true;
diff --git a/ui/gfx/gl/gl_context_egl.cc b/ui/gfx/gl/gl_context_egl.cc
index 7c94743..1908e30 100644
--- a/ui/gfx/gl/gl_context_egl.cc
+++ b/ui/gfx/gl/gl_context_egl.cc
@@ -1,10 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/gl/gl_context_egl.h"
#include "build/build_config.h"
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/angle/include/EGL/egl.h"
@@ -83,6 +84,7 @@ void GLContextEGL::Destroy() {
}
bool GLContextEGL::MakeCurrent(GLSurface* surface) {
+ TRACE_EVENT0("gpu", "GLContextEGL::MakeCurrent");
DCHECK(context_);
if (IsCurrent(surface))
return true;
diff --git a/ui/gfx/gl/gl_context_glx.cc b/ui/gfx/gl/gl_context_glx.cc
index 8883eb9..166f1d4 100644
--- a/ui/gfx/gl/gl_context_glx.cc
+++ b/ui/gfx/gl/gl_context_glx.cc
@@ -8,6 +8,7 @@ extern "C" {
#include "ui/gfx/gl/gl_context_glx.h"
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
@@ -151,6 +152,7 @@ void GLContextGLX::Destroy() {
}
bool GLContextGLX::MakeCurrent(GLSurface* surface) {
+ TRACE_EVENT0("gpu", "GLContextGLX::MakeCurrent");
DCHECK(context_);
if (IsCurrent(surface))
return true;
diff --git a/ui/gfx/gl/gl_context_nsview.mm b/ui/gfx/gl/gl_context_nsview.mm
index 76c456c..03e3c03 100644
--- a/ui/gfx/gl/gl_context_nsview.mm
+++ b/ui/gfx/gl/gl_context_nsview.mm
@@ -9,6 +9,7 @@
#import <AppKit/NSOpenGL.h>
#import <AppKit/NSView.h>
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "ui/gfx/gl/gl_surface_nsview.h"
@@ -54,6 +55,7 @@ void GLContextNSView::Destroy() {
}
bool GLContextNSView::MakeCurrent(GLSurface* surface) {
+ TRACE_EVENT0("gpu", "GLContextNSView::MakeCurrent");
AcceleratedWidget view =
static_cast<AcceleratedWidget>(surface->GetHandle());
// Only set the context's view if the view is parented.
diff --git a/ui/gfx/gl/gl_context_wgl.cc b/ui/gfx/gl/gl_context_wgl.cc
index 1785a88..1737146 100644
--- a/ui/gfx/gl/gl_context_wgl.cc
+++ b/ui/gfx/gl/gl_context_wgl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,7 @@
#include "ui/gfx/gl/gl_context_wgl.h"
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "ui/gfx/gl/gl_bindings.h"
#include "ui/gfx/gl/gl_implementation.h"
@@ -69,6 +70,7 @@ void GLContextWGL::Destroy() {
}
bool GLContextWGL::MakeCurrent(GLSurface* surface) {
+ TRACE_EVENT0("gpu", "GLContextWGL::MakeCurrent");
DCHECK(context_);
if (IsCurrent(surface))
return true;