Commit 37bbe2fd authored by Bo Liu's avatar Bo Liu Committed by Chromium LUCI CQ

Remove legacy mailbox fallback

The fallback was to make skia renderer work without shared images.
This is not a configuration we ship to users, and looks like it's
already broken anyway.

Remove the fallback path, which is triggering a NOTREACHED in
tests when there are shared image errors.

Bug: 1153376
Change-Id: I9eae48576d43fc692fcd6ae40ed44e960a2f2914
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2564950Reviewed-by: default avatarVasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832375}
parent fd4ab39c
......@@ -6,6 +6,7 @@
#include <utility>
#include "build/build_config.h"
#include "components/viz/common/resources/resource_format_utils.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
......@@ -102,11 +103,20 @@ void ImageContextImpl::BeginAccessIfNecessary(
std::vector<GrBackendSemaphore>* begin_semaphores,
std::vector<GrBackendSemaphore>* end_semaphores) {
// Prepare for accessing shared image.
if (mailbox_holder().mailbox.IsSharedImage() &&
BeginAccessIfNecessaryForSharedImage(context_state,
representation_factory,
begin_semaphores, end_semaphores)) {
return;
if (mailbox_holder().mailbox.IsSharedImage()) {
constexpr bool allow_legacy_mailbox_fallback =
#if defined(OS_ANDROID)
false;
#else
true;
#endif
bool result = BeginAccessIfNecessaryForSharedImage(
context_state, representation_factory, begin_semaphores,
end_semaphores);
if (!result && !allow_legacy_mailbox_fallback) {
CreateFallbackImage(context_state);
return;
}
}
// Prepare for accessing legacy mailbox.
......
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