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

Unified Diff: ui/events/blink/input_handler_proxy.h

Issue 2429953002: Implement compositor thread VSync aligned event queue (Closed)
Patch Set: tdresser's review: Move CanCoalesce/Coalesce; Test queueing time Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/blink/input_handler_proxy.h
diff --git a/ui/events/blink/input_handler_proxy.h b/ui/events/blink/input_handler_proxy.h
index 546cc11b5f2a56046b37a88b2ff9737a4b3d61c3..49ac4b3018cf3a41697ac1931be96fe8e7ca1ef3 100644
--- a/ui/events/blink/input_handler_proxy.h
+++ b/ui/events/blink/input_handler_proxy.h
@@ -14,6 +14,7 @@
#include "third_party/WebKit/public/platform/WebGestureCurveTarget.h"
#include "third_party/WebKit/public/platform/WebInputEvent.h"
#include "third_party/WebKit/public/web/WebActiveWheelFlingParameters.h"
+#include "ui/events/blink/blink_features.h"
#include "ui/events/blink/input_scroll_elasticity_controller.h"
#include "ui/events/blink/scoped_web_input_event.h"
#include "ui/events/blink/synchronous_input_handler_proxy.h"
@@ -22,8 +23,11 @@ namespace ui {
namespace test {
class InputHandlerProxyTest;
+class InputHandlerProxyEventQueueTest;
}
+class CompositorThreadEventQueue;
+class EventWithCallback;
class InputHandlerProxyClient;
class InputScrollElasticityController;
class SynchronousInputHandler;
@@ -80,6 +84,7 @@ class InputHandlerProxy
float page_scale_factor,
float min_page_scale_factor,
float max_page_scale_factor) override;
+ void DeliverInputForBeginFrame() override;
// SynchronousInputHandlerProxy implementation.
void SetOnlySynchronouslyAnimateRootFlings(
@@ -104,6 +109,10 @@ class InputHandlerProxy
private:
friend class test::InputHandlerProxyTest;
+ friend class test::InputHandlerProxyEventQueueTest;
+
+ void DispatchSingleInputEvent(std::unique_ptr<EventWithCallback>);
+ void DispatchQueuedInputEvents();
// Helper functions for handling more complicated input events.
EventDisposition HandleMouseWheel(
@@ -228,6 +237,13 @@ class InputHandlerProxy
// supporting overscroll IPC notifications due to fling animation updates.
std::unique_ptr<DidOverscrollParams> current_overscroll_params_;
+ std::unique_ptr<CompositorThreadEventQueue> event_queue_;
+ bool has_ongoing_compositor_scroll_pinch_;
+ bool compositor_event_queue_enabled_;
dtapuska 2016/11/09 21:28:05 Can we use the existence of the event_queue_ as kn
chongz 2016/11/11 21:52:05 Done.
+
+ // Testing only
+ static std::unique_ptr<base::TimeTicks> testing_timestamp_now_;
+
DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy);
};

Powered by Google App Engine
This is Rietveld 408576698