ozone/wayland: Reuse tooltip subsurfaces

This patch modifies WaylandWindow so that it reuses
tooltip subsurfaces instead of recreating/destroying them
every time show/hide functions are called.
This change aims to boost performance of tooltips creation
since we avoid recreating subsurfaces so frequently.
Additionally, this avoids crashing compositors such as Sway
[1], which is getting pretty popular and is known to have
buggy implementation of subsurfaces handling [2]. For example,
some sway crashes have been observed after focus -> unfocus ->
focus again buttons with tooltips for example. This kind of issue
haven't been observed anymore after this change.

[1] https://swaywm.org
[2] https://github.com/swaywm/sway/issues/3195

Bug: 578890
Change-Id: Ic27fb491c446f30f3d60633f4216b56799463896
Reviewed-on: https://chromium-review.googlesource.com/c/1466063
Commit-Queue: Nick Diego Yamane <nickdiego@igalia.com>
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#631605}
2 files changed