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/compositor/surface_display_output_surface.h" | 5 #include "content/browser/compositor/surface_display_output_surface.h" |
6 | 6 |
7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
8 #include "cc/output/compositor_frame_ack.h" | 8 #include "cc/output/compositor_frame_ack.h" |
9 #include "cc/surfaces/display.h" | 9 #include "cc/surfaces/display.h" |
10 #include "cc/surfaces/surface.h" | 10 #include "cc/surfaces/surface.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 | 87 |
88 void SurfaceDisplayOutputSurface::ReturnResources( | 88 void SurfaceDisplayOutputSurface::ReturnResources( |
89 const cc::ReturnedResourceArray& resources) { | 89 const cc::ReturnedResourceArray& resources) { |
90 cc::CompositorFrameAck ack; | 90 cc::CompositorFrameAck ack; |
91 ack.resources = resources; | 91 ack.resources = resources; |
92 if (client_) | 92 if (client_) |
93 client_->ReclaimResources(&ack); | 93 client_->ReclaimResources(&ack); |
94 } | 94 } |
95 | 95 |
96 void SurfaceDisplayOutputSurface::SwapBuffersComplete(bool drawn) { | 96 void SurfaceDisplayOutputSurface::SwapBuffersComplete( |
97 if (client_) | 97 cc::SurfaceDrawStatus drawn) { |
| 98 if (client_ && !display_client_->output_surface_lost()) |
98 client_->DidSwapBuffersComplete(); | 99 client_->DidSwapBuffersComplete(); |
99 } | 100 } |
100 | 101 |
101 } // namespace content | 102 } // namespace content |
OLD | NEW |