From fbc8df03e498baf47ff1a5e05e182f1bcd60c770 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 14 Nov 2014 16:18:41 -0800 Subject: Trace some interesting events Bug: 18337099 Change-Id: Ie2e60da2b9f06e0368061c944d8123ab6903355c --- libs/hwui/AssetAtlas.cpp | 2 ++ libs/hwui/Caches.cpp | 2 ++ libs/hwui/renderthread/CanvasContext.cpp | 2 ++ libs/hwui/renderthread/EglManager.cpp | 2 ++ 4 files changed, 8 insertions(+) diff --git a/libs/hwui/AssetAtlas.cpp b/libs/hwui/AssetAtlas.cpp index fc86e4fa418d..e5a93bde191b 100644 --- a/libs/hwui/AssetAtlas.cpp +++ b/libs/hwui/AssetAtlas.cpp @@ -33,6 +33,8 @@ void AssetAtlas::init(sp buffer, int64_t* map, int count) { return; } + ATRACE_NAME("AssetAtlas::init"); + mImage = new Image(buffer); if (mImage->getTexture()) { diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index 952f7394fb5c..6453206eac3d 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -66,6 +66,8 @@ Caches::Caches(): Singleton(), bool Caches::init() { if (mInitialized) return false; + ATRACE_NAME("Caches::init"); + glGenBuffers(1, &meshBuffer); glBindBuffer(GL_ARRAY_BUFFER, meshBuffer); glBufferData(GL_ARRAY_BUFFER, sizeof(gMeshVertices), gMeshVertices, GL_STATIC_DRAW); diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 6c3637d0f30b..39528be830df 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -71,6 +71,8 @@ void CanvasContext::destroy() { } void CanvasContext::setSurface(ANativeWindow* window) { + ATRACE_CALL(); + mNativeWindow = window; if (mEglSurface != EGL_NO_SURFACE) { diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index 9bd6f41a9614..378cf618a26f 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -82,6 +82,8 @@ EglManager::EglManager(RenderThread& thread) void EglManager::initialize() { if (hasEglContext()) return; + ATRACE_NAME("Creating EGLContext"); + mEglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); LOG_ALWAYS_FATAL_IF(mEglDisplay == EGL_NO_DISPLAY, "Failed to get EGL_DEFAULT_DISPLAY! err=%s", egl_error_str()); -- cgit v1.2.3-59-g8ed1b