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

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

Issue 476233002: Do not request vsync on touch if using synchronous compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: observing_root_window_ Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 1340
1341 void RenderWidgetHostViewAndroid::SendTouchEvent( 1341 void RenderWidgetHostViewAndroid::SendTouchEvent(
1342 const blink::WebTouchEvent& event) { 1342 const blink::WebTouchEvent& event) {
1343 if (host_) 1343 if (host_)
1344 host_->ForwardTouchEventWithLatencyInfo(event, CreateLatencyInfo(event)); 1344 host_->ForwardTouchEventWithLatencyInfo(event, CreateLatencyInfo(event));
1345 1345
1346 // Send a proactive BeginFrame on the next vsync to reduce latency. 1346 // Send a proactive BeginFrame on the next vsync to reduce latency.
1347 // This is good enough as long as the first touch event has Begin semantics 1347 // This is good enough as long as the first touch event has Begin semantics
1348 // and the actual scroll happens on the next vsync. 1348 // and the actual scroll happens on the next vsync.
1349 // TODO: Is this actually still needed? 1349 // TODO: Is this actually still needed?
1350 if (content_view_core_) { 1350 if (content_view_core_ && observing_root_window_) {
1351 content_view_core_->GetWindowAndroid()->RequestVSyncUpdate(); 1351 content_view_core_->GetWindowAndroid()->RequestVSyncUpdate();
1352 } 1352 }
1353 } 1353 }
1354 1354
1355 void RenderWidgetHostViewAndroid::SendMouseEvent( 1355 void RenderWidgetHostViewAndroid::SendMouseEvent(
1356 const blink::WebMouseEvent& event) { 1356 const blink::WebMouseEvent& event) {
1357 if (host_) 1357 if (host_)
1358 host_->ForwardMouseEvent(event); 1358 host_->ForwardMouseEvent(event);
1359 } 1359 }
1360 1360
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 results->orientationAngle = display.RotationAsDegree(); 1693 results->orientationAngle = display.RotationAsDegree();
1694 results->orientationType = 1694 results->orientationType =
1695 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1695 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1696 gfx::DeviceDisplayInfo info; 1696 gfx::DeviceDisplayInfo info;
1697 results->depth = info.GetBitsPerPixel(); 1697 results->depth = info.GetBitsPerPixel();
1698 results->depthPerComponent = info.GetBitsPerComponent(); 1698 results->depthPerComponent = info.GetBitsPerComponent();
1699 results->isMonochrome = (results->depthPerComponent == 0); 1699 results->isMonochrome = (results->depthPerComponent == 0);
1700 } 1700 }
1701 1701
1702 } // namespace content 1702 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698