cc: Fix incorrect LTHI shutdown logic

It's possible that if there has never been an activation (implying no root
layer on the active tree), then the trees will not be cleared during
LayerTreeHostImpl's destructor.  Given the comment in the destructor about
animation, this seems to be problematic enough.

Issue 251722 is about a case where the tile manager tries to activate the tree
during its destruction but because the trees haven't been cleared yet, it
thinks this is a supported operation.  This is fixed by always destroying the
trees in the destructor.

Related cleanup is to remove the CleanupRenderSurfaces() call which isn't
needed there.  When you destroy a tree, you destroy its render surfaces.  And,
it looked like none of the other CleanupRenderSurfaces() calls were really
needed either except for losing the output surface, so one call got moved there
and all the rest of the functions got removed.

[email protected]
BUG=251722

Review URL: https://chromiumcodereview.appspot.com/16831016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209242 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed