Commit 5ebb11b2 authored by Saman Sami's avatar Saman Sami Committed by Commit Bot

Add DumpWithoutCrashing() to CompositorFrame's mojom traits

We seem to continuously have issues with clients not setting up the root
render pass correctly. Add a DumpWithoutCrashing should help us
investigate such issues when they arise.

Bug: 1034876
Change-Id: I9818b83b0ca785483365856c7044edf871a09321
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1980791Reviewed-by: default avatarMatthew Denton <mpdenton@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727331}
parent d779df6f
......@@ -7,6 +7,7 @@
#include <vector>
#include "base/debug/dump_without_crashing.h"
#include "components/viz/common/quads/compositor_frame.h"
#include "services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h"
#include "services/viz/public/cpp/compositing/render_pass_mojom_traits.h"
......@@ -30,6 +31,13 @@ struct StructTraits<viz::mojom::CompositorFrameDataView, viz::CompositorFrame> {
static const viz::RenderPassList& passes(const viz::CompositorFrame& input) {
DCHECK(!input.render_pass_list.empty());
DCHECK(!input.render_pass_list.back()->output_rect.size().IsEmpty());
// We seem to continuously have issues with clients not setting up the root
// render pass correctly. This DumpWithoutCrashing should help us catch
// regressions.
if (input.render_pass_list.empty() ||
input.render_pass_list.back()->output_rect.size().IsEmpty()) {
base::debug::DumpWithoutCrashing();
}
return input.render_pass_list;
}
......
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