Index: content/common/gpu/media/rendering_helper.h |
diff --git a/content/common/gpu/media/rendering_helper.h b/content/common/gpu/media/rendering_helper.h |
index 16a7ec8809c549c8d0fbc4f36b35996244e0ca1d..0f9e0985c1b1757de50ddac5f61322e424cc5306 100644 |
--- a/content/common/gpu/media/rendering_helper.h |
+++ b/content/common/gpu/media/rendering_helper.h |
@@ -99,6 +99,9 @@ class RenderingHelper { |
// Drops all the pending video frames of the specified window. |
void DropPendingFrames(size_t window_id); |
+ // Flushes the pending frames and calls the given callback when it is done. |
+ void Flush(size_t window_id, const base::Closure& flush_done_cb); |
Pawel Osciak
2014/08/15 06:06:43
You misunderstood me. I don't think we need flush_
Owen Lin
2014/08/18 10:06:36
Ah! I see. Thanks. We can save one CB.
|
+ |
// Delete |texture_id|. |
void DeleteTexture(uint32 texture_id); |
@@ -123,10 +126,16 @@ class RenderingHelper { |
// been rendered. |
bool last_frame_rendered; |
+ // True if there won't be any new video frames comming. |
+ bool is_flushing; |
+ |
// The video frames pending for rendering. |
std::deque<scoped_refptr<VideoFrame> > pending_frames; |
- RenderedVideo() : last_frame_rendered(false) {} |
+ // Callback calls when all pending frames are rendered. |
+ base::Closure flush_done_cb; |
+ |
+ RenderedVideo() : last_frame_rendered(false), is_flushing(false) {} |
}; |
void Clear(); |