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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.cc

Issue 11413199: Adding tracing to measure synthetic smooth scrolling correctness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
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/browser/renderer_host/render_widget_host_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/debug/trace_event.h"
7 #include "base/logging.h" 8 #include "base/logging.h"
8 #include "content/browser/accessibility/browser_accessibility_manager.h" 9 #include "content/browser/accessibility/browser_accessibility_manager.h"
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/port/browser/smooth_scroll_gesture.h" 11 #include "content/port/browser/smooth_scroll_gesture.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
12 #include "ui/gfx/display.h" 13 #include "ui/gfx/display.h"
13 #include "ui/gfx/screen.h" 14 #include "ui/gfx/screen.h"
14 15
15 #if defined(OS_WIN) 16 #if defined(OS_WIN)
16 #include "base/command_line.h" 17 #include "base/command_line.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 event.globalX = 0; 454 event.globalX = 0;
454 event.globalY = 0; 455 event.globalY = 0;
455 event.x = mouse_event_x_; 456 event.x = mouse_event_x_;
456 event.y = mouse_event_y_; 457 event.y = mouse_event_y_;
457 event.windowX = event.x; 458 event.windowX = event.x;
458 event.windowY = event.y; 459 event.windowY = event.y;
459 host->ForwardWheelEvent(event); 460 host->ForwardWheelEvent(event);
460 461
461 pixels_scrolled_ += abs(event.deltaY); 462 pixels_scrolled_ += abs(event.deltaY);
462 463
464 TRACE_COUNTER_ID1("gpu", "smooth_scroll_by_pixels_scrolled", this,
465 pixels_scrolled_);
466
463 return true; 467 return true;
464 } 468 }
465 469
466 private: 470 private:
467 virtual ~BasicMouseWheelSmoothScrollGesture() { } 471 virtual ~BasicMouseWheelSmoothScrollGesture() { }
468 bool scroll_down_; 472 bool scroll_down_;
469 int pixels_scrolled_; 473 int pixels_scrolled_;
470 int pixels_to_scroll_; 474 int pixels_to_scroll_;
471 int mouse_event_x_; 475 int mouse_event_x_;
472 int mouse_event_y_; 476 int mouse_event_y_;
473 }; 477 };
474 478
475 SmoothScrollGesture* RenderWidgetHostViewBase::CreateSmoothScrollGesture( 479 SmoothScrollGesture* RenderWidgetHostViewBase::CreateSmoothScrollGesture(
476 bool scroll_down, int pixels_to_scroll, int mouse_event_x, 480 bool scroll_down, int pixels_to_scroll, int mouse_event_x,
477 int mouse_event_y) { 481 int mouse_event_y) {
478 return new BasicMouseWheelSmoothScrollGesture(scroll_down, pixels_to_scroll, 482 return new BasicMouseWheelSmoothScrollGesture(scroll_down, pixels_to_scroll,
479 mouse_event_x, mouse_event_y); 483 mouse_event_x, mouse_event_y);
480 } 484 }
481 485
482 void RenderWidgetHostViewBase::ProcessAckedTouchEvent( 486 void RenderWidgetHostViewBase::ProcessAckedTouchEvent(
483 const WebKit::WebTouchEvent& touch, InputEventAckState ack_result) { 487 const WebKit::WebTouchEvent& touch, InputEventAckState ack_result) {
484 } 488 }
485 489
486 } // namespace content 490 } // namespace content
OLDNEW
« cc/scrollbar_animation_controller.cc ('K') | « cc/scrollbar_animation_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698