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

Issue 347653005: Make cross-process CALayers work on Mac (Closed)

Created:
6 years, 6 months ago by ccameron
Modified:
6 years, 6 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, James Su, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@image_transport_1
Project:
chromium
Visibility:
Public.

Description

Make cross-process CALayers work on Mac Add a header file for the remote layer API and a helper function to determine if it is supported at runtime. Add a mechanism for disambiguating if a "surface handle" refers to an IOSurfaceID or a CAContextID (the thing that is passed across processes to do cross-process CALayer drawing). Add support in RenderWidgetHostViewMac to put in a CALayerHost from another process's CAContextID. In the process of this, make the root CALayer hanging off of the RenderWidgetHostViewMac have flipped geometry, and update LayoutLayers to take this into account. This is working surprisingly well, but needs a bit more work before it can be turned on. We still need to: * exert GPU back-pressure from the GPU process' -[ImageTransportLayer drawInCGLContext] function (it's an open loop now). * use the isAsynchronous property to make 60fps animation not jerky. * ensure that these resources' lifetimes are being managed reasonably and aren't eating tons of GPU * ensure that not rounding texture sizes to the nearest 64 pixels (as is done for the IOSurface scheme) isn't causing fragmentation. BUG=312462 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279200

Patch Set 1 #

Patch Set 2 : Comments, cleanup #

Patch Set 3 : Remove stray test line #

Total comments: 8

Patch Set 4 : Incorporate review feedback #

Total comments: 10

Patch Set 5 : Incorporate review feedback #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+502 lines, -29 lines) Patch
M content/browser/renderer_host/render_widget_helper_mac.mm View 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 5 chunks +44 lines, -13 lines 0 comments Download
A content/common/gpu/image_transport_surface_calayer_mac.h View 1 2 3 1 chunk +48 lines, -0 lines 0 comments Download
A content/common/gpu/image_transport_surface_calayer_mac.mm View 1 2 3 1 chunk +177 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface_fbo_mac.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface_fbo_mac.cc View 1 2 3 3 chunks +6 lines, -2 lines 0 comments Download
M content/common/gpu/image_transport_surface_iosurface_mac.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M content/common/gpu/image_transport_surface_iosurface_mac.cc View 1 2 3 6 chunks +13 lines, -9 lines 0 comments Download
M content/common/gpu/image_transport_surface_mac.mm View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
A content/common/gpu/surface_handle_types_mac.h View 1 1 chunk +34 lines, -0 lines 0 comments Download
A content/common/gpu/surface_handle_types_mac.cc View 1 1 chunk +53 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
A ui/base/cocoa/remote_layer_api.h View 1 2 3 4 1 chunk +59 lines, -0 lines 3 comments Download
A ui/base/cocoa/remote_layer_api.mm View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
ccameron
This has turned out to be surprisingly painless (so far).
6 years, 6 months ago (2014-06-19 00:02:44 UTC) #1
ccameron
Pinging this again
6 years, 6 months ago (2014-06-19 21:13:13 UTC) #2
piman
Seems pretty reasonable, but I'm not a mac / CA expert. LGTM for my parts, ...
6 years, 6 months ago (2014-06-19 21:51:02 UTC) #3
ccameron
Thanks! https://codereview.chromium.org/347653005/diff/40001/content/common/gpu/image_transport_surface_calayer_mac.mm File content/common/gpu/image_transport_surface_calayer_mac.mm (right): https://codereview.chromium.org/347653005/diff/40001/content/common/gpu/image_transport_surface_calayer_mac.mm#newcode122 content/common/gpu/image_transport_surface_calayer_mac.mm:122: GLenum error = glGetError(); On 2014/06/19 21:51:02, piman ...
6 years, 6 months ago (2014-06-19 23:56:41 UTC) #4
ccameron
Adding avi for base/cocoa stuff
6 years, 6 months ago (2014-06-19 23:57:53 UTC) #5
Avi (use Gerrit)
ui/base/cocoa LGTM with nits https://codereview.chromium.org/347653005/diff/60001/ui/base/cocoa/remote_layer_api.h File ui/base/cocoa/remote_layer_api.h (right): https://codereview.chromium.org/347653005/diff/60001/ui/base/cocoa/remote_layer_api.h#newcode19 ui/base/cocoa/remote_layer_api.h:19: CGSConnectionID CGSMainConnectionID(void); I'm a bit ...
6 years, 6 months ago (2014-06-20 00:15:11 UTC) #6
ccameron
Thanks!! https://codereview.chromium.org/347653005/diff/60001/ui/base/cocoa/remote_layer_api.h File ui/base/cocoa/remote_layer_api.h (right): https://codereview.chromium.org/347653005/diff/60001/ui/base/cocoa/remote_layer_api.h#newcode19 ui/base/cocoa/remote_layer_api.h:19: CGSConnectionID CGSMainConnectionID(void); On 2014/06/20 00:15:11, Avi wrote: > ...
6 years, 6 months ago (2014-06-20 00:55:06 UTC) #7
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 6 months ago (2014-06-20 01:09:31 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/347653005/80001
6 years, 6 months ago (2014-06-20 01:10:52 UTC) #9
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 6 months ago (2014-06-20 07:42:27 UTC) #10
ccameron
Adding ben: Need a stamp from a ui/base OWNER
6 years, 6 months ago (2014-06-20 07:51:09 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-20 07:51:41 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/75077)
6 years, 6 months ago (2014-06-20 07:51:42 UTC) #13
Ken Russell (switch to Gerrit)
LGTM overall. Very nice work. One question. https://codereview.chromium.org/347653005/diff/80001/ui/base/cocoa/remote_layer_api.h File ui/base/cocoa/remote_layer_api.h (right): https://codereview.chromium.org/347653005/diff/80001/ui/base/cocoa/remote_layer_api.h#newcode19 ui/base/cocoa/remote_layer_api.h:19: CGSConnectionID CGSMainConnectionID(void); ...
6 years, 6 months ago (2014-06-20 18:37:40 UTC) #14
Avi (use Gerrit)
https://codereview.chromium.org/347653005/diff/80001/ui/base/cocoa/remote_layer_api.h File ui/base/cocoa/remote_layer_api.h (right): https://codereview.chromium.org/347653005/diff/80001/ui/base/cocoa/remote_layer_api.h#newcode19 ui/base/cocoa/remote_layer_api.h:19: CGSConnectionID CGSMainConnectionID(void); On 2014/06/20 18:37:40, Ken Russell wrote: > ...
6 years, 6 months ago (2014-06-20 18:42:18 UTC) #15
ccameron
Thanks! https://codereview.chromium.org/347653005/diff/80001/ui/base/cocoa/remote_layer_api.h File ui/base/cocoa/remote_layer_api.h (right): https://codereview.chromium.org/347653005/diff/80001/ui/base/cocoa/remote_layer_api.h#newcode19 ui/base/cocoa/remote_layer_api.h:19: CGSConnectionID CGSMainConnectionID(void); On 2014/06/20 18:37:40, Ken Russell wrote: ...
6 years, 6 months ago (2014-06-20 18:44:15 UTC) #16
ccameron
Adding sky for ui/OWNERS stamp
6 years, 6 months ago (2014-06-20 20:42:11 UTC) #17
sky
sky->thakis (thakis is better for mac stuff)
6 years, 6 months ago (2014-06-20 23:09:02 UTC) #18
ccameron
sky, thakis is away, can you do the ui/base review? I've had avi and kbr ...
6 years, 6 months ago (2014-06-23 20:15:19 UTC) #19
sky
I'm going to rubber stamp. Wait for avi to approve though. LGTM
6 years, 6 months ago (2014-06-23 21:52:07 UTC) #20
Avi (use Gerrit)
I thought my approval was clear: I LGed earlier and defended kbr's not wrapping the ...
6 years, 6 months ago (2014-06-23 22:04:34 UTC) #21
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 6 months ago (2014-06-23 22:15:57 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/347653005/80001
6 years, 6 months ago (2014-06-23 22:18:09 UTC) #23
commit-bot: I haz the power
6 years, 6 months ago (2014-06-23 22:26:59 UTC) #24
Message was sent while issue was closed.
Change committed as 279200

Powered by Google App Engine
This is Rietveld 408576698