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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2951973002: Reland of [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: Created 3 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 required_state = blink::WebTouchPoint::kStateUndefined; 1050 required_state = blink::WebTouchPoint::kStateUndefined;
1051 NOTREACHED(); 1051 NOTREACHED();
1052 break; 1052 break;
1053 } 1053 }
1054 1054
1055 // Only send acks for one changed touch point. 1055 // Only send acks for one changed touch point.
1056 bool sent_ack = false; 1056 bool sent_ack = false;
1057 for (size_t i = 0; i < touch.event.touches_length; ++i) { 1057 for (size_t i = 0; i < touch.event.touches_length; ++i) {
1058 if (touch.event.touches[i].state == required_state) { 1058 if (touch.event.touches[i].state == required_state) {
1059 DCHECK(!sent_ack); 1059 DCHECK(!sent_ack);
1060 host->dispatcher()->ProcessedTouchEvent(touch.event.unique_touch_event_id, 1060 host->dispatcher()->ProcessedTouchEvent(
1061 window_, result); 1061 touch.event.unique_touch_event_id, window_, result,
1062 InputEventAckStateIsSetNonBlocking(ack_result));
1062 sent_ack = true; 1063 sent_ack = true;
1063 } 1064 }
1064 } 1065 }
1065 } 1066 }
1066 1067
1067 std::unique_ptr<SyntheticGestureTarget> 1068 std::unique_ptr<SyntheticGestureTarget>
1068 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() { 1069 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() {
1069 return std::unique_ptr<SyntheticGestureTarget>( 1070 return std::unique_ptr<SyntheticGestureTarget>(
1070 new SyntheticGestureTargetAura(host_)); 1071 new SyntheticGestureTargetAura(host_));
1071 } 1072 }
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); 2421 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr);
2421 } 2422 }
2422 2423
2423 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { 2424 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() {
2424 if (!delegated_frame_host_) 2425 if (!delegated_frame_host_)
2425 return; 2426 return;
2426 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_); 2427 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_);
2427 } 2428 }
2428 2429
2429 } // namespace content 2430 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698