Commit 1ab7f5d8 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Add check to investigate the zero size host window

Bug: 1041932,1034876
Change-Id: I82d2919b2c35e93384443cd8cfe0677d3a50cb48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007481Reviewed-by: default avatarSaman Sami <samans@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733810}
parent 0bd5b1a3
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include "base/macros.h" #include "base/macros.h"
#include "cc/trees/layer_tree_frame_sink.h" #include "cc/trees/layer_tree_frame_sink.h"
#include "components/exo/layer_tree_frame_sink_holder.h" #include "components/exo/layer_tree_frame_sink_holder.h"
#include "components/exo/shell_surface_base.h"
#include "components/exo/shell_surface_util.h"
#include "components/exo/surface.h" #include "components/exo/surface.h"
#include "components/exo/wm_helper.h" #include "components/exo/wm_helper.h"
#include "components/viz/common/quads/compositor_frame.h" #include "components/viz/common/quads/compositor_frame.h"
...@@ -17,6 +19,7 @@ ...@@ -17,6 +19,7 @@
#include "components/viz/common/quads/solid_color_draw_quad.h" #include "components/viz/common/quads/solid_color_draw_quad.h"
#include "gpu/command_buffer/client/gles2_interface.h" #include "gpu/command_buffer/client/gles2_interface.h"
#include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPath.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/aura/window_delegate.h" #include "ui/aura/window_delegate.h"
...@@ -212,6 +215,21 @@ void SurfaceTreeHost::OnLostSharedContext() { ...@@ -212,6 +215,21 @@ void SurfaceTreeHost::OnLostSharedContext() {
void SurfaceTreeHost::SubmitCompositorFrame() { void SurfaceTreeHost::SubmitCompositorFrame() {
viz::CompositorFrame frame = PrepareToSubmitCompositorFrame(); viz::CompositorFrame frame = PrepareToSubmitCompositorFrame();
// TODO(1041932,1034876): Remove or early return once these issues
// are fixed or identified.
if (frame.size_in_pixels().IsEmpty()) {
aura::Window* toplevel = root_surface_->window()->GetToplevelWindow();
auto app_type = toplevel->GetProperty(aura::client::kAppType);
const std::string* app_id = GetShellApplicationId(toplevel);
const std::string* startup_id = GetShellStartupId(toplevel);
auto* shell_surface = GetShellSurfaceBaseForWindow(toplevel);
DCHECK(!frame.size_in_pixels().IsEmpty())
<< " Title=" << shell_surface->GetWindowTitle()
<< ", AppType=" << static_cast<int>(app_type)
<< ", AppId=" << (app_id ? *app_id : "''")
<< ", StartupId=" << (startup_id ? *startup_id : "''");
}
root_surface_->AppendSurfaceHierarchyCallbacks(&frame_callbacks_, root_surface_->AppendSurfaceHierarchyCallbacks(&frame_callbacks_,
&presentation_callbacks_); &presentation_callbacks_);
if (!presentation_callbacks_.empty()) { if (!presentation_callbacks_.empty()) {
......
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