Disable Skia reduceOpsTaskSplitting option (flutter/engine#26568)

This option will be the default in Skia soon. Per discussion in #26067, let’s be explicit about disabling it for the time being, and we can revisit the flag in the future if desirable.
This commit is contained in:
Adlai Holler 2021-06-17 16:11:40 -04:00 committed by GitHub
parent 29ea8111ac
commit 3aaa10d762
6 changed files with 16 additions and 2 deletions

View File

@ -39,6 +39,10 @@ sk_sp<GrDirectContext> ShellIOManager::CreateCompatibleResourceLoadingContext(
// ES2 shading language when the ES3 external image extension is missing.
options.fPreferExternalImagesOverES3 = true;
// Enabling this flag can increase VRAM consumption. Turn it off until
// further notice.
options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo;
#if !OS_FUCHSIA
if (auto context = GrDirectContext::MakeGL(gl_interface, options)) {
// Do not cache textures created by the image decoder. These textures

View File

@ -119,6 +119,7 @@ bool ShellTestPlatformViewVulkan::OffScreenSurface::CreateSkiaGrContext() {
}
PersistentCache::MarkStrategySet();
options.fPersistentCache = PersistentCache::GetCacheForProcess();
options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo;
sk_sp<GrDirectContext> context =
GrDirectContext::MakeVulkan(backend_context, options);

View File

@ -61,6 +61,9 @@ sk_sp<GrDirectContext> GPUSurfaceGL::MakeGLContext(
// TODO(goderbauer): remove option when skbug.com/7523 is fixed.
// A similar work-around is also used in shell/common/io_manager.cc.
options.fDisableGpuYUVConversion = true;
options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo;
auto context = GrDirectContext::MakeGL(delegate->GetGLInterface(), options);
if (!context) {

View File

@ -18,6 +18,7 @@ static GrContextOptions CreateMetalGrContextOptions() {
}
flutter::PersistentCache::MarkStrategySet();
options.fPersistentCache = flutter::PersistentCache::GetCacheForProcess();
options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo;
return options;
}

View File

@ -137,8 +137,10 @@ bool VulkanSurfaceProducer::Initialize(scenic::Session* scenic_session) {
backend_context.fPhysicalDevice, 0, nullptr,
countof(device_extensions), device_extensions);
backend_context.fVkExtensions = &vk_extensions;
GrContextOptions options;
options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo;
context_ = GrDirectContext::MakeVulkan(backend_context);
context_ = GrDirectContext::MakeVulkan(backend_context, options);
if (context_ == nullptr) {
FML_LOG(ERROR)

View File

@ -119,7 +119,10 @@ bool VulkanWindow::CreateSkiaGrContext() {
return false;
}
sk_sp<GrDirectContext> context = GrDirectContext::MakeVulkan(backend_context);
GrContextOptions options;
options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo;
sk_sp<GrDirectContext> context =
GrDirectContext::MakeVulkan(backend_context, options);
if (context == nullptr) {
return false;