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

Issue 14888002: Android WebView Merged-Thread Hardware Draw (Closed)

Created:
7 years, 7 months ago by boliu
Modified:
7 years, 7 months ago
Reviewers:
danakj, jamesr, joth, no sievers
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, android-webview-reviews_chromium.org, aelias_OOO_until_Jul13, kaanb, danakj
Visibility:
Public.

Description

Android WebView Merged-Thread Hardware Draw InProcessViewRenderer no longer inherits from the current implementation class, with most methods left unimplemented for now. This means the browser compositor is removed when merged thread mode is turned on. Synchronous input filter logic is moved to AwContentRenderer[Host]Ext, since ViewRenderer[Host] will go away after merged thread draw path is ready. UpdatePageScaleFactor moved similarly. Need to temporarily add a global AllowIO to temporarily work around compositor joining raster threads on UI thread on shutdown. Caveats: * This code is still not used until some flags are turned on. * Will break merged thread mode with existing browser compositor draw path * cc initialization changes required for webview are not there. * Lots more work required related to GL state restore and respecting transforms etc * Patch ignores software draw path, including case of not attached to window. BUG=230202, 230195 NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=199223

Patch Set 1 #

Total comments: 14

Patch Set 2 : address comments #

Total comments: 1

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : Remove background context for now, not needed #

Patch Set 6 : Move in-process input handler into AwRenderView[Host]Ext #

Total comments: 9

Patch Set 7 : Pass all draw info #

Patch Set 8 : Update initializer list #

Patch Set 9 : Rebase #

Total comments: 1

Patch Set 10 : Rebase #

Patch Set 11 : pass hw scroll (not used in content) #

Patch Set 12 : Pass hw scroll in transform #

Total comments: 5

Patch Set 13 : hacky hacks #

Patch Set 14 : address comments #

Total comments: 3

