Index: components/exo/buffer.h |
diff --git a/components/exo/buffer.h b/components/exo/buffer.h |
index e7b5b605c45e423e78ce5ce91cf92ee346110338..bd1e1bfd848eb70c2e9a9b57f0c3a0a5df8282f7 100644 |
--- a/components/exo/buffer.h |
+++ b/components/exo/buffer.h |
@@ -29,6 +29,8 @@ class GpuMemoryBuffer; |
namespace exo { |
+class CompositorFrameSinkHolder; |
+ |
// This class provides the content for a Surface. The mechanism by which a |
// client provides and updates the contents is the responsibility of the client |
// and not defined as part of this class. |
@@ -56,7 +58,8 @@ class Buffer : public base::SupportsWeakPtr<Buffer> { |
std::unique_ptr<cc::SingleReleaseCallback> ProduceTextureMailbox( |
cc::TextureMailbox* mailbox, |
bool secure_output_only, |
- bool client_usage); |
+ bool client_usage, |
+ CompositorFrameSinkHolder* compositor_frame_sink_holder); |
// This should be called when the buffer is attached to a Surface. |
void OnAttach(); |
@@ -123,6 +126,12 @@ class Buffer : public base::SupportsWeakPtr<Buffer> { |
// The client release callback. |
base::Closure release_callback_; |
+ // The CompositorFrameSinkHolder that has the ReleaseCallback of this buffer |
reveman
2017/01/02 19:57:56
please updated this comment after addressing my ot
|
+ // produced in ProduceTextureMailbox(). |
+ // Buffer holds a reference to the CompositorFrameSinkHolder to keep it alive. |
+ // The refptr is reset when the release callback is called. |
+ scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder_; |
+ |
DISALLOW_COPY_AND_ASSIGN(Buffer); |
}; |