Commit 7cdcec8b authored by Vasiliy Telezhnikov's avatar Vasiliy Telezhnikov Committed by Commit Bot

aw: Allow blocking on viz process for webview

This CL adds exception for VizCompositorThreadRunnerWebView to use base
sync primitives to allow blocking UI/Android Renderer thread on viz
thread for viz for webview implementation.

Bug: 805739
Change-Id: I25d6b7494d6b722f1f1d1c6faaff84b552279d06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911386Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714679}
parent dee76339
...@@ -80,6 +80,7 @@ void VizCompositorThreadRunnerWebView::ScheduleOnVizAndBlock( ...@@ -80,6 +80,7 @@ void VizCompositorThreadRunnerWebView::ScheduleOnVizAndBlock(
void VizCompositorThreadRunnerWebView::PostTaskAndBlock( void VizCompositorThreadRunnerWebView::PostTaskAndBlock(
const base::Location& from_here, const base::Location& from_here,
base::OnceClosure task) { base::OnceClosure task) {
base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope allow_wait;
base::WaitableEvent e; base::WaitableEvent e;
task_runner()->PostTask(from_here, task_runner()->PostTask(from_here,
base::BindOnce(&RunAndSignal, std::move(task), &e)); base::BindOnce(&RunAndSignal, std::move(task), &e));
......
...@@ -105,6 +105,7 @@ namespace android_webview { ...@@ -105,6 +105,7 @@ namespace android_webview {
class AwFormDatabaseService; class AwFormDatabaseService;
class CookieManager; class CookieManager;
class ScopedAllowInitGLBindings; class ScopedAllowInitGLBindings;
class VizCompositorThreadRunnerWebView;
} }
namespace audio { namespace audio {
class OutputDevice; class OutputDevice;
...@@ -461,6 +462,7 @@ class BASE_EXPORT ScopedAllowBaseSyncPrimitivesOutsideBlockingScope { ...@@ -461,6 +462,7 @@ class BASE_EXPORT ScopedAllowBaseSyncPrimitivesOutsideBlockingScope {
friend class android_webview:: friend class android_webview::
AwFormDatabaseService; // http://crbug.com/904431 AwFormDatabaseService; // http://crbug.com/904431
friend class android_webview::CookieManager; friend class android_webview::CookieManager;
friend class android_webview::VizCompositorThreadRunnerWebView;
friend class audio::OutputDevice; friend class audio::OutputDevice;
friend class base::sequence_manager::internal::TaskQueueImpl; friend class base::sequence_manager::internal::TaskQueueImpl;
friend class base::FileDescriptorWatcher; friend class base::FileDescriptorWatcher;
......
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