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

Unified Diff: cc/resources/video_resource_updater.h

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ifdefed 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: cc/resources/video_resource_updater.h
diff --git a/cc/resources/video_resource_updater.h b/cc/resources/video_resource_updater.h
index 3567e7eecd513bee18665e92d32f2a7009335a2d..942793ea072c8f07ae54b592820a3452e5e945e9 100644
--- a/cc/resources/video_resource_updater.h
+++ b/cc/resources/video_resource_updater.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "cc/resources/texture_mailbox.h"
+#include "media/base/video_frame.h" // TODO(danakj): rm w/ VIDEO_FRAME_MAILBOX
#include "ui/gfx/size.h"
namespace media {
@@ -47,6 +48,11 @@ class VideoFrameExternalResources {
ResourceType type;
std::vector<TextureMailbox> mailboxes;
+#ifndef VIDEO_FRAME_MAILBOX
+ unsigned hardware_resource;
+ TextureMailbox::ReleaseCallback hardware_release_callback;
+#endif
+
// TODO(danakj): Remove these too.
std::vector<unsigned> software_resources;
TextureMailbox::ReleaseCallback software_release_callback;
@@ -63,11 +69,7 @@ class VideoResourceUpdater
explicit VideoResourceUpdater(ResourceProvider* resource_provider);
~VideoResourceUpdater();
- VideoFrameExternalResources CreateForHardwarePlanes(
- const scoped_refptr<media::VideoFrame>& video_frame,
- const TextureMailbox::ReleaseCallback& release_callback);
-
- VideoFrameExternalResources CreateForSoftwarePlanes(
+ VideoFrameExternalResources CreateExternalResourcesFromVideoFrame(
const scoped_refptr<media::VideoFrame>& video_frame);
private:
@@ -88,6 +90,10 @@ class VideoResourceUpdater
};
bool VerifyFrame(const scoped_refptr<media::VideoFrame>& video_frame);
+ VideoFrameExternalResources CreateForHardwarePlanes(
+ const scoped_refptr<media::VideoFrame>& video_frame);
+ VideoFrameExternalResources CreateForSoftwarePlanes(
+ const scoped_refptr<media::VideoFrame>& video_frame);
struct RecycleResourceData {
unsigned resource_id;
@@ -100,10 +106,11 @@ class VideoResourceUpdater
RecycleResourceData data,
unsigned sync_point,
bool lost_resource);
- static void ReturnTexture(ResourceProvider* resource_provider,
- TextureMailbox::ReleaseCallback callback,
- unsigned texture_id,
- gpu::Mailbox mailbox,
+ static void ReturnTexture(scoped_refptr<media::VideoFrame> video_frame,
+#ifndef VIDEO_FRAME_MAILBOX
+ ResourceProvider* resource_provider,
+ unsigned resource_id,
+#endif
unsigned sync_point,
bool lost_resource);

Powered by Google App Engine
This is Rietveld 408576698