Commit 732a9611 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

RenderWidgetHostViewMac: Remove dead code

This will help in cleaning up the issue. RenderWidgetHostViewMac no
longer participates in CATransationObserver (except for native embedders
like ContentShell, which will now have non-smooth resize).

TBR=fsamuel

Bug: 897156
Change-Id: Ifced689c801a71b4edbcc41e7f523ce0eeedc5b0
Reviewed-on: https://chromium-review.googlesource.com/c/1316673Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605161}
parent 5c14b5e3
......@@ -105,11 +105,6 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// initiate copies occur before the ui::Compositor be detached.
void SetRenderWidgetHostIsHidden(bool hidden);
// This is used to ensure that the ui::Compositor be attached to this
// NSView while its contents may be visible on-screen, even if the RWHImpl is
// hidden (e.g, because it is occluded by another window).
void SetNSViewAttachedToWindow(bool attached);
// Specify if the ui::Layer should be visible or not.
void SetViewVisible(bool visible);
......@@ -151,8 +146,6 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
void DidNavigate();
bool ShouldContinueToPauseForFrame() const;
bool ForceNewSurfaceForTesting();
ui::Compositor* GetCompositor() const;
......@@ -197,7 +190,6 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// |root_layer_| to be under |parent_ui_layer_|, if needed.
ui::Layer* parent_ui_layer_ = nullptr;
bool render_widget_host_is_hidden_ = true;
bool ns_view_attached_to_window_ = false;
BrowserCompositorMacClient* client_ = nullptr;
ui::AcceleratedWidgetMacNSView* accelerated_widget_mac_ns_view_ = nullptr;
......
......@@ -63,7 +63,6 @@ BrowserCompositorMac::BrowserCompositorMac(
frame_sink_id, this, true /* should_register_frame_sink_id */));
SetRenderWidgetHostIsHidden(render_widget_host_is_hidden);
SetNSViewAttachedToWindow(false);
}
BrowserCompositorMac::~BrowserCompositorMac() {
......@@ -218,11 +217,6 @@ void BrowserCompositorMac::SetRenderWidgetHostIsHidden(bool hidden) {
UpdateState();
}
void BrowserCompositorMac::SetNSViewAttachedToWindow(bool attached) {
ns_view_attached_to_window_ = attached;
UpdateState();
}
void BrowserCompositorMac::SetViewVisible(bool visible) {
root_layer_->SetVisible(visible);
}
......@@ -387,21 +381,6 @@ void BrowserCompositorMac::DidNavigate() {
is_first_navigation_ = false;
}
bool BrowserCompositorMac::ShouldContinueToPauseForFrame() const {
if (state_ == UseParentLayerCompositor)
return false;
// The renderer won't produce a frame if its frame sink hasn't been created
// yet.
if (!renderer_compositor_frame_sink_)
return false;
if (!recyclable_compositor_)
return false;
return !recyclable_compositor_->widget()->HasFrameOfSize(dfh_size_dip_);
}
void BrowserCompositorMac::SetParentUiLayer(ui::Layer* new_parent_ui_layer) {
if (new_parent_ui_layer)
DCHECK(new_parent_ui_layer->GetCompositor());
......
......@@ -25,7 +25,6 @@
#include "ipc/ipc_sender.h"
#include "mojo/public/cpp/bindings/associated_binding.h"
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
#include "ui/accelerated_widget_mac/ca_transaction_observer.h"
#include "ui/accelerated_widget_mac/display_link_mac.h"
#include "ui/base/cocoa/remote_layer_api.h"
#include "ui/events/gesture_detection/filtered_gesture_provider.h"
......@@ -71,7 +70,6 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
public mojom::RenderWidgetHostNSViewClient,
public BrowserCompositorMacClient,
public TextInputManager::Observer,
public ui::CATransactionCoordinator::PreCommitObserver,
public ui::GestureProviderClient,
public ui::AcceleratedWidgetMacNSView,
public IPC::Sender {
......@@ -226,10 +224,6 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
void OnTextSelectionChanged(TextInputManager* text_input_manager,
RenderWidgetHostViewBase* updated_view) override;
// ui::CATransactionCoordinator::PreCommitObserver implementation
bool ShouldWaitInPreCommit() override;
base::TimeDelta PreCommitTimeout() override;
// ui::GestureProviderClient implementation.
void OnGestureEvent(const ui::GestureEventData& gesture) override;
......
......@@ -62,10 +62,6 @@ using blink::WebMouseEvent;
using blink::WebGestureEvent;
using blink::WebTouchEvent;
namespace {
constexpr auto kContentPaintTimeout = base::TimeDelta::FromMilliseconds(167);
} // namespace
namespace content {
////////////////////////////////////////////////////////////////////////////////
......@@ -628,14 +624,6 @@ void RenderWidgetHostViewMac::OnTextSelectionChanged(
selection->range());
}
bool RenderWidgetHostViewMac::ShouldWaitInPreCommit() {
return browser_compositor_->ShouldContinueToPauseForFrame();
}
base::TimeDelta RenderWidgetHostViewMac::PreCommitTimeout() {
return kContentPaintTimeout;
}
void RenderWidgetHostViewMac::OnGestureEvent(
const ui::GestureEventData& gesture) {
blink::WebGestureEvent web_gesture =
......@@ -1461,8 +1449,6 @@ void RenderWidgetHostViewMac::OnBoundsInWindowChanged(
bool view_size_changed =
view_bounds_in_window_dip_.size() != view_bounds_in_window_dip.size();
browser_compositor_->SetNSViewAttachedToWindow(attached_to_window);
if (attached_to_window) {
view_bounds_in_window_dip_ = view_bounds_in_window_dip;
} else {
......
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