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_); }