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

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

Issue 2503203002: Revert "Getting rid of DelegatedFrameData" (Closed)
Patch Set: 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 guest_->SetTooltipText(tooltip_text); 272 guest_->SetTooltipText(tooltip_text);
273 } 273 }
274 274
275 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( 275 void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
276 uint32_t compositor_frame_sink_id, 276 uint32_t compositor_frame_sink_id,
277 cc::CompositorFrame frame) { 277 cc::CompositorFrame frame) {
278 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame"); 278 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame");
279 279
280 last_scroll_offset_ = frame.metadata.root_scroll_offset; 280 last_scroll_offset_ = frame.metadata.root_scroll_offset;
281 281
282 cc::RenderPass* root_pass = frame.render_pass_list.back().get(); 282 cc::RenderPass* root_pass =
283 frame.delegated_frame_data->render_pass_list.back().get();
283 284
284 gfx::Size frame_size = root_pass->output_rect.size(); 285 gfx::Size frame_size = root_pass->output_rect.size();
285 float scale_factor = frame.metadata.device_scale_factor; 286 float scale_factor = frame.metadata.device_scale_factor;
286 287
287 // Check whether we need to recreate the cc::Surface, which means the child 288 // Check whether we need to recreate the cc::Surface, which means the child
288 // frame renderer has changed its output surface, or size, or scale factor. 289 // frame renderer has changed its output surface, or size, or scale factor.
289 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ || 290 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ ||
290 frame_size != current_surface_size_ || 291 frame_size != current_surface_size_ ||
291 scale_factor != current_surface_scale_factor_ || 292 scale_factor != current_surface_scale_factor_ ||
292 (guest_ && guest_->has_attached_since_surface_set())) { 293 (guest_ && guest_->has_attached_since_surface_set())) {
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 gesture_event.data.scrollUpdate.inertialPhase == 682 gesture_event.data.scrollUpdate.inertialPhase ==
682 blink::WebGestureEvent::MomentumPhase) { 683 blink::WebGestureEvent::MomentumPhase) {
683 return; 684 return;
684 } 685 }
685 host_->ForwardGestureEvent(gesture_event); 686 host_->ForwardGestureEvent(gesture_event);
686 return; 687 return;
687 } 688 }
688 } 689 }
689 690
690 } // namespace content 691 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698