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

Unified Diff: content/common/input/event_with_latency_info.h

Issue 2162143002: Don't use PostTask queueing between compositor and main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't ack mouse move right away send them unthrottled Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/common/input/event_with_latency_info.h
diff --git a/content/common/input/event_with_latency_info.h b/content/common/input/event_with_latency_info.h
index cdfdb6ea1995309b9ee4140d9621a3772853712f..8c83e3e8ee96a0005f250150da2f0f42a6e64ca2 100644
--- a/content/common/input/event_with_latency_info.h
+++ b/content/common/input/event_with_latency_info.h
@@ -8,6 +8,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "content/common/content_export.h"
+#include "content/common/input/scoped_web_input_event.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/latency_info.h"
@@ -34,6 +35,27 @@ void CONTENT_EXPORT Coalesce(const blink::WebGestureEvent& event_to_coalesce,
} // namespace internal
+class ScopedWebInputEventWithLatencyInfo {
+ public:
+ ScopedWebInputEventWithLatencyInfo(const blink::WebInputEvent& e,
+ const ui::LatencyInfo& l);
+
+ ~ScopedWebInputEventWithLatencyInfo();
+
+ bool CanCoalesceWith(const ScopedWebInputEventWithLatencyInfo& other) const
+ WARN_UNUSED_RESULT;
+
+ const blink::WebInputEvent& event() const;
+ blink::WebInputEvent& event();
+ const ui::LatencyInfo latencyInfo() const { return latency_; }
+
+ void CoalesceWith(const ScopedWebInputEventWithLatencyInfo& other);
+
+ private:
+ ScopedWebInputEvent event_;
+ mutable ui::LatencyInfo latency_;
tdresser 2016/07/20 20:52:27 I don't feel great about this being mutable. It's
+};
+
template <typename T>
class EventWithLatencyInfo {
public:

Powered by Google App Engine
This is Rietveld 408576698