Commit e3b5d5ac authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Limit Qcomm tiled rendering workaround to webview.

The crashes which we suspect are related to this extension are present
only on webview.

R=boliu@chromium.org,zmo@chromium.org

Bug: 1042615,1055629
Change-Id: I7f797753fde7520e5919c99e026f0a4e90f5d43d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080780
Commit-Queue: Khushal <khushalsagar@chromium.org>
Auto-Submit: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745740}
parent 4bcc0a68
......@@ -184,9 +184,18 @@ void SharedContextState::InitializeGrContext(
if (GrContextIsGL()) {
DCHECK(context_->IsCurrent(nullptr));
std::vector<const char*> blacklisted_extensions;
constexpr char kQualcommTiledRendering[] = "GL_QCOM_tiled_rendering";
// We rely on |enable_threaded_texture_mailboxes| to limit the
// workaround to webview only.
if (workarounds.disable_qcomm_tiled_rendering &&
gpu_preferences.enable_threaded_texture_mailboxes) {
blacklisted_extensions.push_back(kQualcommTiledRendering);
}
sk_sp<GrGLInterface> interface(gl::init::CreateGrGLInterface(
*context_->GetVersionInfo(), workarounds.use_es2_for_oopr,
progress_reporter));
progress_reporter, blacklisted_extensions));
if (!interface) {
LOG(ERROR) << "OOP raster support disabled: GrGLInterface creation "
"failed.";
......
......@@ -3543,6 +3543,18 @@
"features": [
"use_empty_video_hdr_metadata"
]
},
{
"id": 333,
"cr_bugs": [1042615],
"description": "Disable Qcomm_tiled_rendering extension for webview",
"os": {
"type": "android"
},
"gl_vendor": "Qualcomm.*",
"features": [
"disable_qcomm_tiled_rendering"
]
}
]
}
......@@ -40,6 +40,7 @@ disable_post_sub_buffers_for_onscreen_surfaces
disable_program_cache
disable_program_caching_for_transform_feedback
disable_program_disk_cache
disable_qcomm_tiled_rendering
disable_software_to_accelerated_canvas_upgrade
disable_texture_cube_map_seamless
disable_texture_storage
......
......@@ -208,7 +208,6 @@ const char* kBlacklistExtensions[] = {
"GL_NV_bindless_texture",
"GL_NV_texture_barrier",
"GL_OES_sample_shading",
"GL_QCOM_tiled_rendering",
};
} // anonymous namespace
......@@ -216,7 +215,8 @@ const char* kBlacklistExtensions[] = {
sk_sp<GrGLInterface> CreateGrGLInterface(
const gl::GLVersionInfo& version_info,
bool use_version_es2,
gl::ProgressReporter* progress_reporter) {
gl::ProgressReporter* progress_reporter,
std::vector<const char*> blacklisted_extensions) {
// Can't fake ES with desktop GL.
use_version_es2 &= version_info.is_es;
......@@ -268,6 +268,8 @@ sk_sp<GrGLInterface> CreateGrGLInterface(
}
for (const char* extension : kBlacklistExtensions)
extensions.remove(extension);
for (const char* extension : blacklisted_extensions)
extensions.remove(extension);
GrGLInterface* interface = new GrGLInterface();
GrGLInterface::Functions* functions = &interface->fFunctions;
......
......@@ -5,6 +5,8 @@
#ifndef UI_GL_INIT_CREATE_GR_GL_INTERFACE_H_
#define UI_GL_INIT_CREATE_GR_GL_INTERFACE_H_
#include <vector>
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
#include "ui/gl/init/gl_init_export.h"
......@@ -22,7 +24,8 @@ namespace init {
GL_INIT_EXPORT sk_sp<GrGLInterface> CreateGrGLInterface(
const gl::GLVersionInfo& version_info,
bool use_version_es2,
gl::ProgressReporter* progress_reporter = nullptr);
gl::ProgressReporter* progress_reporter = nullptr,
std::vector<const char*> blacklisted_extensions = {});
} // namespace init
} // namespace gl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment