| 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 "cc/surfaces/surface.h" | 5 #include "cc/surfaces/surface.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "cc/surfaces/surface_factory.h" | 8 #include "cc/surfaces/surface_factory.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 if (previous_frame) { | 32 if (previous_frame) { |
| 33 ReturnedResourceArray previous_resources; | 33 ReturnedResourceArray previous_resources; |
| 34 TransferableResource::ReturnResources( | 34 TransferableResource::ReturnResources( |
| 35 previous_frame->delegated_frame_data->resource_list, | 35 previous_frame->delegated_frame_data->resource_list, |
| 36 &previous_resources); | 36 &previous_resources); |
| 37 factory_->UnrefResources(previous_resources); | 37 factory_->UnrefResources(previous_resources); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 CompositorFrame* Surface::GetEligibleFrame() { return current_frame_.get(); } | 41 const CompositorFrame* Surface::GetEligibleFrame() { |
| 42 return current_frame_.get(); |
| 43 } |
| 42 | 44 |
| 43 } // namespace cc | 45 } // namespace cc |
| OLD | NEW |