Patch Set 15 : Address comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+430 lines, -126 lines) Patch
M android_webview/browser/browser_view_renderer.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -4 lines 0 comments Download
M android_webview/browser/browser_view_renderer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +1 line, -9 lines 0 comments Download
M android_webview/browser/browser_view_renderer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +1 line, -26 lines 0 comments Download
M android_webview/browser/in_process_renderer/in_process_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -3 lines 0 comments Download
M android_webview/browser/in_process_renderer/in_process_view_renderer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +51 lines, -5 lines 0 comments Download
M android_webview/browser/in_process_renderer/in_process_view_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +182 lines, -2 lines 0 comments Download
M android_webview/browser/renderer_host/aw_render_view_host_ext.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +16 lines, -2 lines 0 comments Download
M android_webview/browser/renderer_host/aw_render_view_host_ext.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +37 lines, -1 line 0 comments Download
M android_webview/browser/renderer_host/view_renderer_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -5 lines 0 comments Download
M android_webview/browser/renderer_host/view_renderer_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +0 lines, -36 lines 0 comments Download
M android_webview/lib/DEPS View 1 chunk +1 line, -1 line 0 comments Download
M android_webview/lib/main/aw_main_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +15 lines, -2 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -1 line 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M android_webview/renderer/aw_render_view_ext.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/renderer/aw_render_view_ext.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M android_webview/renderer/view_renderer.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M android_webview/renderer/view_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -6 lines 0 comments Download
M content/public/renderer/android/synchronous_compositor.h View 1 2 3 4 5 6 2 chunks +14 lines, -0 lines 0 comments Download
M content/public/renderer/android/synchronous_compositor_client.h View 1 1 chunk +6 lines, -1 line 0 comments Download
M content/renderer/android/synchronous_compositor_output_surface.h View 1 2 3 4 5 6 1 chunk +11 lines, -3 lines 0 comments Download
M content/renderer/android/synchronous_compositor_output_surface.cc View 1 2 3 4 5 6 7 3 chunks +66 lines, -6 lines 1 comment Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -10 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
boliu
I think these pieces can land now, but they won't work until some additional hacks ...
7 years, 7 months ago (2013-05-02 23:18:21 UTC) #1
joth
quick thoughts... need to time landing this carefully (unless we can flesh it out to ...
7 years, 7 months ago (2013-05-03 01:26:26 UTC) #2
boliu
https://codereview.chromium.org/14888002/diff/1/android_webview/browser/browser_view_renderer.h File android_webview/browser/browser_view_renderer.h (right): https://codereview.chromium.org/14888002/diff/1/android_webview/browser/browser_view_renderer.h#newcode80 android_webview/browser/browser_view_renderer.h:80: static BrowserViewRenderer* FromId(int render_process_id, int render_view_id); On 2013/05/03 01:26:26, ...
7 years, 7 months ago (2013-05-03 05:25:50 UTC) #3
joth
On 2 May 2013 22:25, <boliu@chromium.org> wrote: > > https://codereview.chromium.**org/14888002/diff/1/android_** > webview/browser/browser_view_**renderer.h<https://codereview.chromium.org/14888002/diff/1/android_webview/browser/browser_view_renderer.h> > File android_webview/browser/**browser_view_renderer.h ...
7 years, 7 months ago (2013-05-03 19:07:07 UTC) #4
boliu
James: Could you take a look at the content changes. On question in particular about ...
7 years, 7 months ago (2013-05-03 19:10:27 UTC) #5
jamesr
What's the lifecycle of this graphics context? If we lose the underlying GL context do ...
7 years, 7 months ago (2013-05-03 19:46:51 UTC) #6
boliu
On 2013/05/03 19:46:51, jamesr wrote: > What's the lifecycle of this graphics context? If we ...
7 years, 7 months ago (2013-05-03 20:52:35 UTC) #7
boliu
James: Could you take a look again? https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc#newcode23 content/renderer/android/synchronous_compositor_output_surface.cc:23: scoped_ptr<WebKit::WebGraphicsContext3D> CreateWebGraphicsContext3D() ...
7 years, 7 months ago (2013-05-07 14:13:03 UTC) #8
jamesr
+cc dana for the provider questions https://codereview.chromium.org/14888002/diff/23001/content/public/renderer/android/synchronous_compositor.h File content/public/renderer/android/synchronous_compositor.h (right): https://codereview.chromium.org/14888002/diff/23001/content/public/renderer/android/synchronous_compositor.h#newcode32 content/public/renderer/android/synchronous_compositor.h:32: virtual bool DemandDrawHw(gfx::Rect ...
7 years, 7 months ago (2013-05-07 18:06:40 UTC) #9
danakj
https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc#newcode23 content/renderer/android/synchronous_compositor_output_surface.cc:23: scoped_ptr<WebKit::WebGraphicsContext3D> CreateWebGraphicsContext3D() { On 2013/05/07 14:13:03, boliu wrote: > ...
7 years, 7 months ago (2013-05-07 18:55:06 UTC) #10
danakj
https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc#newcode23 content/renderer/android/synchronous_compositor_output_surface.cc:23: scoped_ptr<WebKit::WebGraphicsContext3D> CreateWebGraphicsContext3D() { On 2013/05/07 14:13:03, boliu wrote: > ...
7 years, 7 months ago (2013-05-07 18:57:11 UTC) #11
boliu
https://codereview.chromium.org/14888002/diff/23001/content/public/renderer/android/synchronous_compositor.h File content/public/renderer/android/synchronous_compositor.h (right): https://codereview.chromium.org/14888002/diff/23001/content/public/renderer/android/synchronous_compositor.h#newcode32 content/public/renderer/android/synchronous_compositor.h:32: virtual bool DemandDrawHw(gfx::Rect damage_rect) = 0; On 2013/05/07 18:06:41, ...
7 years, 7 months ago (2013-05-07 19:18:44 UTC) #12
danakj
https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/14888002/diff/23001/content/renderer/android/synchronous_compositor_output_surface.cc#newcode23 content/renderer/android/synchronous_compositor_output_surface.cc:23: scoped_ptr<WebKit::WebGraphicsContext3D> CreateWebGraphicsContext3D() { On 2013/05/07 19:18:44, boliu wrote: > ...
7 years, 7 months ago (2013-05-07 19:35:33 UTC) #13
boliu
On 2013/05/07 19:35:33, danakj wrote: > > Why does context creation need to happen on ...
7 years, 7 months ago (2013-05-07 19:57:02 UTC) #14
danakj
On Tue, May 7, 2013 at 3:57 PM, <boliu@chromium.org> wrote: > On 2013/05/07 19:35:33, danakj ...
7 years, 7 months ago (2013-05-07 20:03:23 UTC) #15
boliu
On 2013/05/07 20:03:23, danakj wrote: > I think that needs_offscreen_context() would be set correctly even ...
7 years, 7 months ago (2013-05-07 20:28:45 UTC) #16
danakj
On Tue, May 7, 2013 at 4:28 PM, <boliu@chromium.org> wrote: > On 2013/05/07 20:03:23, danakj ...
7 years, 7 months ago (2013-05-07 20:34:48 UTC) #17
jamesr
GL context creation is typically in two parts - first getting the context, which just ...
7 years, 7 months ago (2013-05-07 20:36:24 UTC) #18
boliu
On 2013/05/07 20:36:24, jamesr wrote: > GL context creation is typically in two parts - ...
7 years, 7 months ago (2013-05-07 20:42:01 UTC) #19
jamesr
On 2013/05/07 20:42:01, boliu wrote: > On 2013/05/07 20:36:24, jamesr wrote: > > GL context ...
7 years, 7 months ago (2013-05-07 20:42:50 UTC) #20
joth
lgtm https://codereview.chromium.org/14888002/diff/41001/android_webview/browser/in_process_renderer/DEPS File android_webview/browser/in_process_renderer/DEPS (right): https://codereview.chromium.org/14888002/diff/41001/android_webview/browser/in_process_renderer/DEPS#newcode10 android_webview/browser/in_process_renderer/DEPS:10: "+android_webview/renderer/aw_render_view_ext.h", nit: use ! instead of + https://codereview.chromium.org/14888002/diff/48001/android_webview/browser/in_process_renderer/in_process_renderer_client.cc ...
7 years, 7 months ago (2013-05-09 10:48:52 UTC) #21
joth
https://codereview.chromium.org/14888002/diff/57002/android_webview/browser/in_process_renderer/DEPS File android_webview/browser/in_process_renderer/DEPS (right): https://codereview.chromium.org/14888002/diff/57002/android_webview/browser/in_process_renderer/DEPS#newcode10 android_webview/browser/in_process_renderer/DEPS:10: "+android_webview/renderer/aw_render_view_ext.h", remove me (revert file) https://codereview.chromium.org/14888002/diff/57002/android_webview/browser/renderer_host/aw_render_view_host_ext.h File android_webview/browser/renderer_host/aw_render_view_host_ext.h (right): ...
7 years, 7 months ago (2013-05-09 13:14:39 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/14888002/65002
7 years, 7 months ago (2013-05-09 15:34:54 UTC) #23
commit-bot: I haz the power
Change committed as 199223
7 years, 7 months ago (2013-05-09 15:35:20 UTC) #24
no sievers
7 years, 7 months ago (2013-05-15 23:02:22 UTC) #25
Message was sent while issue was closed.
https://codereview.chromium.org/14888002/diff/65002/content/renderer/android/...
File content/renderer/android/synchronous_compositor_output_surface.cc (right):

https://codereview.chromium.org/14888002/diff/65002/content/renderer/android/...
content/renderer/android/synchronous_compositor_output_surface.cc:79:
context3d()->finish();
Bo, you might want to try if it works replacing this with a flush(), which might
be better for performance (no glFinish()). Maybe even shallowFlushCHROMIUM (no
glFlush()).

We mostly care about forcing commands to be parsed here.

Powered by Google App Engine
This is Rietveld 408576698