[gpu] Update conditionals for disable_one_component_textures capability
Update conditionals for disable_one_component_textures capability to check for EGL image workaround and if display compositor is on another thread for GL backend and if display compositor is on another thread without DrDC for vulkan backend. Bug: 350916904 Change-Id: Ib10acaeb4d482ece1d04c8cbf8605b0240f4f846 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6373745 Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Cr-Commit-Position: refs/heads/main@{#1435732}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d86d587ed6
commit
899d7f9af8
@ -149,6 +149,12 @@ BASE_FEATURE(kGpuYieldRasterization,
|
||||
"GpuYieldRasterization",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
// Controls how one component textures are supported over raster decoder for
|
||||
// VideoResourceUpdater.
|
||||
BASE_FEATURE(kDisableOneComponentTextureConditionally,
|
||||
"DisableOneComponentTextureConditionally",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// Controls how many ops are rastered before checking if we should yield.
|
||||
const base::FeatureParam<int> kGpuYieldRasterizationOpCount(
|
||||
&kGpuYieldRasterization,
|
||||
@ -1182,11 +1188,27 @@ Capabilities RasterDecoderImpl::GetCapabilities() {
|
||||
feature_info()->feature_flags().chromium_image_ycbcr_p010;
|
||||
caps.render_buffer_format_bgra8888 =
|
||||
feature_info()->feature_flags().ext_render_buffer_format_bgra8888;
|
||||
// Vulkan currently doesn't support single-component cross-thread shared
|
||||
// images.
|
||||
caps.disable_one_component_textures =
|
||||
workarounds().avoid_one_component_egl_images ||
|
||||
(display_context_on_another_thread_ && features::IsUsingVulkan());
|
||||
|
||||
if (base::FeatureList::IsEnabled(kDisableOneComponentTextureConditionally)) {
|
||||
if (shared_context_state_->GrContextIsGL()) {
|
||||
caps.disable_one_component_textures =
|
||||
display_context_on_another_thread_ &&
|
||||
workarounds().avoid_one_component_egl_images;
|
||||
} else if (shared_context_state_->GrContextIsVulkan() ||
|
||||
shared_context_state_->IsGraphiteDawnVulkan()) {
|
||||
// Vulkan currently doesn't support single-component cross-thread shared
|
||||
// images for WebView.
|
||||
const bool is_drdc = features::IsDrDcEnabled() &&
|
||||
!feature_info()->workarounds().disable_drdc;
|
||||
caps.disable_one_component_textures =
|
||||
display_context_on_another_thread_ && !is_drdc;
|
||||
}
|
||||
} else {
|
||||
caps.disable_one_component_textures =
|
||||
workarounds().avoid_one_component_egl_images ||
|
||||
(display_context_on_another_thread_ && features::IsUsingVulkan());
|
||||
}
|
||||
|
||||
caps.angle_rgbx_internal_format =
|
||||
feature_info()->feature_flags().angle_rgbx_internal_format;
|
||||
caps.chromium_gpu_fence = feature_info()->feature_flags().chromium_gpu_fence;
|
||||
|
Reference in New Issue
Block a user