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

Unified Diff: webkit/media/android/stream_texture_factory_android.h

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No ifdefs Created 7 years, 8 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
Index: webkit/media/android/stream_texture_factory_android.h
diff --git a/webkit/media/android/stream_texture_factory_android.h b/webkit/media/android/stream_texture_factory_android.h
index ba83a4458322e460109916388a7db36a89b921b4..8904935652c398a994232c40a65262a9f8bd93f7 100644
--- a/webkit/media/android/stream_texture_factory_android.h
+++ b/webkit/media/android/stream_texture_factory_android.h
@@ -7,6 +7,7 @@
#include "base/memory/scoped_ptr.h"
#include "cc/layers/video_frame_provider.h"
+#include "gpu/command_buffer/common/mailbox.h"
namespace webkit_media {
@@ -52,11 +53,24 @@ class StreamTextureFactory {
// the player_id.
virtual void EstablishPeer(int stream_id, int player_id) = 0;
- // Create the streamTexture and return the stream Id and set the texture id.
- virtual unsigned CreateStreamTexture(unsigned* texture_id) = 0;
-
- // Destroy the streamTexture for the given texture Id.
- virtual void DestroyStreamTexture(unsigned texture_id) = 0;
+ // Create the streamTexture and return the stream Id and create a client-side
+ // texture id to refer to the streamTexture. The texture id is produced into
+ // a mailbox so it can be used to ship in a VideoFrame, with a sync point for
+ // when the mailbox can be accessed.
+ virtual unsigned CreateStreamTexture(
+ unsigned texture_target,
+ unsigned* texture_id,
+ gpu::Mailbox* texture_mailbox,
+ unsigned* texture_mailbox_sync_point) = 0;
+
+ // Destroy the streamTexture for the given texture id. Also consumes the
+ // mailbox for the client-side texture id and destroys the client side
+ // texture.
+ virtual void DestroyStreamTexture(
+ unsigned texture_target,
+ unsigned texture_id,
+ const gpu::Mailbox& texture_mailbox,
+ unsigned texture_mailbox_sync_point) = 0;
};
} // namespace webkit_media

Powered by Google App Engine
This is Rietveld 408576698