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

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

Issue 2449853004: 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 = 282 cc::RenderPass* root_pass = frame.render_pass_list.back().get();
283 frame.delegated_frame_data->render_pass_list.back().get();
284 283
285 gfx::Size frame_size = root_pass->output_rect.size(); 284 gfx::Size frame_size = root_pass->output_rect.size();
286 float scale_factor = frame.metadata.device_scale_factor; 285 float scale_factor = frame.metadata.device_scale_factor;
287 286
288 // Check whether we need to recreate the cc::Surface, which means the child 287 // Check whether we need to recreate the cc::Surface, which means the child
289 // frame renderer has changed its output surface, or size, or scale factor. 288 // frame renderer has changed its output surface, or size, or scale factor.
290 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ && 289 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ &&
291 surface_factory_) { 290 surface_factory_) {
292 surface_factory_->Destroy(local_frame_id_); 291 surface_factory_->Destroy(local_frame_id_);
293 surface_factory_.reset(); 292 surface_factory_.reset();
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 gesture_event.data.scrollUpdate.inertialPhase == 688 gesture_event.data.scrollUpdate.inertialPhase ==
690 blink::WebGestureEvent::MomentumPhase) { 689 blink::WebGestureEvent::MomentumPhase) {
691 return; 690 return;
692 } 691 }
693 host_->ForwardGestureEvent(gesture_event); 692 host_->ForwardGestureEvent(gesture_event);
694 return; 693 return;
695 } 694 }
696 } 695 }
697 696
698 } // namespace content 697 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698