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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.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_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 uint32_t compositor_frame_sink_id, 370 uint32_t compositor_frame_sink_id,
371 cc::CompositorFrame frame) { 371 cc::CompositorFrame frame) {
372 TRACE_EVENT0("content", 372 TRACE_EVENT0("content",
373 "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame"); 373 "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame");
374 374
375 last_scroll_offset_ = frame.metadata.root_scroll_offset; 375 last_scroll_offset_ = frame.metadata.root_scroll_offset;
376 376
377 if (!frame_connector_) 377 if (!frame_connector_)
378 return; 378 return;
379 379
380 cc::RenderPass* root_pass = 380 cc::RenderPass* root_pass = frame.render_pass_list.back().get();
381 frame.delegated_frame_data->render_pass_list.back().get();
382 381
383 gfx::Size frame_size = root_pass->output_rect.size(); 382 gfx::Size frame_size = root_pass->output_rect.size();
384 float scale_factor = frame.metadata.device_scale_factor; 383 float scale_factor = frame.metadata.device_scale_factor;
385 384
386 // Check whether we need to recreate the cc::Surface, which means the child 385 // Check whether we need to recreate the cc::Surface, which means the child
387 // frame renderer has changed its output surface, or size, or scale factor. 386 // frame renderer has changed its output surface, or size, or scale factor.
388 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ && 387 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ &&
389 surface_factory_) { 388 surface_factory_) {
390 surface_factory_->Destroy(local_frame_id_); 389 surface_factory_->Destroy(local_frame_id_);
391 surface_factory_.reset(); 390 surface_factory_.reset();
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 737
739 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { 738 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
740 return true; 739 return true;
741 } 740 }
742 741
743 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 742 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
744 return cc::SurfaceId(frame_sink_id_, local_frame_id_); 743 return cc::SurfaceId(frame_sink_id_, local_frame_id_);
745 }; 744 };
746 745
747 } // namespace content 746 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698