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

Unified Diff: content/renderer/media/renderer_gpu_video_decoder_factories.h

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: video-mailbox: virtualandroid Created 7 years, 6 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: content/renderer/media/renderer_gpu_video_decoder_factories.h
diff --git a/content/renderer/media/renderer_gpu_video_decoder_factories.h b/content/renderer/media/renderer_gpu_video_decoder_factories.h
index e05dd9af9ff78f0e9f02d9d6f22efbf014637acd..c39090a5f390e95ccc30b69caaa11778e5a961b0 100644
--- a/content/renderer/media/renderer_gpu_video_decoder_factories.h
+++ b/content/renderer/media/renderer_gpu_video_decoder_factories.h
@@ -48,10 +48,15 @@ class CONTENT_EXPORT RendererGpuVideoDecoderFactories
virtual media::VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
media::VideoCodecProfile profile,
media::VideoDecodeAccelerator::Client* client) OVERRIDE;
- virtual bool CreateTextures(int32 count, const gfx::Size& size,
- std::vector<uint32>* texture_ids,
- uint32 texture_target) OVERRIDE;
+ // Creates textures and produces them into mailboxes. Returns a sync point to
+ // wait on before using the mailboxes, or 0 on failure.
+ virtual uint32 CreateTextures(
+ int32 count, const gfx::Size& size,
+ std::vector<uint32>* texture_ids,
+ std::vector<gpu::Mailbox>* texture_mailboxes,
+ uint32 texture_target) OVERRIDE;
virtual void DeleteTexture(uint32 texture_id) OVERRIDE;
+ virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE;
virtual void ReadPixels(uint32 texture_id,
uint32 texture_target,
const gfx::Size& size,
@@ -81,8 +86,9 @@ class CONTENT_EXPORT RendererGpuVideoDecoderFactories
media::VideoCodecProfile profile,
media::VideoDecodeAccelerator::Client* client);
void AsyncCreateTextures(int32 count, const gfx::Size& size,
- uint32 texture_target);
+ uint32 texture_target, uint32* sync_point);
void AsyncDeleteTexture(uint32 texture_id);
+ void AsyncWaitSyncPoint(uint32 sync_point);
void AsyncReadPixels(uint32 texture_id, uint32 texture_target,
const gfx::Size& size);
void AsyncCreateSharedMemory(size_t size);
@@ -116,6 +122,7 @@ class CONTENT_EXPORT RendererGpuVideoDecoderFactories
// Textures returned by the CreateTexture() function.
std::vector<uint32> created_textures_;
+ std::vector<gpu::Mailbox> created_texture_mailboxes_;
DISALLOW_IMPLICIT_CONSTRUCTORS(RendererGpuVideoDecoderFactories);
};

Powered by Google App Engine
This is Rietveld 408576698