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

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

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: Use seperate bool for set_non_blocking 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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 required_state = blink::WebTouchPoint::kStateUndefined; 1058 required_state = blink::WebTouchPoint::kStateUndefined;
1059 NOTREACHED(); 1059 NOTREACHED();
1060 break; 1060 break;
1061 } 1061 }
1062 1062
1063 // Only send acks for one changed touch point. 1063 // Only send acks for one changed touch point.
1064 bool sent_ack = false; 1064 bool sent_ack = false;
1065 for (size_t i = 0; i < touch.event.touches_length; ++i) { 1065 for (size_t i = 0; i < touch.event.touches_length; ++i) {
1066 if (touch.event.touches[i].state == required_state) { 1066 if (touch.event.touches[i].state == required_state) {
1067 DCHECK(!sent_ack); 1067 DCHECK(!sent_ack);
1068 host->dispatcher()->ProcessedTouchEvent(touch.event.unique_touch_event_id, 1068 host->dispatcher()->ProcessedTouchEvent(
1069 window_, result); 1069 touch.event.unique_touch_event_id, window_, result,
1070 InputEventAckStateIsSetNonBlocking(ack_result));
1070 sent_ack = true; 1071 sent_ack = true;
1071 } 1072 }
1072 } 1073 }
1073 } 1074 }
1074 1075
1075 std::unique_ptr<SyntheticGestureTarget> 1076 std::unique_ptr<SyntheticGestureTarget>
1076 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() { 1077 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() {
1077 return std::unique_ptr<SyntheticGestureTarget>( 1078 return std::unique_ptr<SyntheticGestureTarget>(
1078 new SyntheticGestureTargetAura(host_)); 1079 new SyntheticGestureTargetAura(host_));
1079 } 1080 }
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 } 2408 }
2408 2409
2409 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() { 2410 void RenderWidgetHostViewAura::UpdateNeedsBeginFramesInternal() {
2410 if (!delegated_frame_host_) 2411 if (!delegated_frame_host_)
2411 return; 2412 return;
2412 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ || 2413 delegated_frame_host_->SetNeedsBeginFrames(needs_begin_frames_ ||
2413 needs_flush_input_); 2414 needs_flush_input_);
2414 } 2415 }
2415 2416
2416 } // namespace content 2417 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698