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

Side by Side Diff: content/browser/renderer_host/input/touch_event_queue.h

Issue 565033002: Avoid heap allocation with uncoalesced touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_event_queue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void ForwardNextEventToRenderer(); 153 void ForwardNextEventToRenderer();
154 154
155 // Pops the touch-event from the head of the queue and acks it to the client. 155 // Pops the touch-event from the head of the queue and acks it to the client.
156 void PopTouchEventToClient(InputEventAckState ack_result); 156 void PopTouchEventToClient(InputEventAckState ack_result);
157 157
158 // Pops the touch-event from the top of the queue and acks it to the client, 158 // Pops the touch-event from the top of the queue and acks it to the client,
159 // updating the event with |renderer_latency_info|. 159 // updating the event with |renderer_latency_info|.
160 void PopTouchEventToClient(InputEventAckState ack_result, 160 void PopTouchEventToClient(InputEventAckState ack_result,
161 const ui::LatencyInfo& renderer_latency_info); 161 const ui::LatencyInfo& renderer_latency_info);
162 162
163 // Ack all coalesced events in |acked_event| to the client with |ack_result|. 163 // Ack all coalesced events in |acked_event| to the client with |ack_result|,
164 // updating the acked events with |optional_latency_info| if it exists.
164 void AckTouchEventToClient(InputEventAckState ack_result, 165 void AckTouchEventToClient(InputEventAckState ack_result,
165 scoped_ptr<CoalescedWebTouchEvent> acked_event); 166 scoped_ptr<CoalescedWebTouchEvent> acked_event,
167 const ui::LatencyInfo* optional_latency_info);
166 168
167 // Safely pop the head of the queue. 169 // Safely pop the head of the queue.
168 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent(); 170 scoped_ptr<CoalescedWebTouchEvent> PopTouchEvent();
169 171
170 // Dispatch |touch| to the client. 172 // Dispatch |touch| to the client.
171 void SendTouchEventImmediately(const TouchEventWithLatencyInfo& touch); 173 void SendTouchEventImmediately(const TouchEventWithLatencyInfo& touch);
172 174
173 enum PreFilterResult { 175 enum PreFilterResult {
174 ACK_WITH_NO_CONSUMER_EXISTS, 176 ACK_WITH_NO_CONSUMER_EXISTS,
175 ACK_WITH_NOT_CONSUMED, 177 ACK_WITH_NOT_CONSUMED,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // setting for experimentation, but we may evolve it into an app-controlled 241 // setting for experimentation, but we may evolve it into an app-controlled
240 // mode. 242 // mode.
241 const TouchScrollingMode touch_scrolling_mode_; 243 const TouchScrollingMode touch_scrolling_mode_;
242 244
243 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); 245 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue);
244 }; 246 };
245 247
246 } // namespace content 248 } // namespace content
247 249
248 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 250 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698