From fec82b04a116d5e251094a71b90565f6d21cb93c Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Fri, 7 Oct 2016 14:01:22 -0700 Subject: [PATCH] Reinstate the trace events for Skia canvas flush and eglSwapBuffers (flutter/engine#3107) --- engine/src/flutter/shell/gpu/gpu_surface_gl.cc | 6 +++++- .../flutter/shell/platform/android/android_context_gl.cc | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/gpu/gpu_surface_gl.cc b/engine/src/flutter/shell/gpu/gpu_surface_gl.cc index 207c7dbeab..a17cd77753 100644 --- a/engine/src/flutter/shell/gpu/gpu_surface_gl.cc +++ b/engine/src/flutter/shell/gpu/gpu_surface_gl.cc @@ -5,6 +5,7 @@ #include "gpu_surface_gl.h" #include "flutter/flow/gl_connection.h" +#include "flutter/glue/trace_event.h" #include "lib/ftl/arraysize.h" #include "lib/ftl/logging.h" #include "third_party/skia/include/core/SkSurface.h" @@ -132,7 +133,10 @@ bool GPUSurfaceGL::PresentSurface(SkCanvas* canvas) { return false; } - canvas->flush(); + { + TRACE_EVENT0("flutter", "SkCanvas::Flush"); + canvas->flush(); + } delegate_->GLContextPresent(); diff --git a/engine/src/flutter/shell/platform/android/android_context_gl.cc b/engine/src/flutter/shell/platform/android/android_context_gl.cc index 4e411e3ecd..24b889ace0 100644 --- a/engine/src/flutter/shell/platform/android/android_context_gl.cc +++ b/engine/src/flutter/shell/platform/android/android_context_gl.cc @@ -245,6 +245,7 @@ bool AndroidContextGL::ClearCurrent() { } bool AndroidContextGL::SwapBuffers() { + TRACE_EVENT0("flutter", "AndroidContextGL::SwapBuffers"); return eglSwapBuffers(environment_->Display(), surface_); }