Revert "OzoneBacking over GLImageBacking for CrOS Ash"
This reverts commit 9fce2920e0
.
Reason for revert: Blocks CrOS release. See bug: https://b.corp.google.com/issues/210123493
https://b.corp.google.com/issues/210072986
Original change's description:
> OzoneBacking over GLImageBacking for CrOS Ash
>
> This change chooses OzoneBacking over GLImageBacking since OzoneBacking
> now supports creating shared images with both GMBs and pixel upload
> support.
>
> Bug: 1241537
> Change-Id: I0182a9744e22326eda5e2726d895a7a6a15b5808
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3301697
> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
> Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#948303}
Bug: 1285307, 1241537, b/210123493, b/213244572, b/210072986
Change-Id: I2b117dc46ccbdf2ea92b664764fb85ba10a83178
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3372078
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
Cr-Commit-Position: refs/heads/main@{#956556}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
47008db662
commit
812f81a668
@ -265,12 +265,6 @@ bool SharedImageBackingFactoryGLImage::IsSupported(
|
||||
*allow_legacy_mailbox = gr_context_type == GrContextType::kGL;
|
||||
return true;
|
||||
#else
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// On ChromeOS Ash, use only for SHARED_MEMORY gmb
|
||||
if (gmb_type != gfx::SHARED_MEMORY_BUFFER) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
// Doesn't support contexts other than GL for OOPR Canvas
|
||||
if (gr_context_type != GrContextType::kGL &&
|
||||
((usage & SHARED_IMAGE_USAGE_DISPLAY) ||
|
||||
@ -289,7 +283,6 @@ bool SharedImageBackingFactoryGLImage::IsSupported(
|
||||
// return false if it needs interop factory
|
||||
return false;
|
||||
}
|
||||
|
||||
*allow_legacy_mailbox = gr_context_type == GrContextType::kGL;
|
||||
return true;
|
||||
#endif
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "gpu/command_buffer/service/shared_image_backing_ozone.h"
|
||||
#include "gpu/command_buffer/service/shared_memory_region_wrapper.h"
|
||||
#include "gpu/vulkan/vulkan_device_queue.h"
|
||||
#include "ui/gfx/buffer_types.h"
|
||||
#include "ui/gfx/gpu_memory_buffer.h"
|
||||
#include "ui/gfx/native_pixmap.h"
|
||||
#include "ui/gl/buildflags.h"
|
||||
@ -190,6 +189,21 @@ bool SharedImageBackingFactoryOzone::IsSupported(
|
||||
gmb_type != gfx::SHARED_MEMORY_BUFFER) {
|
||||
return false;
|
||||
}
|
||||
// TODO(crbug.com/969114): Not all shared image factory implementations
|
||||
// support concurrent read/write usage.
|
||||
if (usage & SHARED_IMAGE_USAGE_CONCURRENT_READ_WRITE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO(hitawala): Until SharedImageBackingOzone supports all use cases prefer
|
||||
// using SharedImageBackingGLImage instead
|
||||
bool needs_interop_factory = (gr_context_type == GrContextType::kVulkan &&
|
||||
(usage & SHARED_IMAGE_USAGE_DISPLAY)) ||
|
||||
(usage & SHARED_IMAGE_USAGE_WEBGPU) ||
|
||||
(usage & SHARED_IMAGE_USAGE_VIDEO_DECODE);
|
||||
if (!needs_interop_factory) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*allow_legacy_mailbox = false;
|
||||
return true;
|
||||
|
@ -251,9 +251,12 @@ SharedImageFactory::SharedImageFactory(
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
auto ozone_factory =
|
||||
std::make_unique<SharedImageBackingFactoryOzone>(context_state);
|
||||
factories_.push_back(std::move(ozone_factory));
|
||||
if (gpu_preferences.enable_webgpu ||
|
||||
gr_context_type_ == GrContextType::kVulkan) {
|
||||
auto ozone_factory =
|
||||
std::make_unique<SharedImageBackingFactoryOzone>(context_state);
|
||||
factories_.push_back(std::move(ozone_factory));
|
||||
}
|
||||
#endif // IS_CHROMEOS_ASH
|
||||
|
||||
#if defined(OS_FUCHSIA)
|
||||
|
@ -217,6 +217,7 @@ SharedImageRepresentationGLTexturePassthroughOzone::Create(
|
||||
GLuint internal_format = image->GetInternalFormat();
|
||||
GLenum gl_format = image->GetDataFormat();
|
||||
GLenum gl_type = image->GetDataType();
|
||||
|
||||
scoped_refptr<gles2::TexturePassthrough> texture_passthrough =
|
||||
base::MakeRefCounted<gpu::gles2::TexturePassthrough>(
|
||||
*gl_texture_service_id, target, internal_format,
|
||||
|
Reference in New Issue
Block a user