Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c479dc5b authored by Adlai Holler's avatar Adlai Holler Committed by Automerger Merge Worker
Browse files

Merge "Add a system property to control Skia reduceOpsTaskSplitting" into sc-dev am: 0019fda9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13995879

Change-Id: I59d9c0018d180396e99a1eb2133a669436a313f9
parents 92f2d8c3 0019fda9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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() {
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,12 @@
#include "thread/ThreadBase.h"
#include "utils/TimeUtils.h"

/**
 * (Bool) Turns on the Skia GPU option "reduceOpsTaskSplitting" which improves GPU
 * efficiency but may increase VRAM consumption. Default is false.
 */
#define PROPERTY_REDUCE_OPS_TASK_SPLITTING "renderthread.skia.reduceopstasksplitting"

namespace android {

class Bitmap;