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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: boolean flags used instead of fieldbit Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 const gfx::Vector2dF& inner_delta, 1037 const gfx::Vector2dF& inner_delta,
1038 const gfx::Vector2dF& outer_delta, 1038 const gfx::Vector2dF& outer_delta,
1039 const gfx::Vector2dF& elastic_overscroll_delta, 1039 const gfx::Vector2dF& elastic_overscroll_delta,
1040 float page_scale, 1040 float page_scale,
1041 float top_controls_delta) { 1041 float top_controls_delta) {
1042 delegate_->ApplyViewportDeltas(inner_delta, outer_delta, 1042 delegate_->ApplyViewportDeltas(inner_delta, outer_delta,
1043 elastic_overscroll_delta, page_scale, 1043 elastic_overscroll_delta, page_scale,
1044 top_controls_delta); 1044 top_controls_delta);
1045 } 1045 }
1046 1046
1047 void RenderWidgetCompositor::RecordWheelAndTouchScrollingCount(
1048 bool has_scrolled_by_wheel,
1049 bool has_scrolled_by_touch) {
1050 delegate_->RecordWheelAndTouchScrollingCount(has_scrolled_by_wheel,
1051 has_scrolled_by_touch);
1052 }
1053
1047 void RenderWidgetCompositor::RequestNewCompositorFrameSink() { 1054 void RenderWidgetCompositor::RequestNewCompositorFrameSink() {
1048 // If the host is closing, then no more compositing is possible. This 1055 // If the host is closing, then no more compositing is possible. This
1049 // prevents shutdown races between handling the close message and 1056 // prevents shutdown races between handling the close message and
1050 // the CreateCompositorFrameSink task. 1057 // the CreateCompositorFrameSink task.
1051 if (delegate_->IsClosing()) 1058 if (delegate_->IsClosing())
1052 return; 1059 return;
1053 1060
1054 bool fallback = num_failed_recreate_attempts_ >= 1061 bool fallback = num_failed_recreate_attempts_ >=
1055 COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK; 1062 COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK;
1056 std::unique_ptr<cc::CompositorFrameSink> surface( 1063 std::unique_ptr<cc::CompositorFrameSink> surface(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 1135
1129 void RenderWidgetCompositor::SetIsForOopif(bool is_for_oopif) { 1136 void RenderWidgetCompositor::SetIsForOopif(bool is_for_oopif) {
1130 is_for_oopif_ = is_for_oopif; 1137 is_for_oopif_ = is_for_oopif;
1131 } 1138 }
1132 1139
1133 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { 1140 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) {
1134 layer_tree_host_->SetContentSourceId(id); 1141 layer_tree_host_->SetContentSourceId(id);
1135 } 1142 }
1136 1143
1137 } // namespace content 1144 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698