Commit 860f3c63 authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

Revert "Reland "chromeos: makes resizes smoother with mash""

This reverts commit fca998b7.

Reason for revert: crbug.com/931878, touch tab-dragging gets broken

Original change's description:
> Reland "chromeos: makes resizes smoother with mash"
> 
> This reverts commit 643813e1.
> 
> Reason for revert: My test was wrong, we actually block mouse on device in certain modes. Sorry for the noise.
> 
> Original change's description:
> > Revert "chromeos: makes resizes smoother with mash"
> > 
> > This reverts commit b805090b.
> > 
> > Reason for revert: This makes the mouse get stuck hidden on device.
> > 
> > Original change's description:
> > > chromeos: makes resizes smoother with mash
> > > 
> > > This contains two changes:
> > > 1. Adds call from ClientRoot to Compositor::OnChildResizing(). This ensures
> > >    that WindowTreeHost doesn't dispatch move events until the frame has been
> > >    activated.
> > > 2. Converts resetting of pointer moves lock from OnCompositingDidCommit()
> > >    to OnCompositingEnded(). OnCompositingDidCommit() seems to be called much
> > >    to earlier in the mash case, and results in jank when resizing.
> > > 
> > > BUG=929914
> > > TEST=none
> > > 
> > > Change-Id: I68d87d6e7f237f246c2fad6218d9da5356c98641
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1467917
> > > Commit-Queue: Scott Violet <sky@chromium.org>
> > > Reviewed-by: Saman Sami <samans@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#631743}
> > 
> > TBR=sky@chromium.org,samans@chromium.org
> > 
> > Change-Id: Iaf103ed66885da652c7013fcc412b0269e10b303
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 929914
> > Reviewed-on: https://chromium-review.googlesource.com/c/1470935
> > Reviewed-by: Scott Violet <sky@chromium.org>
> > Commit-Queue: Scott Violet <sky@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#631803}
> 
> TBR=sky@chromium.org,samans@chromium.org
> 
> Change-Id: I828256b878dfb8f5a8ec0bbd6c6c533e091ddb5f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 929914
> Reviewed-on: https://chromium-review.googlesource.com/c/1471010
> Reviewed-by: Scott Violet <sky@chromium.org>
> Commit-Queue: Scott Violet <sky@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#631820}

TBR=sky@chromium.org,samans@chromium.org

Change-Id: Id7eb67f636e13677122c6a8bd0c8e50bd4b51986
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 929914
Reviewed-on: https://chromium-review.googlesource.com/c/1471493Reviewed-by: default avatarJun Mukai <mukai@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632024}
parent 35e5751c
...@@ -129,7 +129,7 @@ class OverviewSessionTest : public AshTestBase { ...@@ -129,7 +129,7 @@ class OverviewSessionTest : public AshTestBase {
void SetUp() override { void SetUp() override {
AshTestBase::SetUp(); AshTestBase::SetUp();
Shell::Get()->aura_env()->set_throttle_input_on_resize_for_testing(false);
shelf_view_test_api_ = std::make_unique<ShelfViewTestAPI>( shelf_view_test_api_ = std::make_unique<ShelfViewTestAPI>(
GetPrimaryShelf()->GetShelfViewForTesting()); GetPrimaryShelf()->GetShelfViewForTesting());
shelf_view_test_api_->SetAnimationDuration(1); shelf_view_test_api_->SetAnimationDuration(1);
......
...@@ -92,7 +92,6 @@ class WindowServiceDelegateImplTest : public AshTestBase { ...@@ -92,7 +92,6 @@ class WindowServiceDelegateImplTest : public AshTestBase {
// AshTestBase: // AshTestBase:
void SetUp() override { void SetUp() override {
AshTestBase::SetUp(); AshTestBase::SetUp();
Shell::Get()->aura_env()->set_throttle_input_on_resize_for_testing(false);
NonClientFrameViewAsh::use_empty_minimum_size_for_test_ = true; NonClientFrameViewAsh::use_empty_minimum_size_for_test_ = true;
top_level_ = CreateTestWindow(gfx::Rect(100, 100, 100, 100)); top_level_ = CreateTestWindow(gfx::Rect(100, 100, 100, 100));
ASSERT_TRUE(top_level_); ASSERT_TRUE(top_level_);
......
...@@ -252,12 +252,6 @@ void ClientRoot::UpdateLocalSurfaceIdAndClientSurfaceEmbedder() { ...@@ -252,12 +252,6 @@ void ClientRoot::UpdateLocalSurfaceIdAndClientSurfaceEmbedder() {
window_->GetFrameSinkId(), window_->GetFrameSinkId(),
proxy_window->local_surface_id_allocation()->local_surface_id()); proxy_window->local_surface_id_allocation()->local_surface_id());
client_surface_embedder_->SetSurfaceId(surface_id); client_surface_embedder_->SetSurfaceId(surface_id);
// This triggers holding events until the frame has been activated. This
// ensures smooth resizes.
if (ShouldAssignLocalSurfaceId() && window_->GetHost())
window_->GetHost()->compositor()->OnChildResizing();
if (fallback_surface_info_) { if (fallback_surface_info_) {
client_surface_embedder_->SetFallbackSurfaceInfo(*fallback_surface_info_); client_surface_embedder_->SetFallbackSurfaceInfo(*fallback_surface_info_);
fallback_surface_info_.reset(); fallback_surface_info_.reset();
...@@ -414,8 +408,6 @@ void ClientRoot::OnHostResized(aura::WindowTreeHost* host) { ...@@ -414,8 +408,6 @@ void ClientRoot::OnHostResized(aura::WindowTreeHost* host) {
void ClientRoot::OnFirstSurfaceActivation( void ClientRoot::OnFirstSurfaceActivation(
const viz::SurfaceInfo& surface_info) { const viz::SurfaceInfo& surface_info) {
// TODO(sky): saman says the SetFallbackSurfaceInfo() should not be needed
// anymore.
ProxyWindow* proxy_window = ProxyWindow::GetMayBeNull(window_); ProxyWindow* proxy_window = ProxyWindow::GetMayBeNull(window_);
if (proxy_window->local_surface_id_allocation().has_value()) { if (proxy_window->local_surface_id_allocation().has_value()) {
DCHECK(!fallback_surface_info_); DCHECK(!fallback_surface_info_);
......
...@@ -140,9 +140,6 @@ WindowServiceTestSetup::WindowServiceTestSetup() ...@@ -140,9 +140,6 @@ WindowServiceTestSetup::WindowServiceTestSetup()
ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory,
&context_factory_private); &context_factory_private);
aura_test_helper_.SetUp(context_factory, context_factory_private); aura_test_helper_.SetUp(context_factory, context_factory_private);
// The resize throttle may interfere with tests, so disable it. If specific
// tests want the throttle, they can enable it.
aura::Env::GetInstance()->set_throttle_input_on_resize_for_testing(false);
scoped_capture_client_ = std::make_unique<wm::ScopedCaptureClient>( scoped_capture_client_ = std::make_unique<wm::ScopedCaptureClient>(
aura_test_helper_.root_window()); aura_test_helper_.root_window());
service_ = service_ =
......
...@@ -540,7 +540,7 @@ void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location, ...@@ -540,7 +540,7 @@ void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location,
dispatcher()->OnCursorMovedToRootLocation(root_location); dispatcher()->OnCursorMovedToRootLocation(root_location);
} }
void WindowTreeHost::OnCompositingEnded(ui::Compositor* compositor) { void WindowTreeHost::OnCompositingDidCommit(ui::Compositor* compositor) {
if (!holding_pointer_moves_) if (!holding_pointer_moves_)
return; return;
......
...@@ -341,7 +341,7 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, ...@@ -341,7 +341,7 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate,
const gfx::Point& host_location); const gfx::Point& host_location);
// Overrided from CompositorObserver: // Overrided from CompositorObserver:
void OnCompositingEnded(ui::Compositor* compositor) override; void OnCompositingDidCommit(ui::Compositor* compositor) override;
void OnCompositingChildResizing(ui::Compositor* compositor) override; void OnCompositingChildResizing(ui::Compositor* compositor) override;
void OnCompositingShuttingDown(ui::Compositor* compositor) override; void OnCompositingShuttingDown(ui::Compositor* compositor) override;
......
...@@ -59,8 +59,8 @@ TEST_F(WindowTreeHostTest, HoldPointerMovesOnChildResizing) { ...@@ -59,8 +59,8 @@ TEST_F(WindowTreeHostTest, HoldPointerMovesOnChildResizing) {
// effect of prioritizing the resize event above other operations in aura. // effect of prioritizing the resize event above other operations in aura.
EXPECT_TRUE(dispatcher_api.HoldingPointerMoves()); EXPECT_TRUE(dispatcher_api.HoldingPointerMoves());
// Wait for a CompositorFrame to be activated. // Wait for a CompositorFrame to be submitted.
ui::DrawWaiterForTest::WaitForCompositingEnded(host()->compositor()); ui::DrawWaiterForTest::WaitForCompositingStarted(host()->compositor());
// Pointer moves should be routed normally after commit. // Pointer moves should be routed normally after commit.
EXPECT_FALSE(dispatcher_api.HoldingPointerMoves()); EXPECT_FALSE(dispatcher_api.HoldingPointerMoves());
......
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