| 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void set_release_callback(const base::Closure& release_callback) { | 51 void set_release_callback(const base::Closure& release_callback) { |
| 52 release_callback_ = release_callback; | 52 release_callback_ = release_callback; |
| 53 } | 53 } |
| 54 | 54 |
| 55 // This function can be used to acquire a texture mailbox for the contents of | 55 // This function can be used to acquire a texture mailbox for the contents of |
| 56 // buffer. Returns a release callback on success. The release callback should | 56 // buffer. Returns a release callback on success. The release callback should |
| 57 // be called before a new texture mailbox can be acquired unless | 57 // be called before a new texture mailbox can be acquired unless |
| 58 // |lost_context| is true. | 58 // |lost_context| is true. |
| 59 scoped_ptr<cc::SingleReleaseCallback> ProduceTextureMailbox( | 59 scoped_ptr<cc::SingleReleaseCallback> ProduceTextureMailbox( |
| 60 cc::TextureMailbox* mailbox, | 60 cc::TextureMailbox* mailbox, |
| 61 bool secure_output_only, |
| 61 bool lost_context); | 62 bool lost_context); |
| 62 | 63 |
| 63 // Returns the size of the buffer. | 64 // Returns the size of the buffer. |
| 64 gfx::Size GetSize() const; | 65 gfx::Size GetSize() const; |
| 65 | 66 |
| 66 // Returns a trace value representing the state of the buffer. | 67 // Returns a trace value representing the state of the buffer. |
| 67 scoped_ptr<base::trace_event::TracedValue> AsTracedValue() const; | 68 scoped_ptr<base::trace_event::TracedValue> AsTracedValue() const; |
| 68 | 69 |
| 69 private: | 70 private: |
| 70 class Texture; | 71 class Texture; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 113 |
| 113 // The client release callback. | 114 // The client release callback. |
| 114 base::Closure release_callback_; | 115 base::Closure release_callback_; |
| 115 | 116 |
| 116 DISALLOW_COPY_AND_ASSIGN(Buffer); | 117 DISALLOW_COPY_AND_ASSIGN(Buffer); |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 } // namespace exo | 120 } // namespace exo |
| 120 | 121 |
| 121 #endif // COMPONENTS_EXO_BUFFER_H_ | 122 #endif // COMPONENTS_EXO_BUFFER_H_ |
| OLD | NEW |