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

Issue 454243002: Make GPU back-pressure work with remote CALayers (Closed)

Created:
6 years, 4 months ago by ccameron
Modified:
6 years, 4 months ago
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, Ken Russell (switch to Gerrit), piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Make GPU back-pressure work with remote CALayers Prior to this change, ImageTransportSurfaceFBO had the property that it would un-schedule the GPU channel at a swap, and then re-schedule the GPU channel when the swap was acknowledged by the browser process. Separate out the re-scheduling of the channel into the function ImageTransportSurfaceFBO::UnblockContextAfterPendingSwap. Previously, this re-scheduling was done after receiving an ack in the form of the AcceleratedSurfaceMsg_BufferPresented IPC. Because the re-scheduling of the GPU channel is no longer blocked on the AcceleratedSurfaceMsg_BufferPresented IPC, issue that IPC from the UI thread in the browser when the SwapBuffers IPC is processed (instead of doing so on the IO thread immediately). Get rid of the hacks being used prevent the IOSurface from being freed while the SwapBuffers IPC was bouncing from the IO thread to the UI thread. For IOSurface-based ImageTransportSurfaces, re-schedule the GPU channel immediately, because the ui::Compositor in the browser process is responsible for "feeling" the GPU back-pressure in its CompositingIOSurfaceLayer. Prevent the IOSurface from being freed while it is in-flight by keeping around an extra reference to all in-flight IOSurfaces (the reference is taken at SwapBuffers and is released at AcceleratedSurfaceMsg_BufferPresented). For CAContext/CALayer-based ImageTransportSurfaces, re-schedule the GPU channel when the ImageTransportLayer in the GPU process is displayed (the back-pressure is "felt" within the same process). Because the CAContext used for this ImageTransportSurface is static for the lifetime of the ImageTransportSurface (unlike IOSurfaces where re-allocation at resize is common), there is no need to keep around references to in-flight surfaces. BUG=312462 R=jbauman TBR=kbr Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289232

Patch Set 1 #

Patch Set 2 : Fix flashes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -508 lines) Patch
M content/browser/compositor/browser_compositor_view_mac.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/compositor/browser_compositor_view_mac.mm View 2 chunks +16 lines, -1 line 0 comments Download
M content/browser/compositor/browser_compositor_view_private_mac.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/compositor/browser_compositor_view_private_mac.mm View 1 2 chunks +9 lines, -7 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 2 chunks +0 lines, -41 lines 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface_calayer_mac.h View 3 chunks +25 lines, -7 lines 0 comments Download
M content/common/gpu/image_transport_surface_calayer_mac.mm View 5 chunks +126 lines, -64 lines 0 comments Download
M content/common/gpu/image_transport_surface_fbo_mac.h View 2 chunks +13 lines, -3 lines 0 comments Download
D content/common/gpu/image_transport_surface_fbo_mac.cc View 1 chunk +0 lines, -349 lines 0 comments Download
A + content/common/gpu/image_transport_surface_fbo_mac.mm View 5 chunks +13 lines, -26 lines 0 comments Download
M content/common/gpu/image_transport_surface_iosurface_mac.h View 3 chunks +11 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface_iosurface_mac.cc View 2 chunks +15 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface_mac.mm View 2 chunks +1 line, -5 lines 0 comments Download
M content/content_common.gypi View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
ccameron
This is the back-pressure change that we discussed earlier.
6 years, 4 months ago (2014-08-09 01:12:35 UTC) #1
ccameron
The usual suspects are at SIGGRAPH/OOO, jbauman, can you get this (I'll TBR them for ...
6 years, 4 months ago (2014-08-12 05:08:30 UTC) #2
jbauman
lgtm
6 years, 4 months ago (2014-08-12 21:27:53 UTC) #3
ccameron
Thanks!
6 years, 4 months ago (2014-08-12 22:00:30 UTC) #4
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 4 months ago (2014-08-12 22:00:35 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/454243002/20001
6 years, 4 months ago (2014-08-12 22:10:26 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-13 04:00:29 UTC) #7
commit-bot: I haz the power
Change committed as 289232
6 years, 4 months ago (2014-08-13 09:37:50 UTC) #8
Ken Russell (switch to Gerrit)
6 years, 4 months ago (2014-08-15 20:19:30 UTC) #9
Message was sent while issue was closed.
LGTM after the fact. Sorry for not getting to this before leaving.

Powered by Google App Engine
This is Rietveld 408576698