| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |