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

Unified Diff: ui/gfx/compositor/compositor_gl.cc

Issue 8440008: Add traces in compositor, views and skia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 9 years, 2 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 | « skia/ext/platform_canvas_win.cc ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/compositor_gl.cc
diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc
index 0f0451bb4826464f53d4d4a6bd09ec11ca4001b9..2b2c10283f21325e6f4ac74117024716b2725bd5 100644
--- a/ui/gfx/compositor/compositor_gl.cc
+++ b/ui/gfx/compositor/compositor_gl.cc
@@ -6,6 +6,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
@@ -336,6 +337,7 @@ TextureGL::~TextureGL() {
void TextureGL::SetCanvas(const SkCanvas& canvas,
const gfx::Point& origin,
const gfx::Size& overall_size) {
+ TRACE_EVENT0("ui", "TextureGL::SetCanvas");
const SkBitmap& bitmap = canvas.getDevice()->accessBitmap(false);
// Verify bitmap pixels are contiguous.
DCHECK_EQ(bitmap.rowBytes(),
@@ -374,6 +376,7 @@ void TextureGL::SetCanvas(const SkCanvas& canvas,
void TextureGL::Draw(const ui::TextureDrawParams& params,
const gfx::Rect& clip_bounds_in_texture) {
+ TRACE_EVENT0("ui", "TextureGL::Draw");
SharedResourcesGL* instance = SharedResourcesGL::GetInstance();
DCHECK(instance);
DrawInternal(*instance->program_swizzle(),
@@ -515,6 +518,7 @@ Texture* CompositorGL::CreateTexture() {
}
void CompositorGL::OnNotifyStart(bool clear) {
+ TRACE_EVENT0("ui", "CompositorGL::OnNotifyStart");
started_ = true;
gl_context_->MakeCurrent(gl_surface_.get());
glViewport(0, 0, size().width(), size().height());
@@ -535,6 +539,7 @@ void CompositorGL::OnNotifyStart(bool clear) {
}
void CompositorGL::OnNotifyEnd() {
+ TRACE_EVENT0("ui", "CompositorGL::OnNotifyEnd");
DCHECK(started_);
gl_surface_->SwapBuffers();
started_ = false;
« no previous file with comments | « skia/ext/platform_canvas_win.cc ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698