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

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

Issue 2583483002: [cc] Adds source_id and sequence_number to BeginFrameArgs. (Closed)
Patch Set: Address Sami's comments Created 4 years 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 <utility> 9 #include <utility>
10 10
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 if (!using_browser_compositor_) 1505 if (!using_browser_compositor_)
1506 SetBeginFrameSource(nullptr); 1506 SetBeginFrameSource(nullptr);
1507 // If the DFH has already been destroyed, it will have cleaned itself up. 1507 // If the DFH has already been destroyed, it will have cleaned itself up.
1508 // This happens in some WebView cases. 1508 // This happens in some WebView cases.
1509 if (delegated_frame_host_) 1509 if (delegated_frame_host_)
1510 delegated_frame_host_->UnregisterFrameSinkHierarchy(); 1510 delegated_frame_host_->UnregisterFrameSinkHierarchy();
1511 DCHECK(!begin_frame_source_); 1511 DCHECK(!begin_frame_source_);
1512 } 1512 }
1513 1513
1514 void RenderWidgetHostViewAndroid::SendBeginFrame(cc::BeginFrameArgs args) { 1514 void RenderWidgetHostViewAndroid::SendBeginFrame(cc::BeginFrameArgs args) {
1515 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::SendBeginFrame", 1515 TRACE_EVENT2("cc", "RenderWidgetHostViewAndroid::SendBeginFrame",
1516 "frame_time_us", args.frame_time.ToInternalValue()); 1516 "frame_number", args.sequence_number, "frame_time_us",
1517 args.frame_time.ToInternalValue());
1517 1518
1518 // Synchronous compositor does not use deadline-based scheduling. 1519 // Synchronous compositor does not use deadline-based scheduling.
1519 // TODO(brianderson): Replace this hardcoded deadline after Android 1520 // TODO(brianderson): Replace this hardcoded deadline after Android
1520 // switches to Surfaces and the Browser's commit isn't in the critical path. 1521 // switches to Surfaces and the Browser's commit isn't in the critical path.
1521 args.deadline = sync_compositor_ ? base::TimeTicks() 1522 args.deadline = sync_compositor_ ? base::TimeTicks()
1522 : args.frame_time + (args.interval * 0.6); 1523 : args.frame_time + (args.interval * 0.6);
1523 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args)); 1524 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args));
1524 if (sync_compositor_) 1525 if (sync_compositor_)
1525 sync_compositor_->DidSendBeginFrame(view_.GetWindowAndroid()); 1526 sync_compositor_->DidSendBeginFrame(view_.GetWindowAndroid());
1526 } 1527 }
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 if (!compositor) 2058 if (!compositor)
2058 return; 2059 return;
2059 2060
2060 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2061 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2061 overscroll_refresh_handler, compositor, 2062 overscroll_refresh_handler, compositor,
2062 ui::GetScaleFactorForNativeView(GetNativeView())); 2063 ui::GetScaleFactorForNativeView(GetNativeView()));
2063 is_showing_overscroll_glow_ = true; 2064 is_showing_overscroll_glow_ = true;
2064 } 2065 }
2065 2066
2066 } // namespace content 2067 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698