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

Issue 188873005: Do not dynamically call setLayer on RenderWidgetHostViewCocoa (Closed)

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

Description

Do not dynamically call setLayer on RenderWidgetHostViewCocoa Instead, call it once at creation, and then call addSublayer to cover up the layer when content comes in. Remove the atomic add-layer-and-remove-old-one functions, since the new arrangement allows adding the new layer before removing the old one. Change places that used [self layer] to explicitly call out to the software and compositing layers. The reason for this change is that it is not safe to dynamically call setLayer on NSViews because of the following undocumented feature of CoreAnimation: Ordinarily, the NSView hierarchy and the CALayer hierarchy match. That is, the ordering of a NSView's subviews' CALayers is the same as the ordering of the NSView's CALayer's sublayers. This gets completely broken when you call setLayer on a NSView. The new CALayer will be appended to the end of the NSView's superview's CALayer's sublayer array, even if that NSView wasn't at the end of its superview's subview array. BUG=348490 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255886

Patch Set 1 #

Patch Set 2 : Clean up #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -51 lines) Patch
M content/browser/renderer_host/render_widget_host_view_mac.h View 2 chunks +7 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 11 chunks +42 lines, -44 lines 5 comments Download

Messages

Total messages: 12 (0 generated)
ccameron
Patch is simpler than the explanation, promise!
6 years, 9 months ago (2014-03-06 22:31:49 UTC) #1
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/188873005/diff/20001/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/188873005/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1481 content/browser/renderer_host/render_widget_host_view_mac.mm:1481: if (!CreateCompositedIOSurfaceLayer()) { Who takes care of deleting the ...
6 years, 9 months ago (2014-03-07 00:29:56 UTC) #2
ccameron
https://codereview.chromium.org/188873005/diff/20001/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/188873005/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1481 content/browser/renderer_host/render_widget_host_view_mac.mm:1481: if (!CreateCompositedIOSurfaceLayer()) { On 2014/03/07 00:29:56, Ken Russell wrote: ...
6 years, 9 months ago (2014-03-07 07:30:00 UTC) #3
Ken Russell (switch to Gerrit)
OK. Thanks for bearing with me. LGTM
6 years, 9 months ago (2014-03-07 20:52:44 UTC) #4
ccameron
Thanks for being thorough!
6 years, 9 months ago (2014-03-08 01:25:52 UTC) #5
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 9 months ago (2014-03-08 01:25:55 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/188873005/20001
6 years, 9 months ago (2014-03-08 11:16:38 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-08 14:11:24 UTC) #8
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) telemetry_perf_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=234374
6 years, 9 months ago (2014-03-08 14:11:25 UTC) #9
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 9 months ago (2014-03-10 05:44:24 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/188873005/20001
6 years, 9 months ago (2014-03-10 05:44:28 UTC) #11
commit-bot: I haz the power
6 years, 9 months ago (2014-03-10 06:36:00 UTC) #12
Message was sent while issue was closed.
Change committed as 255886

Powered by Google App Engine
This is Rietveld 408576698