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

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

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: nit Created 4 years, 1 month 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_guest.h" 5 #include "content/browser/frame_host/render_widget_host_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 guest_->SetTooltipText(tooltip_text); 278 guest_->SetTooltipText(tooltip_text);
279 } 279 }
280 280
281 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( 281 void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
282 uint32_t compositor_frame_sink_id, 282 uint32_t compositor_frame_sink_id,
283 cc::CompositorFrame frame) { 283 cc::CompositorFrame frame) {
284 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame"); 284 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame");
285 285
286 last_scroll_offset_ = frame.metadata.root_scroll_offset; 286 last_scroll_offset_ = frame.metadata.root_scroll_offset;
287 287
288 cc::RenderPass* root_pass = 288 cc::RenderPass* root_pass = frame.render_pass_list.back().get();
289 frame.delegated_frame_data->render_pass_list.back().get();
290 289
291 gfx::Size frame_size = root_pass->output_rect.size(); 290 gfx::Size frame_size = root_pass->output_rect.size();
292 float scale_factor = frame.metadata.device_scale_factor; 291 float scale_factor = frame.metadata.device_scale_factor;
293 292
294 // Check whether we need to recreate the cc::Surface, which means the child 293 // Check whether we need to recreate the cc::Surface, which means the child
295 // frame renderer has changed its output surface, or size, or scale factor. 294 // frame renderer has changed its output surface, or size, or scale factor.
296 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ || 295 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ ||
297 frame_size != current_surface_size_ || 296 frame_size != current_surface_size_ ||
298 scale_factor != current_surface_scale_factor_ || 297 scale_factor != current_surface_scale_factor_ ||
299 (guest_ && guest_->has_attached_since_surface_set())) { 298 (guest_ && guest_->has_attached_since_surface_set())) {
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 gesture_event.data.scrollUpdate.inertialPhase == 687 gesture_event.data.scrollUpdate.inertialPhase ==
689 blink::WebGestureEvent::MomentumPhase) { 688 blink::WebGestureEvent::MomentumPhase) {
690 return; 689 return;
691 } 690 }
692 host_->ForwardGestureEvent(gesture_event); 691 host_->ForwardGestureEvent(gesture_event);
693 return; 692 return;
694 } 693 }
695 } 694 }
696 695
697 } // namespace content 696 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698