summaryrefslogtreecommitdiffstats
path: root/cc/input
diff options
context:
space:
mode:
authormiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-08 06:47:31 +0000
committermiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-08 06:47:31 +0000
commit6be422be283bff883a198254047ff23dc2f4baa0 (patch)
tree0d945e2cd10fdc1f15ab9c3bd6a212e379ea270c /cc/input
parent81ebff3b727b9e86317a235d4b97f9c718471fc0 (diff)
downloadchromium_src-6be422be283bff883a198254047ff23dc2f4baa0.zip
chromium_src-6be422be283bff883a198254047ff23dc2f4baa0.tar.gz
chromium_src-6be422be283bff883a198254047ff23dc2f4baa0.tar.bz2
For main thread event handling, if event causes
SetNeedsCommit, SetNeedsUpdateLayer or SetNeedsAnimate during event processing, then it is considered to cause rendering and its LatencyInfo is pushed into LayerTreeHost through LatencyInfoSwapPromise. For impl thread event handling, if event causes SetNeedsRedraw or SetNeedsRedrawRect during event processing, then it is considered to cause rendering and its LatencyInfo is pushed into LayerTreeHostImpl through LatencyInfoSwapPromise. BUG=246034, 271583 TEST=Manually tested on Pixel. The LatencyInfo for events that causes impl/main thread scrolling are correctly passed to LTH/LTHI. Review URL: https://codereview.chromium.org/55273003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/input')
-rw-r--r--cc/input/input_handler.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h
index 00446b5..fde89d2 100644
--- a/cc/input/input_handler.h
+++ b/cc/input/input_handler.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/time/time.h"
#include "cc/base/cc_export.h"
+#include "cc/base/swap_promise_monitor.h"
#include "cc/input/scrollbar.h"
namespace gfx {
@@ -126,8 +127,13 @@ class CC_EXPORT InputHandler {
virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_point) = 0;
- virtual void SetLatencyInfoForInputEvent(
- const ui::LatencyInfo& latency_info) = 0;
+ // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped
+ // LatencyInfoSwapPromiseMonitor. During the life time of the
+ // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect()
+ // is called on LayerTreeHostImpl, the original latency info will be turned
+ // into a LatencyInfoSwapPromise.
+ virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
+ ui::LatencyInfo* latency) = 0;
protected:
InputHandler() {}