Commit 95830a93 authored by Brian Ho's avatar Brian Ho Committed by Chromium LUCI CQ

viz: Add more logging around scoped_skia_write_access_

This CL adds some more logging around scoped_skia_write_access_ since
we suspect that it being null causes a rare crash on Chrome OS. The
member can be null for a number of reasons, so let's add some LOGs
after each.

This crash also happens rarely on Android which also uses the
BufferQueue output surface, so these logging statements can probably
help there as well.

Bug: 1169364
Change-Id: Ia61510da3b8fb92166aed1edbb3bd33a262378d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645151Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846361}
parent e1d53c3c
......@@ -63,7 +63,15 @@ void OutputPresenter::Image::BeginWriteSkia() {
0 /* final_msaa_count */, surface_props, &begin_semaphores,
&end_semaphores_,
gpu::SharedImageRepresentation::AllowUnclearedAccess::kYes);
// TODO(crbug.com/1169364): On Chrome OS, we get a rare crash that's
// suspected to be from a null |scoped_skia_write_access_|, but the crash
// stack traces are a bit too mangled to confirm. For better logging,
// promote the DCHECK to a CHECK until we figure out the root cause.
#if BUILDFLAG(IS_CHROMEOS_ASH)
CHECK(scoped_skia_write_access_);
#else
DCHECK(scoped_skia_write_access_);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
if (!begin_semaphores.empty()) {
scoped_skia_write_access_->surface()->wait(
begin_semaphores.size(),
......
......@@ -137,8 +137,10 @@ SharedImageRepresentationSkia::BeginScopedWriteAccess(
sk_sp<SkSurface> surface =
BeginWriteAccess(final_msaa_count, surface_props, begin_semaphores,
end_semaphores, &end_state);
if (!surface)
if (!surface) {
LOG(ERROR) << "Unable to initialize SkSurface";
return nullptr;
}
backing()->OnWriteSucceeded();
......@@ -148,8 +150,10 @@ SharedImageRepresentationSkia::BeginScopedWriteAccess(
}
sk_sp<SkPromiseImageTexture> promise_image_texture =
BeginWriteAccess(begin_semaphores, end_semaphores, &end_state);
if (!promise_image_texture)
if (!promise_image_texture) {
LOG(ERROR) << "Unable to initialize SkPromiseImageTexture";
return nullptr;
}
backing()->OnWriteSucceeded();
......
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