Commit 6602b8d0 authored by Khushal's avatar Khushal Committed by Commit Bot

Revert "gpu: Disable AImageReader for ARM GPUs on Android P and below."

This reverts commit 56d27fb4.

Reason for revert: This was a temporarily landed as a safer merge
candidate for M81. The long term fix for the bug has already landed.

Original change's description:
> gpu: Disable AImageReader for ARM GPUs on Android P and below.
> 
> This change adds a temporary workaround to effectively revert the
> following changes. While the long term fix for this bug has landed, it
> might be too risky to merge to M81. So this change reverts enabling of
> AImageReader on these GPUs, to restore the behaviour prior to M80.
> 
> Reverted changes:
> https://chromium-review.googlesource.com/c/chromium/src/+/2015553
> https://chromium-review.googlesource.com/c/chromium/src/+/1873393
> 
> TBR=nyquist@chromium.org
> R=​dalecurtis@chromium.org
> 
> Bug: 1051705
> Change-Id: I2f7f0828c8ba4a7279c2f6bb95de449402d88f92
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087987
> Commit-Queue: Khushal <khushalsagar@chromium.org>
> Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#747355}

TBR=dalecurtis@chromium.org,nyquist@chromium.org,khushalsagar@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1051705
Change-Id: I97c4e3198a3581fc3c437894c0be57681d4d80fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107807Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751247}
parent 56a96e56
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
namespace base { namespace base {
namespace android { namespace android {
bool AndroidImageReader::disable_support_ = false;
AndroidImageReader& AndroidImageReader::GetInstance() { AndroidImageReader& AndroidImageReader::GetInstance() {
// C++11 static local variable initialization is // C++11 static local variable initialization is
// thread-safe. // thread-safe.
...@@ -31,12 +29,8 @@ AndroidImageReader& AndroidImageReader::GetInstance() { ...@@ -31,12 +29,8 @@ AndroidImageReader& AndroidImageReader::GetInstance() {
return *instance; return *instance;
} }
void AndroidImageReader::DisableSupport() {
disable_support_ = true;
}
bool AndroidImageReader::IsSupported() { bool AndroidImageReader::IsSupported() {
return !disable_support_ && is_supported_; return is_supported_;
} }
AndroidImageReader::AndroidImageReader() { AndroidImageReader::AndroidImageReader() {
......
...@@ -22,9 +22,6 @@ class BASE_EXPORT AndroidImageReader { ...@@ -22,9 +22,6 @@ class BASE_EXPORT AndroidImageReader {
// Thread safe GetInstance. // Thread safe GetInstance.
static AndroidImageReader& GetInstance(); static AndroidImageReader& GetInstance();
// Disable image reader support.
static void DisableSupport();
// Check if the image reader usage is supported. This function returns TRUE // Check if the image reader usage is supported. This function returns TRUE
// if android version is >=OREO, image reader support is not disabled and all // if android version is >=OREO, image reader support is not disabled and all
// the required functions are loaded. // the required functions are loaded.
...@@ -67,7 +64,6 @@ class BASE_EXPORT AndroidImageReader { ...@@ -67,7 +64,6 @@ class BASE_EXPORT AndroidImageReader {
AndroidImageReader(); AndroidImageReader();
bool LoadFunctions(); bool LoadFunctions();
static bool disable_support_;
bool is_supported_; bool is_supported_;
pAImage_delete AImage_delete_; pAImage_delete AImage_delete_;
pAImage_deleteAsync AImage_deleteAsync_; pAImage_deleteAsync AImage_deleteAsync_;
......
...@@ -3568,22 +3568,6 @@ ...@@ -3568,22 +3568,6 @@
"dont_delete_source_texture_for_egl_image" "dont_delete_source_texture_for_egl_image"
] ]
}, },
{
"id":335,
"cr_bugs": [1051705],
"description": "Disable AImageReader on ARM GPUs",
"os": {
"type": "android",
"version": {
"op": "<",
"value": "10"
}
},
"gl_vendor": "ARM.*",
"features": [
"disable_aimagereader"
]
},
{ {
"id": 336, "id": 336,
"cr_bugs": [625785], "cr_bugs": [625785],
......
...@@ -13,7 +13,6 @@ decode_encode_srgb_for_generatemipmap ...@@ -13,7 +13,6 @@ decode_encode_srgb_for_generatemipmap
depth_stencil_renderbuffer_resize_emulation depth_stencil_renderbuffer_resize_emulation
disable_2d_canvas_auto_flush disable_2d_canvas_auto_flush
disable_accelerated_vpx_decode disable_accelerated_vpx_decode
disable_aimagereader
disable_async_readpixels disable_async_readpixels
disable_av_sample_buffer_display_layer disable_av_sample_buffer_display_layer
disable_blend_equation_advanced disable_blend_equation_advanced
......
...@@ -524,12 +524,6 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, ...@@ -524,12 +524,6 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
ui::OzonePlatform::GetInstance()->AfterSandboxEntry(); ui::OzonePlatform::GetInstance()->AfterSandboxEntry();
#endif #endif
#if defined(OS_ANDROID)
// Disable AImageReader if the workaround is enabled.
if (gpu_feature_info_.IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
base::android::AndroidImageReader::DisableSupport();
}
#endif
#if defined(USE_OZONE) #if defined(USE_OZONE)
gpu_feature_info_.supported_buffer_formats_for_allocation_and_texturing = gpu_feature_info_.supported_buffer_formats_for_allocation_and_texturing =
std::move(supported_buffer_formats_for_texturing); std::move(supported_buffer_formats_for_texturing);
...@@ -556,11 +550,6 @@ void GpuInit::InitializeInProcess(base::CommandLine* command_line, ...@@ -556,11 +550,6 @@ void GpuInit::InitializeInProcess(base::CommandLine* command_line,
default_offscreen_surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size()); default_offscreen_surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size());
// Disable AImageReader if the workaround is enabled.
if (gpu_feature_info_.IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
base::android::AndroidImageReader::DisableSupport();
}
UMA_HISTOGRAM_ENUMERATION("GPU.GLImplementation", gl::GetGLImplementation()); UMA_HISTOGRAM_ENUMERATION("GPU.GLImplementation", gl::GetGLImplementation());
} }
#else #else
......
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