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

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

Issue 2728183002: RendererCompositorFrameSink should handle local surface id allocation (Closed)
Patch Set: Rebase 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 } 900 }
901 901
902 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() { 902 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() {
903 legacy_render_widget_host_HWND_ = NULL; 903 legacy_render_widget_host_HWND_ = NULL;
904 legacy_window_destroyed_ = true; 904 legacy_window_destroyed_ = true;
905 } 905 }
906 #endif 906 #endif
907 907
908 void RenderWidgetHostViewAura::OnSwapCompositorFrame( 908 void RenderWidgetHostViewAura::OnSwapCompositorFrame(
909 uint32_t compositor_frame_sink_id, 909 uint32_t compositor_frame_sink_id,
910 cc::LocalSurfaceId local_surface_id,
Fady Samuel 2017/03/15 12:05:48 const cc::LocalSurfaceId&
Saman Sami 2017/03/16 18:33:07 Done.
910 cc::CompositorFrame frame) { 911 cc::CompositorFrame frame) {
911 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); 912 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame");
912 913
913 // Override the background color to the current compositor background. 914 // Override the background color to the current compositor background.
914 // This allows us to, when navigating to a new page, transfer this color to 915 // This allows us to, when navigating to a new page, transfer this color to
915 // that page. This allows us to pass this background color to new views on 916 // that page. This allows us to pass this background color to new views on
916 // navigation. 917 // navigation.
917 SetBackgroundColor(frame.metadata.root_background_color); 918 SetBackgroundColor(frame.metadata.root_background_color);
918 919
919 last_scroll_offset_ = frame.metadata.root_scroll_offset; 920 last_scroll_offset_ = frame.metadata.root_scroll_offset;
(...skipping 11 matching lines...) Expand all
931 start_edge_top.Scale(viewportToDIPScale); 932 start_edge_top.Scale(viewportToDIPScale);
932 start_edge_bottom.Scale(viewportToDIPScale); 933 start_edge_bottom.Scale(viewportToDIPScale);
933 end_edge_top.Scale(viewportToDIPScale); 934 end_edge_top.Scale(viewportToDIPScale);
934 end_edge_bottom.Scale(viewportToDIPScale); 935 end_edge_bottom.Scale(viewportToDIPScale);
935 936
936 selection.start.SetEdge(start_edge_top, start_edge_bottom); 937 selection.start.SetEdge(start_edge_top, start_edge_bottom);
937 selection.end.SetEdge(end_edge_top, end_edge_bottom); 938 selection.end.SetEdge(end_edge_top, end_edge_bottom);
938 } 939 }
939 940
940 if (delegated_frame_host_) { 941 if (delegated_frame_host_) {
941 delegated_frame_host_->SwapDelegatedFrame(compositor_frame_sink_id, 942 delegated_frame_host_->SwapDelegatedFrame(
942 std::move(frame)); 943 compositor_frame_sink_id, local_surface_id, std::move(frame));
943 } 944 }
944 selection_controller_->OnSelectionBoundsChanged(selection.start, 945 selection_controller_->OnSelectionBoundsChanged(selection.start,
945 selection.end); 946 selection.end);
946 } 947 }
947 948
948 void RenderWidgetHostViewAura::ClearCompositorFrame() { 949 void RenderWidgetHostViewAura::ClearCompositorFrame() {
949 if (delegated_frame_host_) 950 if (delegated_frame_host_)
950 delegated_frame_host_->ClearDelegatedFrame(); 951 delegated_frame_host_->ClearDelegatedFrame();
951 } 952 }
952 953
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 2369
2369 void RenderWidgetHostViewAura::SetPopupChild( 2370 void RenderWidgetHostViewAura::SetPopupChild(
2370 RenderWidgetHostViewAura* popup_child_host_view) { 2371 RenderWidgetHostViewAura* popup_child_host_view) {
2371 popup_child_host_view_ = popup_child_host_view; 2372 popup_child_host_view_ = popup_child_host_view;
2372 event_handler_->SetPopupChild( 2373 event_handler_->SetPopupChild(
2373 popup_child_host_view, 2374 popup_child_host_view,
2374 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); 2375 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr);
2375 } 2376 }
2376 2377
2377 } // namespace content 2378 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698