Commit 5ef7ed0c authored by Vasiliy Telezhnikov's avatar Vasiliy Telezhnikov Committed by Commit Bot

aw: Check for HasActiveFrame before getting frame

WebView/GLRenderer checks active frame of child surface for backdrop
filters to decide if merging SurfaceQuad is possible. If surface doesn't
have active frame it will fail CHECK.

This CL adds guard if the surface has active frame before retrieving to
prevent crashing.

Bug: 1100340
Change-Id: Ia02cead1c2195ba738ad19cf99db83b10669c948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2300323Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788751}
parent 86b20480
...@@ -290,6 +290,10 @@ bool SurfacesInstance::BackdropFiltersPreventMerge( ...@@ -290,6 +290,10 @@ bool SurfacesInstance::BackdropFiltersPreventMerge(
// in the cases listed above. crbug.com/996434 // in the cases listed above. crbug.com/996434
const viz::Surface* surface = const viz::Surface* surface =
frame_sink_manager_->surface_manager()->GetSurfaceForId(surface_id); frame_sink_manager_->surface_manager()->GetSurfaceForId(surface_id);
if (!surface || !surface->HasActiveFrame())
return false;
const auto& frame = surface->GetActiveFrame(); const auto& frame = surface->GetActiveFrame();
base::flat_set<viz::RenderPassId> backdrop_filter_passes; base::flat_set<viz::RenderPassId> backdrop_filter_passes;
for (const auto& render_pass : frame.render_pass_list) { for (const auto& render_pass : frame.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