Commit 00114095 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Use LAYER_NOT_DRAWN for NonClientFrameController

The only part of the widget that's actually drawn by Ash is the
header, which has its own layer. The client area is drawn by
the browser process. Therefore the native widget's aura::Window
can be LAYER_NOT_DRAWN.

Bug: 931873
Change-Id: I5d27505d7ed1d662ae811a8b719170494c72d9fb
Reviewed-on: https://chromium-review.googlesource.com/c/1471348
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633787}
parent 0f1ed9a2
......@@ -255,7 +255,7 @@ NonClientFrameController::NonClientFrameController(
params.delegate = this;
params.bounds = bounds;
params.opacity = views::Widget::InitParams::OPAQUE_WINDOW;
params.layer_type = ui::LAYER_SOLID_COLOR;
params.layer_type = ui::LAYER_NOT_DRAWN;
WmNativeWidgetAura* native_widget =
new WmNativeWidgetAura(widget_, DoesClientProvideFrame(properties));
window_ = native_widget->GetNativeView();
......@@ -275,15 +275,6 @@ NonClientFrameController::NonClientFrameController(
widget_->Init(params);
did_init_native_widget_ = true;
// Only the caption draws any content. So the caption has its own layer (see
// above in WmNativeWidgetAura::CreateNonClientFrameView()). The rest of the
// region needs to take part in occlusion in the compositor, but not generate
// any content to draw. So the layer is marked as opaque and to draw
// solid-color (but the color is transparent, so nothing is actually drawn).
ui::Layer* layer = widget_->GetNativeWindow()->layer();
layer->SetColor(SK_ColorTRANSPARENT);
layer->SetFillsBoundsOpaquely(true);
wm::MakeGestureDraggableInImmersiveMode(window_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment