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

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 806413004: Plumb allow_overlay flag for video path into cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed v4l2 Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "cc/layers/content_layer.h" 8 #include "cc/layers/content_layer.h"
9 #include "cc/layers/delegated_frame_provider.h" 9 #include "cc/layers/delegated_frame_provider.h"
10 #include "cc/layers/delegated_frame_resource_collection.h" 10 #include "cc/layers/delegated_frame_resource_collection.h"
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 root->AddChild(video_hw); 1054 root->AddChild(video_hw);
1055 1055
1056 scoped_refptr<VideoLayer> video_scaled_hw = 1056 scoped_refptr<VideoLayer> video_scaled_hw =
1057 VideoLayer::Create(&scaled_hw_frame_provider_, media::VIDEO_ROTATION_0); 1057 VideoLayer::Create(&scaled_hw_frame_provider_, media::VIDEO_ROTATION_0);
1058 video_scaled_hw->SetBounds(gfx::Size(10, 10)); 1058 video_scaled_hw->SetBounds(gfx::Size(10, 10));
1059 video_scaled_hw->SetIsDrawable(true); 1059 video_scaled_hw->SetIsDrawable(true);
1060 root->AddChild(video_scaled_hw); 1060 root->AddChild(video_scaled_hw);
1061 1061
1062 color_video_frame_ = VideoFrame::CreateColorFrame( 1062 color_video_frame_ = VideoFrame::CreateColorFrame(
1063 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); 1063 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
1064 hw_video_frame_ = 1064 hw_video_frame_ = VideoFrame::WrapNativeTexture(
1065 VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder( 1065 make_scoped_ptr(
1066 mailbox, GL_TEXTURE_2D, sync_point)), 1066 new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)),
1067 media::VideoFrame::ReleaseMailboxCB(), 1067 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4),
1068 gfx::Size(4, 4), 1068 gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4), base::TimeDelta(),
1069 gfx::Rect(0, 0, 4, 4), 1069 VideoFrame::ReadPixelsCB(), false);
1070 gfx::Size(4, 4), 1070 scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture(
1071 base::TimeDelta(), 1071 make_scoped_ptr(
1072 VideoFrame::ReadPixelsCB()); 1072 new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)),
1073 scaled_hw_video_frame_ = 1073 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4),
1074 VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder( 1074 gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(),
1075 mailbox, GL_TEXTURE_2D, sync_point)), 1075 VideoFrame::ReadPixelsCB(), false);
1076 media::VideoFrame::ReleaseMailboxCB(),
1077 gfx::Size(4, 4),
1078 gfx::Rect(0, 0, 3, 2),
1079 gfx::Size(4, 4),
1080 base::TimeDelta(),
1081 VideoFrame::ReadPixelsCB());
1082 1076
1083 color_frame_provider_.set_frame(color_video_frame_); 1077 color_frame_provider_.set_frame(color_video_frame_);
1084 hw_frame_provider_.set_frame(hw_video_frame_); 1078 hw_frame_provider_.set_frame(hw_video_frame_);
1085 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); 1079 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_);
1086 1080
1087 if (!delegating_renderer()) { 1081 if (!delegating_renderer()) {
1088 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335 1082 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335
1089 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); 1083 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create();
1090 io_surface->SetBounds(gfx::Size(10, 10)); 1084 io_surface->SetBounds(gfx::Size(10, 10));
1091 io_surface->SetIsDrawable(true); 1085 io_surface->SetIsDrawable(true);
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 void AfterTest() override {} 1794 void AfterTest() override {}
1801 1795
1802 bool deferred_; 1796 bool deferred_;
1803 }; 1797 };
1804 1798
1805 SINGLE_AND_MULTI_THREAD_TEST_F( 1799 SINGLE_AND_MULTI_THREAD_TEST_F(
1806 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); 1800 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame);
1807 1801
1808 } // namespace 1802 } // namespace
1809 } // namespace cc 1803 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | content/browser/media/capture/desktop_capture_device_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698