Commit ec3c7700 authored by boliu@chromium.org's avatar boliu@chromium.org

[Android WebView] Do not block GetOffscreenContextProviderForMainThread

Before this, we fail create a main thread shared context if there are no
webviews in hardware initialized mode. The future plan is for
accelerated 2d canvas and webgl to use a shared context with the gpu
thread service, but keep inline video using the ui thread service.

Currently only video uses main thread context for webview, so for now,
only gate context creation for main video on having a
hardware-initalized webview. This makes turning on accelerated canvas
more convenient.

BUG=332146

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245613 0039d316-1c4b-4281-b951-d872f2087c98
parent eab6105d
......@@ -81,9 +81,8 @@ SynchronousCompositorFactoryImpl::GetOffscreenContextProviderForMainThread() {
// a compositor did successfully initialize hardware draw in the past.
// In particular this does not guarantee that the main thread context
// will fail creation when all compositors release hardware draw.
bool failed = !CanCreateMainThreadContext();
if (!failed &&
(!offscreen_context_for_main_thread_.get() ||
bool failed = false;
if ((!offscreen_context_for_main_thread_.get() ||
offscreen_context_for_main_thread_->DestroyedOnMainThread())) {
offscreen_context_for_main_thread_ =
webkit::gpu::ContextProviderInProcess::Create(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment