Commit 8f497405 authored by piman@chromium.org's avatar piman@chromium.org

Remove GetViewBoundsWithResizeLock.

Before delegated rendering, it was needed to throttle resizes beyond the
existing resize ack mechanism, because we could receive the frame after
the ViewHostMsg_UpdateRect with the ack.
With delegated rendering, we receive the frame before the ack (ack is
sent in RenderWidget::didCompleteSwapBuffers, which necessarily happens
after CompositorOutputSurface::SwapBuffers which sends the
ViewHostMsg_SwapCompositorFrame)

This then avoids RenderWidgetHostViewAura::GetViewBounds from changing
based on renderer state, which removes transient states (and related
test flakiness).

This depends on https://codereview.chromium.org/286053002/ because this
exposes test flakiness.

BUG=None

Review URL: https://codereview.chromium.org/286953002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270786 0039d316-1c4b-4281-b951-d872f2087c98
parent cd992f1f
......@@ -120,14 +120,6 @@ void DelegatedFrameHost::RequestCopyOfOutput(
client_->GetLayer()->RequestCopyOfOutput(request.Pass());
}
gfx::Rect DelegatedFrameHost::GetViewBoundsWithResizeLock(
const gfx::Rect& bounds) const {
if (resize_lock_.get())
return gfx::Rect(bounds.origin(), resize_lock_->expected_size());
else
return bounds;
}
void DelegatedFrameHost::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
......
......@@ -77,7 +77,6 @@ class CONTENT_EXPORT DelegatedFrameHost
DelegatedFrameHost(DelegatedFrameHostClient* client);
virtual ~DelegatedFrameHost();
gfx::Rect GetViewBoundsWithResizeLock(const gfx::Rect& bounds) const;
bool CanCopyToBitmap() const;
// Public interface exposed to RenderWidgetHostView.
......
......@@ -768,11 +768,7 @@ bool RenderWidgetHostViewAura::IsShowing() {
}
gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
// This is the size that we want the renderer to produce. While we're waiting
// for the correct frame (i.e. during a resize), don't change the size so that
// we don't pipeline more resizes than we can handle.
gfx::Rect bounds(window_->GetBoundsInScreen());
return delegated_frame_host_->GetViewBoundsWithResizeLock(bounds);
return window_->GetBoundsInScreen();
}
void RenderWidgetHostViewAura::SetBackgroundOpaque(bool opaque) {
......
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