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

Unified Diff: content/common/gpu/media/rendering_helper.h

Issue 465293002: rendering_helper - Wait for rendering before resetting the decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 6 years, 4 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 | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698