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

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

Issue 2147873003: cc: Dedup IPCs to return resources to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 // cc::SurfaceFactoryClient implementation. 613 // cc::SurfaceFactoryClient implementation.
614 void RenderWidgetHostViewChildFrame::ReturnResources( 614 void RenderWidgetHostViewChildFrame::ReturnResources(
615 const cc::ReturnedResourceArray& resources) { 615 const cc::ReturnedResourceArray& resources) {
616 if (resources.empty()) 616 if (resources.empty())
617 return; 617 return;
618 618
619 if (!ack_pending_count_ && host_) { 619 if (!ack_pending_count_ && host_) {
620 cc::CompositorFrameAck ack; 620 cc::CompositorFrameAck ack;
621 std::copy(resources.begin(), resources.end(), 621 std::copy(resources.begin(), resources.end(),
622 std::back_inserter(ack.resources)); 622 std::back_inserter(ack.resources));
623 host_->Send(new ViewMsg_ReclaimCompositorResources( 623 host_->Send(new ViewMsg_SwapCompositorFrameAck(
624 host_->GetRoutingID(), last_output_surface_id_, ack)); 624 host_->GetRoutingID(), last_output_surface_id_, ack));
625 return; 625 return;
626 } 626 }
627 627
628 std::copy(resources.begin(), resources.end(), 628 std::copy(resources.begin(), resources.end(),
629 std::back_inserter(surface_returned_resources_)); 629 std::back_inserter(surface_returned_resources_));
630 } 630 }
631 631
632 void RenderWidgetHostViewChildFrame::SetBeginFrameSource( 632 void RenderWidgetHostViewChildFrame::SetBeginFrameSource(
633 cc::BeginFrameSource* source) { 633 cc::BeginFrameSource* source) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { 684 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
685 return true; 685 return true;
686 } 686 }
687 687
688 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 688 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
689 return surface_id_; 689 return surface_id_;
690 }; 690 };
691 691
692 } // namespace content 692 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/delegated_frame_host.h » ('j') | content/renderer/gpu/compositor_output_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698