Adding tracing to measure synthetic smooth scrolling correctness
BUG=162926 Review URL: https://chromiumcodereview.appspot.com/11413199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170642 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
#include "cc/scrollbar_animation_controller.h"
|
||||
|
||||
#include "base/debug/trace_event.h"
|
||||
#include "base/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "cc/scrollbar_layer_impl.h"
|
||||
@ -80,6 +81,12 @@ void ScrollbarAnimationController::updateScrollOffsetAtTime(LayerImpl* scrollLay
|
||||
m_totalSize = getScrollLayerBounds(scrollLayer);
|
||||
m_maximum = scrollLayer->maxScrollOffset();
|
||||
|
||||
// Get the m_currentOffset.y() value for a sanity-check on scrolling
|
||||
// benchmark metrics. Specifically, we want to make sure
|
||||
// BasicMouseWheelSmoothScrollGesture has proper scroll curves.
|
||||
TRACE_COUNTER_ID1("gpu", "scroll_offset_y", this, m_currentOffset.y());
|
||||
|
||||
|
||||
if (m_horizontalScrollbarLayer) {
|
||||
m_horizontalScrollbarLayer->setCurrentPos(m_currentOffset.x());
|
||||
m_horizontalScrollbarLayer->setTotalSize(m_totalSize.width());
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "content/browser/renderer_host/render_widget_host_view_base.h"
|
||||
|
||||
#include "base/debug/trace_event.h"
|
||||
#include "base/logging.h"
|
||||
#include "content/browser/accessibility/browser_accessibility_manager.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
@ -460,6 +461,9 @@ class BasicMouseWheelSmoothScrollGesture
|
||||
|
||||
pixels_scrolled_ += abs(event.deltaY);
|
||||
|
||||
TRACE_COUNTER_ID1("gpu", "smooth_scroll_by_pixels_scrolled", this,
|
||||
pixels_scrolled_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user