Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Issue 12356002: [NOT FOR COMMIT] Hacks to merge render compositor thread with UI thread (Closed)

Created:
7 years, 9 months ago by boliu
Modified:
7 years, 7 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Visibility:
Public.

Description

[NOT FOR COMMIT] Hacks to merge render compositor thread with UI thread Alex is right, this does mostly "just work" Hacks involved: * Allow UI thread to wait on condition variables. Individual fixes in PS2. Alex says the command buffer will be rewritten for the merged thread case to not block. * Do not create a SyncChannel. This breaks all function related to sync messages like find in page, capture picture etc. Depreate sync find in page, capture picture will be rewritten for merged thread case. Here is a hang/deadlock somewhere. Easier to reproduce with AwSettingsTest#testBlockNetworkImagesBlocksNetworkImageAndReloadInPlace; hangs about once every 20 runs. To get merged threads: Apply Patch Set 3 in this patch Failing with timeout: ClientOnReceivedErrorTest#testOnReceivedErrorOnInvalidUrl Already landed patches: Apply crrev.com/12386078 Apply crrev.com/12383056 Apply crrev.com/12639002 Apply crrev.com/12383030 BUG=

Patch Set 1 #

Total comments: 1

Patch Set 2 : New thread restriction allows (incomplete patch) #

Total comments: 10

Patch Set 3 : Remaining hacks #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M android_webview/browser/renderer_host/view_renderer_host.cc View 2 1 chunk +2 lines, -2 lines 0 comments Download
M android_webview/lib/main/aw_main_delegate.cc View 1 2 1 chunk +3 lines, -0 lines 2 comments Download
M content/browser/browser_main_loop.cc View 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
boliu
Building android to see how this actually works in apps https://codereview.chromium.org/12356002/diff/1/chrome/browser/metrics/thread_watcher.h File chrome/browser/metrics/thread_watcher.h (right): https://codereview.chromium.org/12356002/diff/1/chrome/browser/metrics/thread_watcher.h#newcode408 ...
7 years, 9 months ago (2013-02-27 20:10:09 UTC) #1
Leandro Graciá Gil
On 2013/02/27 20:10:09, boliu wrote: > Building android to see how this actually works in ...
7 years, 9 months ago (2013-02-27 20:52:47 UTC) #2
boliu
On 2013/02/27 20:52:47, Leandro Graciá Gil wrote: > We do need to create a sync ...
7 years, 9 months ago (2013-02-27 22:24:17 UTC) #3
boliu
About sync ipcs: It's not enough to "prevent compositor commits". By the time findAll is ...
7 years, 9 months ago (2013-02-28 02:37:40 UTC) #4
boliu
So patch set 2 contains all the new ScopedAllowWait's that need to be added to ...
7 years, 9 months ago (2013-03-01 00:19:12 UTC) #5
boliu
3-file change for the additional hacks to get merged threads, but have to apply a ...
7 years, 9 months ago (2013-03-05 01:52:06 UTC) #6
boliu
https://codereview.chromium.org/12356002/diff/7003/android_webview/lib/main/aw_main_delegate.cc File android_webview/lib/main/aw_main_delegate.cc (right): https://codereview.chromium.org/12356002/diff/7003/android_webview/lib/main/aw_main_delegate.cc#newcode88 android_webview/lib/main/aw_main_delegate.cc:88: content::BrowserThread::UnsafeGetMessageLoopForThread( Just realized this has been returning null since ...
7 years, 9 months ago (2013-03-07 18:28:26 UTC) #7
boliu
7 years, 9 months ago (2013-03-07 19:04:45 UTC) #8
https://codereview.chromium.org/12356002/diff/7003/android_webview/lib/main/a...
File android_webview/lib/main/aw_main_delegate.cc (right):

https://codereview.chromium.org/12356002/diff/7003/android_webview/lib/main/a...
android_webview/lib/main/aw_main_delegate.cc:88:
content::BrowserThread::UnsafeGetMessageLoopForThread(
On 2013/03/07 18:28:26, boliu wrote:
> Just realized this has been returning null since code runs before any message
> loops are started.
> 
> AFAICT this has always been the case, although I swear it was triggering
> ThreadRestriction checks on the UI thread when I was hacking this...
> 
> Going to look for a better (ie functional) way to do this

Fix here: crrev.com/12639002

Powered by Google App Engine
This is Rietveld 408576698