Commit e28df26f authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Fix Cast dialog not appearing on non-MacViews

Resize the ui::Compositor's size in BrowserCompositorMac's
SynchronizeVisualProperties method.

Re-disable using a unified ui::Compositor (it was accidentally enabled
by a botched merge).

Bug: 840173
Change-Id: I701574e385ae288b991adce81e1ab5efde23e0c2
Reviewed-on: https://chromium-review.googlesource.com/1073682Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562047}
parent 25fd35f2
......@@ -347,6 +347,10 @@ void BrowserCompositorMac::SynchronizeVisualProperties(
new_size_in_pixels);
dfh_size_pixels_ = new_size_in_pixels;
root_layer_->SetBounds(gfx::Rect(dfh_size_dip_));
if (recyclable_compositor_) {
recyclable_compositor_->UpdateSurface(dfh_size_pixels_,
dfh_display_.device_scale_factor());
}
GetDelegatedFrameHost()->EmbedSurface(
dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceId(),
dfh_size_dip_, GetDeadlinePolicy());
......
......@@ -146,6 +146,11 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
ui::GestureProviderConfigType::CURRENT_PLATFORM),
this),
weak_factory_(this) {
display_only_using_parent_ui_layer_ = !features::IsViewsBrowserCocoa();
// TODO(ccameron): This path breaks content_shell because content_shell does
// not display using ui::Views, even when !features::IsViewsBrowserCocoa.
display_only_using_parent_ui_layer_ = false;
// The NSView is on the other side of |ns_view_bridge_|.
ns_view_bridge_ = RenderWidgetHostNSViewBridge::Create(this);
......@@ -204,8 +209,8 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
}
void RenderWidgetHostViewMac::SetParentUiLayer(ui::Layer* parent_ui_layer) {
if (parent_ui_layer)
display_only_using_parent_ui_layer_ = true;
if (!display_only_using_parent_ui_layer_)
return;
if (browser_compositor_)
browser_compositor_->SetParentUiLayer(parent_ui_layer);
}
......
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