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

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

Issue 2780713004: Hide compositor_frame_sink_id from RenderWidgetHostView* (Closed)
Patch Set: Added a comment in android Created 3 years, 8 months 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 guest_->SetTooltipText(tooltip_text); 273 guest_->SetTooltipText(tooltip_text);
274 } 274 }
275 275
276 void RenderWidgetHostViewGuest::SendSurfaceInfoToEmbedderImpl( 276 void RenderWidgetHostViewGuest::SendSurfaceInfoToEmbedderImpl(
277 const cc::SurfaceInfo& surface_info, 277 const cc::SurfaceInfo& surface_info,
278 const cc::SurfaceSequence& sequence) { 278 const cc::SurfaceSequence& sequence) {
279 if (guest_ && !guest_->is_in_destruction()) 279 if (guest_ && !guest_->is_in_destruction())
280 guest_->SetChildFrameSurface(surface_info, sequence); 280 guest_->SetChildFrameSurface(surface_info, sequence);
281 } 281 }
282 282
283 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( 283 void RenderWidgetHostViewGuest::SubmitCompositorFrame(
284 uint32_t compositor_frame_sink_id,
285 const cc::LocalSurfaceId& local_surface_id, 284 const cc::LocalSurfaceId& local_surface_id,
286 cc::CompositorFrame frame) { 285 cc::CompositorFrame frame) {
287 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame"); 286 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame");
288 287
289 last_scroll_offset_ = frame.metadata.root_scroll_offset; 288 last_scroll_offset_ = frame.metadata.root_scroll_offset;
290 ProcessCompositorFrame(compositor_frame_sink_id, local_surface_id, 289 ProcessCompositorFrame(local_surface_id, std::move(frame));
291 std::move(frame));
292 290
293 // If after detaching we are sent a frame, we should finish processing it, and 291 // If after detaching we are sent a frame, we should finish processing it, and
294 // then we should clear the surface so that we are not holding resources we 292 // then we should clear the surface so that we are not holding resources we
295 // no longer need. 293 // no longer need.
296 if (!guest_ || !guest_->attached()) 294 if (!guest_ || !guest_->attached())
297 ClearCompositorSurfaceIfNecessary(); 295 ClearCompositorSurfaceIfNecessary();
298 } 296 }
299 297
300 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { 298 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) {
301 if (!platform_view_) { 299 if (!platform_view_) {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 host_->ForwardGestureEvent(gesture_event); 644 host_->ForwardGestureEvent(gesture_event);
647 return; 645 return;
648 } 646 }
649 } 647 }
650 648
651 bool RenderWidgetHostViewGuest::HasEmbedderChanged() { 649 bool RenderWidgetHostViewGuest::HasEmbedderChanged() {
652 return guest_ && guest_->has_attached_since_surface_set(); 650 return guest_ && guest_->has_attached_since_surface_set();
653 } 651 }
654 652
655 } // namespace content 653 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698