Delete OnscreenDisplayClient and TopLevelDisplayClient.

These classes just own Display and forward along the client calls to
the owner of themselves. Instead, have code own a cc::Display directly.

Part of this reworks how OutputSurface gets to the Display. Previously
the OnscreenDisplayClient would hold the OutputSurface created during
creation of the delegated OutputSurface to be given to the compositor.
But it wouldn't be given to the Display until the compositor bound the
delegated OutputSurface from LayerTreeHostImpl.

Now, we give the display's OutputSurface to it at construction time of
the Display. The Display will continue to bind it when it is
Initialize()'d by the delegated output surface in the compositor being
bound. However, now the DisplayClient (the delegated OutputSurface) is
created after the Display is, since it wants to have a pointer to the
Display. So we give the DisplayClient to the Display at the time of
Initialize().

Lastly, SurfaceDisplayOutputSurface was doing some shady things to avoid
binding the lost context callback on the shared context provider (shared
between the compositor's delegated and the display's OutputSurface) more
that once. It would avoid calling OutputSurface::BindToClient() and
implemented it partially itself. I changed this to call the parent but
just unset the callback with a comment explaining that we want it to go
to the Display (via its own OutputSurface) first, so we have it set up
the callback (which happens in Initialize).

The point of this whole thing was to work on merging the two delegated-
to-a-display output surface implementations: SurfaceDisplayOutputSurface
and PixelTestDelegatingOutputSurface. In the end this doesn't appear
feasible since the PixelTestDelegatingOutputSurface is meant for the
renderer, which can have a threaded compositor. In that case, the
Display, SurfaceManager, etc should be created, used and destroyed on the
compositor thread since they are not threadsafe. At least hopefully this
makes ownership more clear.

R=enne@chromium.org, fsamuel@chromium.org, jbauman@chromium.org, sievers@chromium.org
BUG=487471
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2036563002
Cr-Commit-Position: refs/heads/master@{#399348}
26 files changed