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

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

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make CompositorFrameMetadata movable Created 4 years, 6 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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 } 1130 }
1131 1131
1132 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() { 1132 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() {
1133 legacy_render_widget_host_HWND_ = NULL; 1133 legacy_render_widget_host_HWND_ = NULL;
1134 legacy_window_destroyed_ = true; 1134 legacy_window_destroyed_ = true;
1135 } 1135 }
1136 #endif 1136 #endif
1137 1137
1138 void RenderWidgetHostViewAura::OnSwapCompositorFrame( 1138 void RenderWidgetHostViewAura::OnSwapCompositorFrame(
1139 uint32_t output_surface_id, 1139 uint32_t output_surface_id,
1140 std::unique_ptr<cc::CompositorFrame> frame) { 1140 cc::CompositorFrame frame) {
1141 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); 1141 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame");
1142 1142
1143 last_scroll_offset_ = frame->metadata.root_scroll_offset; 1143 last_scroll_offset_ = frame.metadata.root_scroll_offset;
1144 if (!frame->delegated_frame_data) 1144 if (!frame.delegated_frame_data)
1145 return; 1145 return;
1146 1146
1147 cc::Selection<gfx::SelectionBound> selection = frame->metadata.selection; 1147 cc::Selection<gfx::SelectionBound> selection = frame.metadata.selection;
1148 if (IsUseZoomForDSFEnabled()) { 1148 if (IsUseZoomForDSFEnabled()) {
1149 float viewportToDIPScale = 1.0f / current_device_scale_factor_; 1149 float viewportToDIPScale = 1.0f / current_device_scale_factor_;
1150 gfx::PointF start_edge_top = selection.start.edge_top(); 1150 gfx::PointF start_edge_top = selection.start.edge_top();
1151 gfx::PointF start_edge_bottom = selection.start.edge_bottom(); 1151 gfx::PointF start_edge_bottom = selection.start.edge_bottom();
1152 gfx::PointF end_edge_top = selection.end.edge_top(); 1152 gfx::PointF end_edge_top = selection.end.edge_top();
1153 gfx::PointF end_edge_bottom = selection.end.edge_bottom(); 1153 gfx::PointF end_edge_bottom = selection.end.edge_bottom();
1154 1154
1155 start_edge_top.Scale(viewportToDIPScale); 1155 start_edge_top.Scale(viewportToDIPScale);
1156 start_edge_bottom.Scale(viewportToDIPScale); 1156 start_edge_bottom.Scale(viewportToDIPScale);
1157 end_edge_top.Scale(viewportToDIPScale); 1157 end_edge_top.Scale(viewportToDIPScale);
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
3020 3020
3021 //////////////////////////////////////////////////////////////////////////////// 3021 ////////////////////////////////////////////////////////////////////////////////
3022 // RenderWidgetHostViewBase, public: 3022 // RenderWidgetHostViewBase, public:
3023 3023
3024 // static 3024 // static
3025 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 3025 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
3026 GetScreenInfoForWindow(results, NULL); 3026 GetScreenInfoForWindow(results, NULL);
3027 } 3027 }
3028 3028
3029 } // namespace content 3029 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698