Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: components/exo/buffer.h

Issue 2625153002: exo: CompositorFrameSink code cleanup. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/exo/compositor_frame_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/buffer.h
diff --git a/components/exo/buffer.h b/components/exo/buffer.h
index eeaf1c3e124057c6749d9f60a51b2171d88b3361..7ca106240649702a877db807f2a42300608c0322 100644
--- a/components/exo/buffer.h
+++ b/components/exo/buffer.h
@@ -104,29 +104,28 @@ class Buffer : public base::SupportsWeakPtr<Buffer> {
// True if this buffer is an overlay candidate.
const bool is_overlay_candidate_;
- // This is incremented when a texture mailbox is produced and decremented
- // when a texture mailbox is released. It is used to determine when we should
- // notify the client that buffer has been released.
+ // This is incremented when a transferable resource is produced and
+ // decremented when a transferable resource is released. It is used to
+ // determine when we should notify the client that buffer has been released.
unsigned use_count_ = 0;
// This keeps track of how many Surfaces the buffer is attached to.
unsigned attach_count_ = 0;
- // The last used texture. ProduceTextureMailbox() will use this
+ // The last used texture. ProduceTransferableResource() will use this
// instead of creating a new texture when possible.
std::unique_ptr<Texture> texture_;
- // The last used contents texture. ProduceTextureMailbox() will use this
+ // The last used contents texture. ProduceTransferableResource() will use this
// instead of creating a new texture when possible.
std::unique_ptr<Texture> contents_texture_;
// The client release callback.
base::Closure release_callback_;
- // The CompositorFrameSinkHolder that has the ReleaseCallback of this buffer
- // produced in ProduceTextureMailbox().
- // Buffer holds a reference to the CompositorFrameSinkHolder to keep it alive.
- // The refptr is reset when the release callback is called.
+ // CompositorFrameSinkHolder instance that needs to be kept alive to receive
+ // a release callback when the last produced transferable resource is no
+ // longer in use.
scoped_refptr<CompositorFrameSinkHolder> compositor_frame_sink_holder_;
DISALLOW_COPY_AND_ASSIGN(Buffer);
« no previous file with comments | « no previous file | components/exo/compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698