| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_EXO_BUFFER_H_ | 5 #ifndef COMPONENTS_EXO_BUFFER_H_ |
| 6 #define COMPONENTS_EXO_BUFFER_H_ | 6 #define COMPONENTS_EXO_BUFFER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // instead of creating a new texture when possible. | 117 // instead of creating a new texture when possible. |
| 118 std::unique_ptr<Texture> texture_; | 118 std::unique_ptr<Texture> texture_; |
| 119 | 119 |
| 120 // The last used contents texture. ProduceTransferableResource() will use this | 120 // The last used contents texture. ProduceTransferableResource() will use this |
| 121 // instead of creating a new texture when possible. | 121 // instead of creating a new texture when possible. |
| 122 std::unique_ptr<Texture> contents_texture_; | 122 std::unique_ptr<Texture> contents_texture_; |
| 123 | 123 |
| 124 // The client release callback. | 124 // The client release callback. |
| 125 base::Closure release_callback_; | 125 base::Closure release_callback_; |
| 126 | 126 |
| 127 // CompositorFrameSinkHolder instance that needs to be kept alive to receive | |
| 128 // a release callback when the last produced transferable resource is no | |
| 129 // longer in use. | |
| 130 scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder_; | |
| 131 | |
| 132 // Cancelable release contents callback. This is set when a release callback | 127 // Cancelable release contents callback. This is set when a release callback |
| 133 // is pending. | 128 // is pending. |
| 134 base::CancelableClosure release_contents_callback_; | 129 base::CancelableClosure release_contents_callback_; |
| 135 | 130 |
| 136 DISALLOW_COPY_AND_ASSIGN(Buffer); | 131 DISALLOW_COPY_AND_ASSIGN(Buffer); |
| 137 }; | 132 }; |
| 138 | 133 |
| 139 } // namespace exo | 134 } // namespace exo |
| 140 | 135 |
| 141 #endif // COMPONENTS_EXO_BUFFER_H_ | 136 #endif // COMPONENTS_EXO_BUFFER_H_ |
| OLD | NEW |