diff options
author | sky <sky@chromium.org> | 2015-11-12 08:28:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-12 16:29:10 +0000 |
commit | 5f5bb99c1edfdbbe991b4f2f3146a7e9bac24c2d (patch) | |
tree | 258ee781017081c19bb2c5f9e4ee911b3b4b3f69 /components/mus/ws/connection_manager.cc | |
parent | b8e26c7657eaa460a1646e51efa13f9abf5deeab (diff) | |
download | chromium_src-5f5bb99c1edfdbbe991b4f2f3146a7e9bac24c2d.zip chromium_src-5f5bb99c1edfdbbe991b4f2f3146a7e9bac24c2d.tar.gz chromium_src-5f5bb99c1edfdbbe991b4f2f3146a7e9bac24c2d.tar.bz2 |
Fixes flicker during resize
The problem happens because when the top level frame is submitted all
the resources are not used until the frame is actually drawn. This
means if between the time we submit the topmost frame and the frame is
drawn we destroy a surface that was referenced in the frame then you
get an empty quad.
The fix is to detect when we're in this state and delay destruction
until the frame is drawn.
BUG=none
TEST=none
R=fsamuel@chromium.org
Review URL: https://codereview.chromium.org/1436033002
Cr-Commit-Position: refs/heads/master@{#359328}
Diffstat (limited to 'components/mus/ws/connection_manager.cc')
-rw-r--r-- | components/mus/ws/connection_manager.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/mus/ws/connection_manager.cc b/components/mus/ws/connection_manager.cc index 5f320d9..5b103d8 100644 --- a/components/mus/ws/connection_manager.cc +++ b/components/mus/ws/connection_manager.cc @@ -370,6 +370,15 @@ const ServerWindow* ConnectionManager::GetRootWindow( return host ? host->root_window() : nullptr; } +void ConnectionManager::ScheduleSurfaceDestruction(ServerWindow* window) { + for (auto& pair : host_connection_map_) { + if (pair.first->root_window()->Contains(window)) { + pair.first->ScheduleSurfaceDestruction(window); + break; + } + } +} + void ConnectionManager::OnWindowDestroyed(ServerWindow* window) { if (!in_destructor_) ProcessWindowDeleted(window->id()); |