mac: ensure ui::Compositor exists for visible RWHVs

RenderWidgetHostViewMac is careful about creating ui::Compositor and so
currently only does this in Show and SwapCompositorFrame.  However, if
it the RenderWidgetHostView is created while the RenderWidgetHost is
visible, then Show will early out and never create a ui::Compositor.

This causes problems with begin frame scheduling, which wants to have
the Display (which is created as part of creating the ui::Compositor's
output surface currently) own the real begin frame source that drives
everything.  In that world, if no ui::Compositor exists, no frames ever
are sent or swapped.  So, the ui::Compositor needs to be created first.

To avoid issues where there's inconsistencies between host impl hidden
state and browser compositor existence, always ensure that the browser
compositor exists in ::Show.

R=asvitkine@chromium.org,ccameron@chromium.org

Review-Url: https://codereview.chromium.org/2005013002
Cr-Commit-Position: refs/heads/master@{#401133}
7 files changed