Merge "Add a system property to control Skia reduceOpsTaskSplitting" into sc-dev
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
#include <utils/Mutex.h>
|
#include <utils/Mutex.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
#include <android-base/properties.h>
|
||||||
#include <ui/FatVector.h>
|
#include <ui/FatVector.h>
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
@@ -251,6 +252,11 @@ void RenderThread::requireVkContext() {
|
|||||||
void RenderThread::initGrContextOptions(GrContextOptions& options) {
|
void RenderThread::initGrContextOptions(GrContextOptions& options) {
|
||||||
options.fPreferExternalImagesOverES3 = true;
|
options.fPreferExternalImagesOverES3 = true;
|
||||||
options.fDisableDistanceFieldPaths = 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() {
|
void RenderThread::destroyRenderingContext() {
|
||||||
|
|||||||
@@ -38,6 +38,12 @@
|
|||||||
#include "thread/ThreadBase.h"
|
#include "thread/ThreadBase.h"
|
||||||
#include "utils/TimeUtils.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 {
|
namespace android {
|
||||||
|
|
||||||
class Bitmap;
|
class Bitmap;
|
||||||
|
|||||||
Reference in New Issue
Block a user