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

Issue 16189012: Add a path to use CALayers to display content (Closed)

Created:
7 years, 6 months ago by ccameron
Modified:
7 years, 6 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, penghuang+watch_chromium.org, sail+watch_chromium.org, joi+watch-content_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, sail
Visibility:
Public.

Description

Add a path to use CALayers to display content Add the flag --use-core-animation to enable this path. Make the RenderWidgetHostViewCocoa layer-backed, and add a default white layer. Add a CALayer, softwareLayer_ to draw into when the accelerated path is disabled. Update the software draw methods to use the CG calls (this changes the non-CA path as well, but should be equivalent to previous behavior). If accelerated compositing is enabled, then add CAOpenGLLayer to draw accelerated frames (frames using IOSurfaces). If we receive a software frame, then delete this layer (and the software layer will appear below it). This still has a number of issues to resolve before enabling, including - corrupted bookmark bars - increased CPU usage (3.5%->5% without compositing, 7%->10% with) - increased startup time BUG=245900 NOTRY=True Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204841

Patch Set 1 #

Patch Set 2 : Fix scale factor issues #

Patch Set 3 : Touch-ups #

Patch Set 4 : Add missing files #

Patch Set 5 : Add switch and software support #

Patch Set 6 : Remove unused method #

Total comments: 13

Patch Set 7 : Incorporate review feedback #

Total comments: 15

Patch Set 8 : Incorporate review feedback #

Patch Set 9 : Resolve against https://codereview.chromium.org/16140023/ #

Patch Set 10 : Resolve again #

Patch Set 11 : Resolve again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+476 lines, -93 lines) Patch
M base/mac/sdk_forward_declarations.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
A content/browser/renderer_host/compositing_iosurface_layer_mac.h View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A content/browser/renderer_host/compositing_iosurface_layer_mac.mm View 1 2 3 4 5 6 7 8 9 1 chunk +123 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositing_iosurface_mac.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +20 lines, -11 lines 0 comments Download
M content/browser/renderer_host/compositing_iosurface_mac.mm View 1 2 3 4 5 6 7 8 9 10 6 chunks +49 lines, -19 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 39 chunks +209 lines, -63 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
ccameron
This is part 1 of a sequence of 3 patches to move us to CoreAnimation ...
7 years, 6 months ago (2013-05-31 10:41:00 UTC) #1
Nico
"This is part 1 of a sequence of 3 patches" => needs tracking bug The ...
7 years, 6 months ago (2013-05-31 21:12:34 UTC) #2
ccameron
I'll add a bug for this. Actually, I'll keep this behind a flag & add ...
7 years, 6 months ago (2013-05-31 22:37:15 UTC) #3
ccameron
sail sent me a patch which added software support -- I've incorporated that into this ...
7 years, 6 months ago (2013-05-31 23:41:54 UTC) #4
Avi (use Gerrit)
tracking bug++ thank you
7 years, 6 months ago (2013-05-31 23:50:55 UTC) #5
sail
lgtm! https://codereview.chromium.org/16189012/diff/21001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/16189012/diff/21001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode33 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:33: rect.size.height = [view bounds].size.height; use NSRectToCGRect? https://codereview.chromium.org/16189012/diff/21001/content/browser/renderer_host/render_widget_host_view_mac.mm File ...
7 years, 6 months ago (2013-05-31 23:59:14 UTC) #6
Avi (use Gerrit)
Random comments on a CL I am otherwise unqualified to review. https://codereview.chromium.org/16189012/diff/21001/content/browser/renderer_host/render_widget_host_view_mac.h File content/browser/renderer_host/render_widget_host_view_mac.h (right): ...
7 years, 6 months ago (2013-05-31 23:59:57 UTC) #7
ccameron
Thanks!! https://codereview.chromium.org/16189012/diff/21001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/16189012/diff/21001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode33 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:33: rect.size.height = [view bounds].size.height; On 2013/05/31 23:59:14, sail ...
7 years, 6 months ago (2013-06-01 00:29:45 UTC) #8
Nico
https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode3515 content/browser/renderer_host/render_widget_host_view_mac.mm:3515: inContext:context]; Did you benchmark what this does to scrolling ...
7 years, 6 months ago (2013-06-01 06:15:04 UTC) #9
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/compositing_iosurface_layer_mac.h File content/browser/renderer_host/compositing_iosurface_layer_mac.h (right): https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/compositing_iosurface_layer_mac.h#newcode31 content/browser/renderer_host/compositing_iosurface_layer_mac.h:31: // displays). This will re-allocate the context if need ...
7 years, 6 months ago (2013-06-03 22:05:01 UTC) #10
ccameron
https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/compositing_iosurface_layer_mac.h File content/browser/renderer_host/compositing_iosurface_layer_mac.h (right): https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/compositing_iosurface_layer_mac.h#newcode31 content/browser/renderer_host/compositing_iosurface_layer_mac.h:31: // displays). This will re-allocate the context if need ...
7 years, 6 months ago (2013-06-03 22:14:58 UTC) #11
Ken Russell (switch to Gerrit)
lgtm https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/compositing_iosurface_layer_mac.h File content/browser/renderer_host/compositing_iosurface_layer_mac.h (right): https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/compositing_iosurface_layer_mac.h#newcode31 content/browser/renderer_host/compositing_iosurface_layer_mac.h:31: // displays). This will re-allocate the context if ...
7 years, 6 months ago (2013-06-03 22:36:19 UTC) #12
ccameron
https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/16189012/diff/29001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode3515 content/browser/renderer_host/render_widget_host_view_mac.mm:3515: inContext:context]; On 2013/06/01 06:15:05, Nico wrote: > Did you ...
7 years, 6 months ago (2013-06-03 22:54:09 UTC) #13
ccameron
thakis, do you want to review this, or are you okay with kbr+sail?
7 years, 6 months ago (2013-06-04 18:31:18 UTC) #14
Nico
If kbr and sail are happy, I'm mostly happy too. Some more minor comments below; ...
7 years, 6 months ago (2013-06-05 00:13:07 UTC) #15
ccameron
WRT testing and performance tuning, this path still has some work that needs to be ...
7 years, 6 months ago (2013-06-05 19:24:13 UTC) #16
ccameron
Adding piman for content/ OWNER stamp. And I'll need thakis for base/mac OWNER stamp.
7 years, 6 months ago (2013-06-05 19:32:39 UTC) #17
Nico
lgtm, thanks Can you put the """CA has higher CPU usage both with and without ...
7 years, 6 months ago (2013-06-06 01:22:48 UTC) #18
piman
lgtm
7 years, 6 months ago (2013-06-06 03:27:17 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/16189012/45007
7 years, 6 months ago (2013-06-07 02:11:13 UTC) #20
commit-bot: I haz the power
Failed to apply patch for content/browser/renderer_host/compositing_iosurface_mac.mm: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 6 months ago (2013-06-07 02:11:17 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/16189012/67001
7 years, 6 months ago (2013-06-07 02:43:05 UTC) #22
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) nacl_integration http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=159373
7 years, 6 months ago (2013-06-07 08:10:44 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/16189012/67001
7 years, 6 months ago (2013-06-07 15:19:45 UTC) #24
commit-bot: I haz the power
7 years, 6 months ago (2013-06-07 15:20:19 UTC) #25
Message was sent while issue was closed.
Change committed as 204841

Powered by Google App Engine
This is Rietveld 408576698