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

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

Issue 11076009: OVDA: Perform an egl sync before reusing a texture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/omx_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/omx_video_decode_accelerator.h
diff --git a/content/common/gpu/media/omx_video_decode_accelerator.h b/content/common/gpu/media/omx_video_decode_accelerator.h
index 761ff105a5a59ebe56561cb8b5323b2c98554852..1f4af969f706b9982256a431094e8782e23d2da9 100644
--- a/content/common/gpu/media/omx_video_decode_accelerator.h
+++ b/content/common/gpu/media/omx_video_decode_accelerator.h
@@ -248,6 +248,28 @@ class CONTENT_EXPORT OmxVideoDecodeAccelerator :
static OMX_ERRORTYPE FillBufferCallback(OMX_HANDLETYPE component,
OMX_PTR priv_data,
OMX_BUFFERHEADERTYPE* buffer);
+
+ // When we get a texture back via ReusePictureBuffer(), we want to ensure
+ // that its contents have been read out by rendering layer, before we start
+ // overwriting it with the decoder. This class is used to wait for a sync
+ // object inserted into the GPU command stream at the time of
+ // ReusePictureBuffer. This guarantees that the object gets into the stream
+ // after the corresponding texture commands have been inserted into it. Once
+ // the sync object is signalled, we are sure that the stream reached the sync
+ // object, which ensures that all commands related to the texture we are
+ // getting back have been finished as well.
+ class PictureSyncObject;
+
+ // Check if the client is done reading out from the texture. If yes, queue
+ // it for reuse by the decoder. Otherwise post self as a delayed task
+ // to check later.
+ void CheckPictureStatus(int32 picture_buffer_id,
+ scoped_ptr<PictureSyncObject> egl_sync_obj);
+
+ // Queue a picture for use by the decoder, either by sending it directly to it
+ // via OMX_FillThisBuffer, or by queueing it for later if we are RESETTING.
+ void QueuePictureBuffer(int32 picture_buffer_id);
+
};
#endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_
« no previous file with comments | « no previous file | content/common/gpu/media/omx_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698