MacViews: Add Layers to NativeWidgetMac
Continuing its role as an aura::Window workalike, BridgedNativeWidget
becomes a ui::LayerOwner and a ui::LayerDelegate.
During Widget::Init(), calling BridgedNativeWidget::CreateLayer(..) will
install a compositor, and the ui::AcceleratedWidgetMac instance that
coordinates frames coming in from the GPU process will start
acknowledging them.
Note that most tests default to WINDOW_LAYER_TEXTURED. "NONE" is what
all the MacViews tests have been running against todate. It isn't used
much any more on Aura platforms, but we might want to keep it for Mac.
In this change, NativeWidgetMacTest, MiniaturizeExternally explicitly
sets WINDOW_LAYER_NONE since it relies on a synchronous paint. Other
tests now run with a layer. None regress. However, if we get better
results on Mac with WINDOW_LAYER_NONE in Release code for windows that
don't need a UI compositor, we will need to parameterize layer_type in
tests to keep coverage of both draw paths.
After this all (12 crashing, 1 failing) ViewLayerTest.* tests pass.
WidgetTest.CloseWidgetWhileAnimating moves from crashing to failing.
BUG=424058, 378134
TEST=views_unittests Before: 469 tests run. 20 fail, 16 crash. After:
468 tests run, 20 fail, 3 crash.
Review URL: https://codereview.chromium.org/
710253002
Cr-Commit-Position: refs/heads/master@{#307797}