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

Side by Side Diff: ui/events/blink/event_with_callback.h

Issue 2695603004: [VSync Queue] Add tracing for event queuing time and coalesced count (Closed)
Patch Set: Add comments for nestable tracing and |first_original_event()| Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef UI_EVENTS_BLINK_EVENT_WITH_CALLBACK_H_ 5 #ifndef UI_EVENTS_BLINK_EVENT_WITH_CALLBACK_H_
6 #define UI_EVENTS_BLINK_EVENT_WITH_CALLBACK_H_ 6 #define UI_EVENTS_BLINK_EVENT_WITH_CALLBACK_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "ui/events/blink/input_handler_proxy.h" 10 #include "ui/events/blink/input_handler_proxy.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 std::unique_ptr<DidOverscrollParams>); 48 std::unique_ptr<DidOverscrollParams>);
49 49
50 const blink::WebInputEvent& event() const { return *event_; } 50 const blink::WebInputEvent& event() const { return *event_; }
51 const LatencyInfo latency_info() const { return latency_; } 51 const LatencyInfo latency_info() const { return latency_; }
52 base::TimeTicks creation_timestamp() const { return creation_timestamp_; } 52 base::TimeTicks creation_timestamp() const { return creation_timestamp_; }
53 base::TimeTicks last_coalesced_timestamp() const { 53 base::TimeTicks last_coalesced_timestamp() const {
54 return last_coalesced_timestamp_; 54 return last_coalesced_timestamp_;
55 } 55 }
56 size_t coalesced_count() const { return original_events_.size(); } 56 size_t coalesced_count() const { return original_events_.size(); }
57 OriginalEventList& original_events() { return original_events_; } 57 OriginalEventList& original_events() { return original_events_; }
58 // |first_original_event()| is used as ID for tracing.
59 blink::WebInputEvent* first_original_event() {
60 return original_events_.empty() ? nullptr
61 : original_events_.front().event_.get();
62 }
58 63
59 private: 64 private:
60 friend class test::InputHandlerProxyEventQueueTest; 65 friend class test::InputHandlerProxyEventQueueTest;
61 66
62 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); 67 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
63 68
64 WebScopedInputEvent event_; 69 WebScopedInputEvent event_;
65 LatencyInfo latency_; 70 LatencyInfo latency_;
66 OriginalEventList original_events_; 71 OriginalEventList original_events_;
67 72
68 base::TimeTicks creation_timestamp_; 73 base::TimeTicks creation_timestamp_;
69 base::TimeTicks last_coalesced_timestamp_; 74 base::TimeTicks last_coalesced_timestamp_;
70 }; 75 };
71 76
72 } // namespace ui 77 } // namespace ui
73 78
74 #endif // UI_EVENTS_BLINK_EVENT_WITH_CALLBACK_H_ 79 #endif // UI_EVENTS_BLINK_EVENT_WITH_CALLBACK_H_
OLDNEW
« no previous file with comments | « ui/events/blink/compositor_thread_event_queue.cc ('k') | ui/events/blink/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698