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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

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: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index d80373d1cee6364cd5738cca84c0d58c6f688acc..3e65beb39c91c838868c0fa5328b311934b3680c 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1141,23 +1141,19 @@ class LayerTreeHostContextTestDontUseLostResources
video_color_->SetIsDrawable(true);
root_->AddChild(video_color_);
- if (!delegating_renderer()) {
- // TODO(danakj): Hardware video decode can not be transported.
- // crbug.com/179729
- scoped_refptr<VideoLayer> video_hw_ = VideoLayer::Create(
- &hw_frame_provider_);
- video_hw_->SetBounds(gfx::Size(10, 10));
- video_hw_->SetAnchorPoint(gfx::PointF());
- video_hw_->SetIsDrawable(true);
- root_->AddChild(video_hw_);
-
- scoped_refptr<VideoLayer> video_scaled_hw_ = VideoLayer::Create(
- &scaled_hw_frame_provider_);
- video_scaled_hw_->SetBounds(gfx::Size(10, 10));
- video_scaled_hw_->SetAnchorPoint(gfx::PointF());
- video_scaled_hw_->SetIsDrawable(true);
- root_->AddChild(video_scaled_hw_);
- }
+ scoped_refptr<VideoLayer> video_hw_ = VideoLayer::Create(
+ &hw_frame_provider_);
+ video_hw_->SetBounds(gfx::Size(10, 10));
+ video_hw_->SetAnchorPoint(gfx::PointF());
+ video_hw_->SetIsDrawable(true);
+ root_->AddChild(video_hw_);
+
+ scoped_refptr<VideoLayer> video_scaled_hw_ = VideoLayer::Create(
+ &scaled_hw_frame_provider_);
+ video_scaled_hw_->SetBounds(gfx::Size(10, 10));
+ video_scaled_hw_->SetAnchorPoint(gfx::PointF());
+ video_scaled_hw_->SetIsDrawable(true);
+ root_->AddChild(video_scaled_hw_);
if (!delegating_renderer()) {
// TODO(danakj): IOSurface layer can not be transported. crbug.com/239335
@@ -1240,17 +1236,28 @@ class LayerTreeHostContextTestDontUseLostResources
ResourceProvider::TextureUsageAny);
ResourceProvider::ScopedWriteLockGL lock(resource_provider, texture);
+ gpu::Mailbox mailbox;
+ resource_provider->GraphicsContext3D()->genMailboxCHROMIUM(mailbox.name);
+ unsigned sync_point =
+ resource_provider->GraphicsContext3D()->insertSyncPoint();
+
color_video_frame_ = VideoFrame::CreateColorFrame(
gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
hw_video_frame_ = VideoFrame::WrapNativeTexture(
- lock.texture_id(),
+ new VideoFrame::MailboxHolder(
+ mailbox,
+ sync_point,
+ VideoFrame::MailboxHolder::TextureNoLongerNeededCallback()),
GL_TEXTURE_2D,
gfx::Size(4, 4), gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4),
base::TimeDelta(),
VideoFrame::ReadPixelsCB(),
base::Closure());
scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture(
- lock.texture_id(),
+ new VideoFrame::MailboxHolder(
+ mailbox,
+ sync_point,
+ VideoFrame::MailboxHolder::TextureNoLongerNeededCallback()),
GL_TEXTURE_2D,
gfx::Size(4, 4), gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4),
base::TimeDelta(),
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | content/browser/renderer_host/surface_texture_transport_client_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698