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

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

Issue 1244443003: android: Use a hard coded BeginFrame deadline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | 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/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 observing_root_window_ = false; 1493 observing_root_window_ = false;
1494 content_view_core_window_android_->RemoveObserver(this); 1494 content_view_core_window_android_->RemoveObserver(this);
1495 } 1495 }
1496 1496
1497 void RenderWidgetHostViewAndroid::SendBeginFrame(base::TimeTicks frame_time, 1497 void RenderWidgetHostViewAndroid::SendBeginFrame(base::TimeTicks frame_time,
1498 base::TimeDelta vsync_period) { 1498 base::TimeDelta vsync_period) {
1499 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SendBeginFrame", 1499 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SendBeginFrame",
1500 "frame_time_us", frame_time.ToInternalValue()); 1500 "frame_time_us", frame_time.ToInternalValue());
1501 1501
1502 if (using_browser_compositor_) { 1502 if (using_browser_compositor_) {
1503 base::TimeTicks display_time = frame_time + vsync_period; 1503 // TODO(brianderson): Replace this hardcoded deadline after Android
1504 1504 // switches to Surfaces and the Browser's commit isn't in the critcal path.
1505 base::TimeTicks deadline = 1505 base::TimeTicks deadline = frame_time + (vsync_period * 0.6);
1506 display_time - host_->GetEstimatedBrowserCompositeTime();
1507 1506
1508 host_->Send(new ViewMsg_BeginFrame( 1507 host_->Send(new ViewMsg_BeginFrame(
1509 host_->GetRoutingID(), 1508 host_->GetRoutingID(),
1510 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, 1509 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline,
1511 vsync_period, cc::BeginFrameArgs::NORMAL))); 1510 vsync_period, cc::BeginFrameArgs::NORMAL)));
1512 } else { 1511 } else {
1513 SynchronousCompositorImpl* compositor = SynchronousCompositorImpl::FromID( 1512 SynchronousCompositorImpl* compositor = SynchronousCompositorImpl::FromID(
1514 host_->GetProcess()->GetID(), host_->GetRoutingID()); 1513 host_->GetProcess()->GetID(), host_->GetRoutingID());
1515 if (compositor) { 1514 if (compositor) {
1516 // The synchronous compositor synchronously does it's work in this call. 1515 // The synchronous compositor synchronously does it's work in this call.
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 results->orientationAngle = display.RotationAsDegree(); 2046 results->orientationAngle = display.RotationAsDegree();
2048 results->orientationType = 2047 results->orientationType =
2049 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2048 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2050 gfx::DeviceDisplayInfo info; 2049 gfx::DeviceDisplayInfo info;
2051 results->depth = info.GetBitsPerPixel(); 2050 results->depth = info.GetBitsPerPixel();
2052 results->depthPerComponent = info.GetBitsPerComponent(); 2051 results->depthPerComponent = info.GetBitsPerComponent();
2053 results->isMonochrome = (results->depthPerComponent == 0); 2052 results->isMonochrome = (results->depthPerComponent == 0);
2054 } 2053 }
2055 2054
2056 } // namespace content 2055 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698