Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Side by Side Diff: content/renderer/render_widget.cc

Issue 6961039: Revert r75078 now that crbug.com/72007 is fixed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_thread.h ('k') | webkit/glue/webkitclient_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 base::Time now = base::Time::Now(); 602 base::Time now = base::Time::Now();
603 if (now >= animation_floor_time_) { 603 if (now >= animation_floor_time_) {
604 animation_floor_time_ = now + base::TimeDelta::FromMilliseconds(16); 604 animation_floor_time_ = now + base::TimeDelta::FromMilliseconds(16);
605 // Set a timer to call us back after 16ms (targetting 60FPS) before 605 // Set a timer to call us back after 16ms (targetting 60FPS) before
606 // running animation callbacks so that if a callback requests another 606 // running animation callbacks so that if a callback requests another
607 // we'll be sure to run it at the proper time. 607 // we'll be sure to run it at the proper time.
608 MessageLoop::current()->PostDelayedTask(FROM_HERE, NewRunnableMethod( 608 MessageLoop::current()->PostDelayedTask(FROM_HERE, NewRunnableMethod(
609 this, &RenderWidget::AnimationCallback), 16); 609 this, &RenderWidget::AnimationCallback), 16);
610 animation_task_posted_ = true; 610 animation_task_posted_ = true;
611 animation_update_pending_ = false; 611 animation_update_pending_ = false;
612 // Explicitly pump the WebCore Timer queue to avoid starvation on OS X.
613 // See crbug.com/71735.
614 // TODO(jamesr) Remove this call once crbug.com/72007 is fixed.
615 RenderThread::current()->GetWebKitClientImpl()->DoTimeout();
616 webwidget_->animate(); 612 webwidget_->animate();
617 return; 613 return;
618 } 614 }
619 if (animation_task_posted_) 615 if (animation_task_posted_)
620 return; 616 return;
621 // This code uses base::Time::Now() to calculate the floor and next fire 617 // This code uses base::Time::Now() to calculate the floor and next fire
622 // time because javascript's Date object uses base::Time::Now(). The 618 // time because javascript's Date object uses base::Time::Now(). The
623 // message loop uses base::TimeTicks, which on windows can have a 619 // message loop uses base::TimeTicks, which on windows can have a
624 // different granularity than base::Time. 620 // different granularity than base::Time.
625 // The upshot of all this is that this function might be called before 621 // The upshot of all this is that this function might be called before
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 1269
1274 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { 1270 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) {
1275 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); 1271 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin();
1276 i != plugin_window_moves_.end(); ++i) { 1272 i != plugin_window_moves_.end(); ++i) {
1277 if (i->window == window) { 1273 if (i->window == window) {
1278 plugin_window_moves_.erase(i); 1274 plugin_window_moves_.erase(i);
1279 break; 1275 break;
1280 } 1276 }
1281 } 1277 }
1282 } 1278 }
OLDNEW
« no previous file with comments | « content/renderer/render_thread.h ('k') | webkit/glue/webkitclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698