diff options
author | Adlai Holler <adlai@google.com> | 2021-03-24 13:26:56 -0400 |
---|---|---|
committer | Adlai Holler <adlai@google.com> | 2021-03-25 13:39:50 +0000 |
commit | dfc7d4cc7b6ece90b50fede1de04a6d92e7e8e7a (patch) | |
tree | 546324b078ce0b0e81d0c0883a644325c663604e /libs/hwui/renderthread/RenderThread.cpp | |
parent | d19254d3abc4579c0bbaa83f26bb5558f3fd3f1d (diff) |
Add a system property to control Skia reduceOpsTaskSplitting
We are testing this flag with a subset of devices in dogfood and
need to have this plumbing available.
Bug: 183612348
Change-Id: I8041053ff3da94b08cd6793fac3ff282bc73da9a
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 5dc02e8454ac..db7642d99bb1 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -40,6 +40,7 @@ #include <utils/Mutex.h> #include <thread> +#include <android-base/properties.h> #include <ui/FatVector.h> namespace android { @@ -251,6 +252,11 @@ void RenderThread::requireVkContext() { void RenderThread::initGrContextOptions(GrContextOptions& options) { options.fPreferExternalImagesOverES3 = true; options.fDisableDistanceFieldPaths = true; + if (android::base::GetBoolProperty(PROPERTY_REDUCE_OPS_TASK_SPLITTING, false)) { + options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kYes; + } else { + options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; + } } void RenderThread::destroyRenderingContext() { |