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

Issue 1416363002: Mac: Always use surfaceless mode (Closed)

Created:
5 years, 2 months ago by ccameron
Modified:
5 years, 1 month ago
CC:
chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, sievers+watch_chromium.org, tdanderson+views_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: Always use surfaceless mode The goal of this change is to unify all image transport surfaces on Mac. Prior to this, if we do not support remote CoreAnimation APIs, then we will create an ImageTransportSurfaceFBO, which will send the IOSurface that it creates in the GPU process to the browser process. Change this to use the ImageTranportSurfaceOverlayMac. Using this surface will trigger the use of GpuSurfacelessBrowserCompositorOutputSurface instead of GpuBrowserCompositorOutputSurface. This output surface allocates an IOSurface-backed GpuMemoryBuffer in BufferQueue, which is rendered to. When frames are swapped in ImageTranportSurfaceOverlayMac, and remote CoreAnimation is not supported, send the backbuffer's IOSurface handle to the browser in GpuHostMsg_AcceleratedSurfaceBuffersSwapped. There is one snag here, where we are unable to open the IOSurface by its handle if the GpuMemoryBuffer that was created by BufferQueue has been destroyed. To fix this, make BufferQueue hold on to the GpuMemoryBuffer while it may be in use. Also, in GpuTransportFactory's CreateOverlayCandidateValidator, only create a validator if the remote CoreAnimation API is supported, because the non-remote-CoreAnimation path only supports drawing a single layer. BUG=546795 Committed: https://crrev.com/516ddd741c0f9ec54947f4b23082e8c47d8d2278 Cr-Commit-Position: refs/heads/master@{#356301}

Patch Set 1 #

Patch Set 2 : Remove extra diffs #

Total comments: 12

Patch Set 3 : Rebase #

Patch Set 4 : Add export #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -1633 lines) Patch
M content/browser/compositor/buffer_queue.h View 1 2 3 3 chunks +14 lines, -5 lines 0 comments Download
M content/browser/compositor/buffer_queue.cc View 2 chunks +13 lines, -2 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.cc View 2 chunks +23 lines, -3 lines 0 comments Download
D content/common/gpu/image_transport_surface_calayer_mac.h View 1 chunk +0 lines, -118 lines 0 comments Download
D content/common/gpu/image_transport_surface_calayer_mac.mm View 1 chunk +0 lines, -649 lines 0 comments Download
D content/common/gpu/image_transport_surface_fbo_mac.h View 1 chunk +0 lines, -146 lines 0 comments Download
D content/common/gpu/image_transport_surface_fbo_mac.mm View 1 chunk +0 lines, -441 lines 0 comments Download
D content/common/gpu/image_transport_surface_iosurface_mac.h View 1 chunk +0 lines, -58 lines 0 comments Download
D content/common/gpu/image_transport_surface_iosurface_mac.cc View 1 chunk +0 lines, -143 lines 0 comments Download
M content/common/gpu/image_transport_surface_overlay_mac.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface_overlay_mac.mm View 10 chunks +50 lines, -22 lines 0 comments Download
M content/content_common.gypi View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M ui/accelerated_widget_mac/accelerated_widget_mac.h View 2 4 chunks +19 lines, -13 lines 0 comments Download
M ui/accelerated_widget_mac/accelerated_widget_mac.mm View 1 2 5 chunks +16 lines, -25 lines 0 comments Download
M ui/accelerated_widget_mac/surface_handle_types.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gl/gl_image_io_surface.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 29 (11 generated)
ccameron
This is the second big part of the "kill it with fire" patch. This kills ...
5 years, 2 months ago (2015-10-22 22:16:49 UTC) #2
Ken Russell (switch to Gerrit)
Could you please reference a bug ID? This is large enough that it's likely it ...
5 years, 2 months ago (2015-10-22 23:39:49 UTC) #3
ccameron
On 2015/10/22 23:39:49, Ken Russell wrote: > Could you please reference a bug ID? This ...
5 years, 2 months ago (2015-10-22 23:49:03 UTC) #5
Ken Russell (switch to Gerrit)
The cleanup and code deletion looks awesome. Could you please ensure the following two cases ...
5 years, 2 months ago (2015-10-23 01:13:13 UTC) #7
ccameron
On 2015/10/23 01:13:13, Ken Russell wrote: > The cleanup and code deletion looks awesome. > ...
5 years, 2 months ago (2015-10-23 07:49:44 UTC) #8
danakj
https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h File content/browser/compositor/buffer_queue.h (right): https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h#newcode66 content/browser/compositor/buffer_queue.h:66: ~AllocatedSurface(); On 2015/10/23 01:13:13, Ken Russell wrote: > On ...
5 years, 2 months ago (2015-10-23 19:52:08 UTC) #9
alexst (slow to review)
buffer_queue lgtm https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h File content/browser/compositor/buffer_queue.h (right): https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h#newcode66 content/browser/compositor/buffer_queue.h:66: ~AllocatedSurface(); On 2015/10/23 19:52:08, danakj wrote: > ...
5 years, 2 months ago (2015-10-23 19:59:10 UTC) #11
reveman
https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h File content/browser/compositor/buffer_queue.h (right): https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h#newcode67 content/browser/compositor/buffer_queue.h:67: linked_ptr<gfx::GpuMemoryBuffer> buffer; Can we avoid having these be reference ...
5 years, 2 months ago (2015-10-23 20:44:40 UTC) #12
ccameron
Rebased and updated. https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h File content/browser/compositor/buffer_queue.h (right): https://codereview.chromium.org/1416363002/diff/20001/content/browser/compositor/buffer_queue.h#newcode67 content/browser/compositor/buffer_queue.h:67: linked_ptr<gfx::GpuMemoryBuffer> buffer; On 2015/10/23 20:44:40, reveman ...
5 years, 1 month ago (2015-10-26 22:28:11 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1416363002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1416363002/40001
5 years, 1 month ago (2015-10-26 23:50:27 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/100355)
5 years, 1 month ago (2015-10-27 01:00:28 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1416363002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1416363002/40001
5 years, 1 month ago (2015-10-27 07:34:33 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/100469)
5 years, 1 month ago (2015-10-27 08:20:26 UTC) #22
Ken Russell (switch to Gerrit)
On 2015/10/27 08:20:26, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 1 month ago (2015-10-27 12:41:40 UTC) #23
ccameron
On 2015/10/27 12:41:40, Ken Russell wrote: > On 2015/10/27 08:20:26, commit-bot: I haz the power ...
5 years, 1 month ago (2015-10-27 14:28:26 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1416363002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1416363002/60001
5 years, 1 month ago (2015-10-27 14:28:30 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-10-27 15:28:46 UTC) #28
commit-bot: I haz the power
5 years, 1 month ago (2015-10-27 15:29:26 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/516ddd741c0f9ec54947f4b23082e8c47d8d2278
Cr-Commit-Position: refs/heads/master@{#356301}

Powered by Google App Engine
This is Rietveld 408576698