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

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

Issue 1408213002: Add hooks for flushing input from BeginFrame dispatch on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build for real Created 5 years, 1 month 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_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/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 } 1876 }
1877 1877
1878 void RenderWidgetHostViewAndroid::OnVSync(base::TimeTicks frame_time, 1878 void RenderWidgetHostViewAndroid::OnVSync(base::TimeTicks frame_time,
1879 base::TimeDelta vsync_period) { 1879 base::TimeDelta vsync_period) {
1880 TRACE_EVENT0("cc,benchmark", "RenderWidgetHostViewAndroid::OnVSync"); 1880 TRACE_EVENT0("cc,benchmark", "RenderWidgetHostViewAndroid::OnVSync");
1881 if (!host_ || host_->is_hidden()) 1881 if (!host_ || host_->is_hidden())
1882 return; 1882 return;
1883 1883
1884 if (outstanding_vsync_requests_ & FLUSH_INPUT) { 1884 if (outstanding_vsync_requests_ & FLUSH_INPUT) {
1885 outstanding_vsync_requests_ &= ~FLUSH_INPUT; 1885 outstanding_vsync_requests_ &= ~FLUSH_INPUT;
1886 host_->FlushInput(); 1886 host_->FlushInput(frame_time);
1887 } 1887 }
1888 1888
1889 if (outstanding_vsync_requests_ & BEGIN_FRAME || 1889 if (outstanding_vsync_requests_ & BEGIN_FRAME ||
1890 outstanding_vsync_requests_ & PERSISTENT_BEGIN_FRAME) { 1890 outstanding_vsync_requests_ & PERSISTENT_BEGIN_FRAME) {
1891 outstanding_vsync_requests_ &= ~BEGIN_FRAME; 1891 outstanding_vsync_requests_ &= ~BEGIN_FRAME;
1892 SendBeginFrame(frame_time, vsync_period); 1892 SendBeginFrame(frame_time, vsync_period);
1893 } 1893 }
1894 1894
1895 // This allows for SendBeginFrame and FlushInput to modify 1895 // This allows for SendBeginFrame and FlushInput to modify
1896 // outstanding_vsync_requests. 1896 // outstanding_vsync_requests.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 results->orientationAngle = display.RotationAsDegree(); 2045 results->orientationAngle = display.RotationAsDegree();
2046 results->orientationType = 2046 results->orientationType =
2047 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2047 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2048 gfx::DeviceDisplayInfo info; 2048 gfx::DeviceDisplayInfo info;
2049 results->depth = info.GetBitsPerPixel(); 2049 results->depth = info.GetBitsPerPixel();
2050 results->depthPerComponent = info.GetBitsPerComponent(); 2050 results->depthPerComponent = info.GetBitsPerComponent();
2051 results->isMonochrome = (results->depthPerComponent == 0); 2051 results->isMonochrome = (results->depthPerComponent == 0);
2052 } 2052 }
2053 2053
2054 } // namespace content 2054 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698