aw: Avoid uncontrolled video context destruction
commitcb81131b553176b309d89610f06d2b0534964d3b
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 22 Aug 2014 22:17:08 +0000 (22 22:17 +0000)
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 22 Aug 2014 22:19:30 +0000 (22 22:19 +0000)
treefbbeda920ed516e64ab0824a1c3226c106c7211f
parent10288a72248cfb00d8b4ca92b0077c051fc7edf6
aw: Avoid uncontrolled video context destruction

Since r289474, the sync factory nulls out the video context
which means the destruction is uncontrolled. Context
destruction is synchronous, so can cause deadlocks if there
are not webviews attached to view tree to run GL.

This is a rewrite of r289474 that just returns null
VideoContextProvider if no webview is ready to use it. But
still hold on to the reference to the context to avoid
destruction.

BUG=403882

Review URL: https://codereview.chromium.org/498623002

Cr-Commit-Position: refs/heads/master@{#291527}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291527 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/android/in_process/synchronous_compositor_factory_impl.cc