diff options
author | Chris Gross <chrisgross@google.com> | 2021-05-19 11:39:13 -0700 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-05-21 00:34:23 +0000 |
commit | 219787565ff982848d596fa8743cd132af113e6b (patch) | |
tree | 93bd3c94771fb966fdf611d38865e712fb83e969 /libs/hwui/renderthread/RenderThread.cpp | |
parent | 7b4a006d559a571313e36799d93af7e3c6b69c82 (diff) | |
parent | 75eb1dd292d1800d660c5146464264b25854d318 (diff) |
Merge SP1A.210513.004
Change-Id: Ic23aece12c3bbd2b4dcf3205fdbcdd1601deabec
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 04aa1cb91492..308352d34174 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -275,7 +275,7 @@ void RenderThread::requireVkContext() { void RenderThread::initGrContextOptions(GrContextOptions& options) { options.fPreferExternalImagesOverES3 = true; options.fDisableDistanceFieldPaths = true; - if (android::base::GetBoolProperty(PROPERTY_REDUCE_OPS_TASK_SPLITTING, false)) { + if (android::base::GetBoolProperty(PROPERTY_REDUCE_OPS_TASK_SPLITTING, true)) { options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kYes; } else { options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; @@ -302,30 +302,25 @@ VulkanManager& RenderThread::vulkanManager() { return *mVkManager.get(); } -void RenderThread::dumpGraphicsMemory(int fd) { - globalProfileData()->dump(fd); - - String8 cachesOutput; - String8 pipeline; - auto renderType = Properties::getRenderPipelineType(); - switch (renderType) { - case RenderPipelineType::SkiaGL: { - mCacheManager->dumpMemoryUsage(cachesOutput, mRenderState); - pipeline.appendFormat("Skia (OpenGL)"); - break; - } - case RenderPipelineType::SkiaVulkan: { - mCacheManager->dumpMemoryUsage(cachesOutput, mRenderState); - pipeline.appendFormat("Skia (Vulkan)"); - break; - } +static const char* pipelineToString() { + switch (auto renderType = Properties::getRenderPipelineType()) { + case RenderPipelineType::SkiaGL: + return "Skia (OpenGL)"; + case RenderPipelineType::SkiaVulkan: + return "Skia (Vulkan)"; default: LOG_ALWAYS_FATAL("canvas context type %d not supported", (int32_t)renderType); - break; } +} - dprintf(fd, "\n%s\n", cachesOutput.string()); - dprintf(fd, "\nPipeline=%s\n", pipeline.string()); +void RenderThread::dumpGraphicsMemory(int fd, bool includeProfileData) { + if (includeProfileData) { + globalProfileData()->dump(fd); + } + + String8 cachesOutput; + mCacheManager->dumpMemoryUsage(cachesOutput, mRenderState); + dprintf(fd, "\nPipeline=%s\n%s\n", pipelineToString(), cachesOutput.string()); } Readback& RenderThread::readback() { |