diff options
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 69fe40c755ea..6ab8e4e0e2ab 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -323,6 +323,7 @@ void RenderThread::initGrContextOptions(GrContextOptions& options) { } void RenderThread::destroyRenderingContext() { + ATRACE_CALL(); mFunctorManager.onContextDestroyed(); if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) { if (mEglManager->hasEglContext()) { @@ -520,7 +521,10 @@ void RenderThread::preload() { // EGL driver is always preloaded only if HWUI renders with GL. if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) { if (Properties::earlyPreloadGlContext()) { - queue().post([this]() { requireGlContext(); }); + queue().post([this]() { + ATRACE_NAME("earlyPreloadGlContext"); + requireGlContext(); + }); } else { std::thread eglInitThread([]() { eglGetDisplay(EGL_DEFAULT_DISPLAY); }); eglInitThread.detach(); @@ -528,9 +532,6 @@ void RenderThread::preload() { } else { requireVkContext(); } - if (Properties::earlyPreloadGlContext()) { - queue().post([]() { GraphicBufferAllocator::getInstance(); }); - } HardwareBitmapUploader::initialize(); } |