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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2779593002: [cc] Forward BeginFrameAcks through RWHVChildFrame. (Closed)
Patch Set: fix compile on android Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 cc::CompositorFrame frame) { 399 cc::CompositorFrame frame) {
400 TRACE_EVENT0("content", 400 TRACE_EVENT0("content",
401 "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame"); 401 "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame");
402 last_scroll_offset_ = frame.metadata.root_scroll_offset; 402 last_scroll_offset_ = frame.metadata.root_scroll_offset;
403 if (!frame_connector_) 403 if (!frame_connector_)
404 return; 404 return;
405 ProcessCompositorFrame(compositor_frame_sink_id, local_surface_id, 405 ProcessCompositorFrame(compositor_frame_sink_id, local_surface_id,
406 std::move(frame)); 406 std::move(frame));
407 } 407 }
408 408
409 void RenderWidgetHostViewChildFrame::OnBeginFrameDidNotSwap(
410 const cc::BeginFrameAck& ack) {
411 support_->BeginFrameDidNotSwap(ack);
412 }
413
409 void RenderWidgetHostViewChildFrame::ProcessFrameSwappedCallbacks() { 414 void RenderWidgetHostViewChildFrame::ProcessFrameSwappedCallbacks() {
410 // We only use callbacks once, therefore we make a new list for registration 415 // We only use callbacks once, therefore we make a new list for registration
411 // before we start, and discard the old list entries when we are done. 416 // before we start, and discard the old list entries when we are done.
412 FrameSwappedCallbackList process_callbacks; 417 FrameSwappedCallbackList process_callbacks;
413 process_callbacks.swap(frame_swapped_callbacks_); 418 process_callbacks.swap(frame_swapped_callbacks_);
414 for (std::unique_ptr<base::Closure>& callback : process_callbacks) 419 for (std::unique_ptr<base::Closure>& callback : process_callbacks)
415 callback->Run(); 420 callback->Run();
416 } 421 }
417 422
418 gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() { 423 gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 frame_sink_id_); 704 frame_sink_id_);
700 } 705 }
701 support_.reset(); 706 support_.reset();
702 } 707 }
703 708
704 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { 709 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() {
705 return false; 710 return false;
706 } 711 }
707 712
708 } // namespace content 713 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698