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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.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_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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 uint32_t compositor_frame_sink_id, 373 uint32_t compositor_frame_sink_id,
374 cc::CompositorFrame frame) { 374 cc::CompositorFrame frame) {
375 TRACE_EVENT0("content", 375 TRACE_EVENT0("content",
376 "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame"); 376 "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame");
377 377
378 last_scroll_offset_ = frame.metadata.root_scroll_offset; 378 last_scroll_offset_ = frame.metadata.root_scroll_offset;
379 379
380 if (!frame_connector_) 380 if (!frame_connector_)
381 return; 381 return;
382 382
383 cc::RenderPass* root_pass = frame.render_pass_list.back().get(); 383 cc::RenderPass* root_pass =
384 frame.delegated_frame_data->render_pass_list.back().get();
384 385
385 gfx::Size frame_size = root_pass->output_rect.size(); 386 gfx::Size frame_size = root_pass->output_rect.size();
386 float scale_factor = frame.metadata.device_scale_factor; 387 float scale_factor = frame.metadata.device_scale_factor;
387 388
388 // Check whether we need to recreate the cc::Surface, which means the child 389 // Check whether we need to recreate the cc::Surface, which means the child
389 // frame renderer has changed its frame sink, or size, or scale factor. 390 // frame renderer has changed its frame sink, or size, or scale factor.
390 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ || 391 if (compositor_frame_sink_id != last_compositor_frame_sink_id_ ||
391 frame_size != current_surface_size_ || 392 frame_size != current_surface_size_ ||
392 scale_factor != current_surface_scale_factor_) { 393 scale_factor != current_surface_scale_factor_) {
393 ClearCompositorSurfaceIfNecessary(); 394 ClearCompositorSurfaceIfNecessary();
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 734
734 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { 735 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
735 return true; 736 return true;
736 } 737 }
737 738
738 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 739 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
739 return cc::SurfaceId(frame_sink_id_, local_frame_id_); 740 return cc::SurfaceId(frame_sink_id_, local_frame_id_);
740 }; 741 };
741 742
742 } // namespace content 743 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698