| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/gpu/compositor_output_surface.h" | 5 #include "content/renderer/gpu/compositor_output_surface.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 void CompositorOutputSurface::OnReclaimCompositorResources( | 134 void CompositorOutputSurface::OnReclaimCompositorResources( |
| 135 uint32_t output_surface_id, | 135 uint32_t output_surface_id, |
| 136 bool is_swap_ack, | 136 bool is_swap_ack, |
| 137 const cc::ReturnedResourceArray& resources) { | 137 const cc::ReturnedResourceArray& resources) { |
| 138 // Ignore message if it's a stale one coming from a different output surface | 138 // Ignore message if it's a stale one coming from a different output surface |
| 139 // (e.g. after a lost context). | 139 // (e.g. after a lost context). |
| 140 if (output_surface_id != output_surface_id_) | 140 if (output_surface_id != output_surface_id_) |
| 141 return; | 141 return; |
| 142 ReclaimResources(resources); | 142 client_->ReclaimResources(resources); |
| 143 if (is_swap_ack) | 143 if (is_swap_ack) |
| 144 client_->DidSwapBuffersComplete(); | 144 client_->DidSwapBuffersComplete(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 bool CompositorOutputSurface::Send(IPC::Message* message) { | 147 bool CompositorOutputSurface::Send(IPC::Message* message) { |
| 148 return message_sender_->Send(message); | 148 return message_sender_->Send(message); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace content | 151 } // namespace content |
| OLD | NEW |