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

viz: CHECK that ScopedSkiaWriteAccess is defined

On Chrome OS, we're seeing a relatively rare crash on submitting an
SkiaOutputDeviceBufferQueue::Submit [1]. The stack trace from the
crashes is pretty inconclusive (no real line number). After looking
at the code, I suspect it's because ScopedSkiaWriteAccess is null,
but I'd like to upgrade the DCHECK to a CHECK here to confirm.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1156158

Bug: 1156158
Change-Id: Ibacc53efed6a2fe899afb408692e87314ef98d0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643485Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845866}
parent 4a0c8c91
...@@ -108,7 +108,16 @@ void OutputPresenter::Image::EndWriteSkia() { ...@@ -108,7 +108,16 @@ void OutputPresenter::Image::EndWriteSkia() {
} }
void OutputPresenter::Image::PreGrContextSubmit() { void OutputPresenter::Image::PreGrContextSubmit() {
// TODO(crbug.com/1169364): On Chrome OS, this function crashes rarely
// (~1 CPM) and is hard to reproduce. The suspected root cause is 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_); DCHECK(scoped_skia_write_access_);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
if (scoped_skia_write_access_->end_state()) { if (scoped_skia_write_access_->end_state()) {
scoped_skia_write_access_->surface()->flush( scoped_skia_write_access_->surface()->flush(
{}, scoped_skia_write_access_->end_state()); {}, scoped_skia_write_access_->end_state());
......
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