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

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

Issue 2740833005: [cc] Pass on BeginFrameAcks from CompositorEBFS through RWHVAura, DFH. (Closed)
Patch Set: add struct_traits tests. Created 3 years, 9 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 (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_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 930
931 start_edge_top.Scale(viewportToDIPScale); 931 start_edge_top.Scale(viewportToDIPScale);
932 start_edge_bottom.Scale(viewportToDIPScale); 932 start_edge_bottom.Scale(viewportToDIPScale);
933 end_edge_top.Scale(viewportToDIPScale); 933 end_edge_top.Scale(viewportToDIPScale);
934 end_edge_bottom.Scale(viewportToDIPScale); 934 end_edge_bottom.Scale(viewportToDIPScale);
935 935
936 selection.start.SetEdge(start_edge_top, start_edge_bottom); 936 selection.start.SetEdge(start_edge_top, start_edge_bottom);
937 selection.end.SetEdge(end_edge_top, end_edge_bottom); 937 selection.end.SetEdge(end_edge_top, end_edge_bottom);
938 } 938 }
939 939
940 // |has_damage| is not transmitted.
941 frame.metadata.begin_frame_ack.has_damage = true;
piman 2017/03/15 21:17:10 nit: you could do this in RenderWidgetHostImpl, so
Eric Seckler 2017/03/16 10:24:14 Moved all to RWHI.
942 cc::BeginFrameAck ack(frame.metadata.begin_frame_ack);
943 DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber, ack.sequence_number);
piman 2017/03/15 21:17:10 What makes this DCHECK true, if ack comes (after a
Eric Seckler 2017/03/16 10:24:15 Replaced it with a ReceivedBadMessage, assuming th
piman 2017/03/16 18:32:14 See comments in RWHI.
944 // |remaining_frames| is not transmitted, but 0 by default.
945 DCHECK_EQ(0u, ack.remaining_frames);
946
940 if (delegated_frame_host_) { 947 if (delegated_frame_host_) {
941 delegated_frame_host_->SwapDelegatedFrame(compositor_frame_sink_id, 948 delegated_frame_host_->SwapDelegatedFrame(compositor_frame_sink_id,
942 std::move(frame)); 949 std::move(frame));
943 } 950 }
944 selection_controller_->OnSelectionBoundsChanged(selection.start, 951 selection_controller_->OnSelectionBoundsChanged(selection.start,
945 selection.end); 952 selection.end);
953
954 if (begin_frame_source_)
955 begin_frame_source_->DidFinishFrame(this, ack);
956 }
957
958 void RenderWidgetHostViewAura::OnBeginFrameDidNotSwap(
959 const cc::BeginFrameAck& ack) {
960 DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber, ack.sequence_number);
piman 2017/03/15 21:17:10 Ditto here.
Eric Seckler 2017/03/16 10:24:15 Done, moved as well.
961 // |has_damage| is not transmitted but false by default.
962 DCHECK(!ack.has_damage);
963 // |remaining_frames| is not transmitted, but 0 by default.
964 DCHECK_EQ(0u, ack.remaining_frames);
965
966 if (begin_frame_source_)
967 begin_frame_source_->DidFinishFrame(this, ack);
946 } 968 }
947 969
948 void RenderWidgetHostViewAura::ClearCompositorFrame() { 970 void RenderWidgetHostViewAura::ClearCompositorFrame() {
949 if (delegated_frame_host_) 971 if (delegated_frame_host_)
950 delegated_frame_host_->ClearDelegatedFrame(); 972 delegated_frame_host_->ClearDelegatedFrame();
951 } 973 }
952 974
953 void RenderWidgetHostViewAura::DidStopFlinging() { 975 void RenderWidgetHostViewAura::DidStopFlinging() {
954 selection_controller_client_->OnScrollCompleted(); 976 selection_controller_client_->OnScrollCompleted();
955 } 977 }
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 2390
2369 void RenderWidgetHostViewAura::SetPopupChild( 2391 void RenderWidgetHostViewAura::SetPopupChild(
2370 RenderWidgetHostViewAura* popup_child_host_view) { 2392 RenderWidgetHostViewAura* popup_child_host_view) {
2371 popup_child_host_view_ = popup_child_host_view; 2393 popup_child_host_view_ = popup_child_host_view;
2372 event_handler_->SetPopupChild( 2394 event_handler_->SetPopupChild(
2373 popup_child_host_view, 2395 popup_child_host_view,
2374 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); 2396 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr);
2375 } 2397 }
2376 2398
2377 } // namespace content 2399 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698