Commit 2238f365 authored by jbauman@chromium.org's avatar jbauman@chromium.org

Remove RenderWidget::scheduleAnimation

animation_update_pending_ is never reset to false, so this almost never does anything, and shouldn't matter with threaded compositor.

BUG=362164

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269472 0039d316-1c4b-4281-b951-d872f2087c98
parent 8ca7c6b6
......@@ -386,7 +386,6 @@ RenderWidget::RenderWidget(blink::WebPopupType popup_type,
pending_window_rect_count_(0),
suppress_next_char_events_(false),
is_accelerated_compositing_active_(false),
animation_update_pending_(false),
invalidation_task_posted_(false),
screen_info_(screen_info),
device_scale_factor_(screen_info_.deviceScaleFactor),
......@@ -1144,15 +1143,6 @@ void RenderWidget::ClearFocus() {
webwidget_->setFocus(false);
}
void RenderWidget::AnimationCallback() {
TRACE_EVENT0("renderer", "RenderWidget::AnimationCallback");
if (!animation_update_pending_) {
TRACE_EVENT0("renderer", "EarlyOut_NoAnimationUpdatePending");
return;
}
FlushPendingInputEventAck();
}
void RenderWidget::InvalidationCallback() {
TRACE_EVENT0("renderer", "RenderWidget::InvalidationCallback");
invalidation_task_posted_ = false;
......@@ -1179,13 +1169,6 @@ void RenderWidget::didInvalidateRect(const WebRect& rect) {
if (invalidation_task_posted_)
return;
// When GPU rendering, combine pending animations and invalidations into
// a single update.
if (is_accelerated_compositing_active_ &&
animation_update_pending_ &&
animation_timer_.IsRunning())
return;
// Perform updating asynchronously. This serves two purposes:
// 1) Ensures that we call WebView::Paint without a bunch of other junk
// on the call stack.
......@@ -1213,13 +1196,6 @@ void RenderWidget::didScrollRect(int dx, int dy,
if (invalidation_task_posted_)
return;
// When GPU rendering, combine pending animations and invalidations into
// a single update.
if (is_accelerated_compositing_active_ &&
animation_update_pending_ &&
animation_timer_.IsRunning())
return;
// Perform updating asynchronously. This serves two purposes:
// 1) Ensures that we call WebView::Paint without a bunch of other junk
// on the call stack.
......@@ -1384,18 +1360,6 @@ void RenderWidget::scheduleComposite() {
}
}
void RenderWidget::scheduleAnimation() {
if (animation_update_pending_)
return;
TRACE_EVENT0("gpu", "RenderWidget::scheduleAnimation");
animation_update_pending_ = true;
if (!animation_timer_.IsRunning()) {
animation_timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(0), this,
&RenderWidget::AnimationCallback);
}
}
void RenderWidget::didChangeCursor(const WebCursorInfo& cursor_info) {
// TODO(darin): Eliminate this temporary.
WebCursor cursor;
......
......@@ -133,7 +133,6 @@ class CONTENT_EXPORT RenderWidget
virtual void didCommitAndDrawCompositorFrame();
virtual void didCompleteSwapBuffers();
virtual void scheduleComposite();
virtual void scheduleAnimation();
virtual void didFocus();
virtual void didBlur();
virtual void didChangeCursor(const blink::WebCursorInfo&);
......@@ -303,7 +302,6 @@ class CONTENT_EXPORT RenderWidget
// active RenderWidgets.
void SetSwappedOut(bool is_swapped_out);
void AnimationCallback();
void InvalidationCallback();
void FlushPendingInputEventAck();
void DoDeferredClose();
......@@ -659,8 +657,6 @@ class CONTENT_EXPORT RenderWidget
// compositor.
bool is_accelerated_compositing_active_;
base::OneShotTimer<RenderWidget> animation_timer_;
bool animation_update_pending_;
bool invalidation_task_posted_;
// Stats for legacy software mode
......
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