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

Issue 394883007: Mac: Shift more code into C++ classes from ObjC classes (Closed)

Created:
6 years, 5 months ago by ccameron
Modified:
6 years, 5 months ago
Reviewers:
miu
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, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@flip_fix
Project:
chromium
Visibility:
Public.

Description

Mac: Shift more code into C++ classes from ObjC classes It is difficult to reason about the liftime of ObjC classes, especially NSViews and CALayers. To simplify verifying their correctness, move the bulk of the code for the ObjC classes into C++ helper classes (these classes are already necessary to interface with owning structures). Make the NSView sub-class BrowserCompositorViewCocoa be owned by BrowserCompositorViewMacInternal. Move the bulk of the work in CompositingIOSurfaceLayer to be done by CompositingIOSurfaceLayerHelper, and mark that the ownership relationship should be inverted (that isn't feasible at the moment because we are mid-transition from non-delegated rendering to delegated rendering). BUG=392919 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284063

Patch Set 1 #

Patch Set 2 : Touch-ups #

Total comments: 20

Patch Set 3 : Incorporate review feedback #

Patch Set 4 : And the rest #

Patch Set 5 : One more feedback #

Total comments: 1

Patch Set 6 : Review feedback #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+399 lines, -275 lines) Patch
M content/browser/compositor/browser_compositor_view_mac.h View 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/compositor/browser_compositor_view_mac.mm View 1 2 3 3 chunks +15 lines, -20 lines 0 comments Download
M content/browser/compositor/browser_compositor_view_private_mac.h View 1 2 3 4 2 chunks +73 lines, -45 lines 0 comments Download
M content/browser/compositor/browser_compositor_view_private_mac.mm View 1 2 3 4 6 chunks +125 lines, -90 lines 0 comments Download
M content/browser/renderer_host/compositing_iosurface_layer_mac.h View 1 2 3 4 5 2 chunks +66 lines, -17 lines 0 comments Download
M content/browser/renderer_host/compositing_iosurface_layer_mac.mm View 1 2 6 chunks +117 lines, -100 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
ccameron
Sorry, this has giant diffs. Apart from a couple of minor things (moving scoped CA ...
6 years, 5 months ago (2014-07-16 21:13:08 UTC) #1
miu
I like this code structure much better, and it definitely clarifies/resolves the tear-down semantics. Mostly ...
6 years, 5 months ago (2014-07-16 22:31:56 UTC) #2
ccameron
Thanks! Updated. https://codereview.chromium.org/394883007/diff/20001/content/browser/compositor/browser_compositor_view_mac.mm File content/browser/compositor/browser_compositor_view_mac.mm (right): https://codereview.chromium.org/394883007/diff/20001/content/browser/compositor/browser_compositor_view_mac.mm#newcode59 content/browser/compositor/browser_compositor_view_mac.mm:59: internal_view_.reset(g_recyclable_internal_view.Get().release()); On 2014/07/16 22:31:55, miu wrote: > ...
6 years, 5 months ago (2014-07-17 02:30:02 UTC) #3
miu
lgtm https://codereview.chromium.org/394883007/diff/80001/content/browser/renderer_host/compositing_iosurface_layer_mac.h File content/browser/renderer_host/compositing_iosurface_layer_mac.h (right): https://codereview.chromium.org/394883007/diff/80001/content/browser/renderer_host/compositing_iosurface_layer_mac.h#newcode74 content/browser/renderer_host/compositing_iosurface_layer_mac.h:74: BOOL needs_display_; s/BOOL/bool/
6 years, 5 months ago (2014-07-17 06:12:56 UTC) #4
ccameron
Thanks!
6 years, 5 months ago (2014-07-18 08:33:37 UTC) #5
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 5 months ago (2014-07-18 08:33:41 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/394883007/120001
6 years, 5 months ago (2014-07-18 08:34:55 UTC) #7
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 12:08:22 UTC) #8
Message was sent while issue was closed.
Change committed as 284063

Powered by Google App Engine
This is Rietveld 408576698