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

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

Issue 10802026: Boost frame rate measurement histogram range by 2x (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 webwidget_->instrumentCancelFrame(); 865 webwidget_->instrumentCancelFrame();
866 return; 866 return;
867 } 867 }
868 868
869 if (!last_do_deferred_update_time_.is_null()) { 869 if (!last_do_deferred_update_time_.is_null()) {
870 base::TimeDelta delay = frame_begin_ticks - last_do_deferred_update_time_; 870 base::TimeDelta delay = frame_begin_ticks - last_do_deferred_update_time_;
871 if (is_accelerated_compositing_active_) { 871 if (is_accelerated_compositing_active_) {
872 UMA_HISTOGRAM_CUSTOM_TIMES("Renderer4.AccelDoDeferredUpdateDelay", 872 UMA_HISTOGRAM_CUSTOM_TIMES("Renderer4.AccelDoDeferredUpdateDelay",
873 delay, 873 delay,
874 base::TimeDelta::FromMilliseconds(1), 874 base::TimeDelta::FromMilliseconds(1),
875 base::TimeDelta::FromMilliseconds(60), 875 base::TimeDelta::FromMilliseconds(120),
876 30); 876 60);
877 } else { 877 } else {
878 UMA_HISTOGRAM_CUSTOM_TIMES("Renderer4.SoftwareDoDeferredUpdateDelay", 878 UMA_HISTOGRAM_CUSTOM_TIMES("Renderer4.SoftwareDoDeferredUpdateDelay",
879 delay, 879 delay,
880 base::TimeDelta::FromMilliseconds(1), 880 base::TimeDelta::FromMilliseconds(1),
881 base::TimeDelta::FromMilliseconds(60), 881 base::TimeDelta::FromMilliseconds(120),
882 30); 882 60);
883 } 883 }
884 884
885 // Calculate filtered time per frame: 885 // Calculate filtered time per frame:
886 float frame_time_elapsed = static_cast<float>(delay.InSecondsF()); 886 float frame_time_elapsed = static_cast<float>(delay.InSecondsF());
887 filtered_time_per_frame_ = 887 filtered_time_per_frame_ =
888 0.9f * filtered_time_per_frame_ + 0.1f * frame_time_elapsed; 888 0.9f * filtered_time_per_frame_ + 0.1f * frame_time_elapsed;
889 } 889 }
890 last_do_deferred_update_time_ = frame_begin_ticks; 890 last_do_deferred_update_time_ = frame_begin_ticks;
891 891
892 // OK, save the pending update to a local since painting may cause more 892 // OK, save the pending update to a local since painting may cause more
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far)); 1773 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far));
1774 } 1774 }
1775 1775
1776 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1776 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1777 return false; 1777 return false;
1778 } 1778 }
1779 1779
1780 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1780 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1781 return false; 1781 return false;
1782 } 1782 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698