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

Side by Side Diff: mojo/tools/roll/cc_strip_video.patch

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo 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
« no previous file with comments | « mojo/services/network/web_socket_impl.h ('k') | mojo/tools/roll/mojo_services_network.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/cc/BUILD.gn b/cc/BUILD.gn 1 diff --git a/cc/BUILD.gn b/cc/BUILD.gn
2 index 1100151..44896c1 100644 2 index 2ede4ac..eee115c 100644
3 --- a/cc/BUILD.gn 3 --- a/cc/BUILD.gn
4 +++ b/cc/BUILD.gn 4 +++ b/cc/BUILD.gn
5 @@ -214,13 +214,6 @@ component("cc") { 5 @@ -222,13 +222,6 @@ component("cc") {
6 "layers/ui_resource_layer.h", 6 "layers/ui_resource_layer.h",
7 "layers/ui_resource_layer_impl.cc", 7 "layers/ui_resource_layer_impl.cc",
8 "layers/ui_resource_layer_impl.h", 8 "layers/ui_resource_layer_impl.h",
9 - "layers/video_frame_provider.h", 9 - "layers/video_frame_provider.h",
10 - "layers/video_frame_provider_client_impl.cc", 10 - "layers/video_frame_provider_client_impl.cc",
11 - "layers/video_frame_provider_client_impl.h", 11 - "layers/video_frame_provider_client_impl.h",
12 - "layers/video_layer.cc", 12 - "layers/video_layer.cc",
13 - "layers/video_layer.h", 13 - "layers/video_layer.h",
14 - "layers/video_layer_impl.cc", 14 - "layers/video_layer_impl.cc",
15 - "layers/video_layer_impl.h", 15 - "layers/video_layer_impl.h",
16 "output/begin_frame_args.cc", 16 "output/begin_frame_args.cc",
17 "output/begin_frame_args.h", 17 "output/begin_frame_args.h",
18 "output/bsp_tree.cc", 18 "output/bsp_tree.cc",
19 @@ -464,8 +457,6 @@ component("cc") { 19 @@ -480,8 +473,6 @@ component("cc") {
20 "resources/ui_resource_client.h", 20 "resources/ui_resource_client.h",
21 "resources/ui_resource_request.cc", 21 "resources/ui_resource_request.cc",
22 "resources/ui_resource_request.h", 22 "resources/ui_resource_request.h",
23 - "resources/video_resource_updater.cc", 23 - "resources/video_resource_updater.cc",
24 - "resources/video_resource_updater.h", 24 - "resources/video_resource_updater.h",
25 "resources/zero_copy_tile_task_worker_pool.cc", 25 "resources/zero_copy_tile_task_worker_pool.cc",
26 "resources/zero_copy_tile_task_worker_pool.h", 26 "resources/zero_copy_tile_task_worker_pool.h",
27 "scheduler/begin_frame_source.cc", 27 "scheduler/begin_frame_source.cc",
28 @@ -607,8 +598,6 @@ source_set("test_support") { 28 @@ -623,8 +614,6 @@ source_set("test_support") {
29 "test/fake_tile_manager_client.h", 29 "test/fake_tile_manager_client.h",
30 "test/fake_ui_resource_layer_tree_host_impl.cc", 30 "test/fake_ui_resource_layer_tree_host_impl.cc",
31 "test/fake_ui_resource_layer_tree_host_impl.h", 31 "test/fake_ui_resource_layer_tree_host_impl.h",
32 - "test/fake_video_frame_provider.cc", 32 - "test/fake_video_frame_provider.cc",
33 - "test/fake_video_frame_provider.h", 33 - "test/fake_video_frame_provider.h",
34 "test/failure_output_surface.cc", 34 "test/failure_output_surface.cc",
35 "test/failure_output_surface.h", 35 "test/failure_output_surface.h",
36 "test/geometry_test_utils.cc", 36 "test/geometry_test_utils.cc",
37 @@ -764,7 +753,6 @@ test("cc_unittests") { 37 @@ -782,7 +771,6 @@ test("cc_unittests") {
38 "layers/tiled_layer_unittest.cc", 38 "layers/tiled_layer_unittest.cc",
39 "layers/ui_resource_layer_impl_unittest.cc", 39 "layers/ui_resource_layer_impl_unittest.cc",
40 "layers/ui_resource_layer_unittest.cc", 40 "layers/ui_resource_layer_unittest.cc",
41 - "layers/video_layer_impl_unittest.cc", 41 - "layers/video_layer_impl_unittest.cc",
42 "output/begin_frame_args_unittest.cc", 42 "output/begin_frame_args_unittest.cc",
43 "output/delegating_renderer_unittest.cc", 43 "output/delegating_renderer_unittest.cc",
44 "output/filter_operations_unittest.cc", 44 "output/filter_operations_unittest.cc",
45 @@ -796,7 +784,6 @@ test("cc_unittests") { 45 @@ -814,7 +802,6 @@ test("cc_unittests") {
46 "resources/texture_uploader_unittest.cc", 46 "resources/texture_uploader_unittest.cc",
47 "resources/tile_manager_unittest.cc", 47 "resources/tile_manager_unittest.cc",
48 "resources/tile_priority_unittest.cc", 48 "resources/tile_priority_unittest.cc",
49 - "resources/video_resource_updater_unittest.cc", 49 - "resources/video_resource_updater_unittest.cc",
50 "scheduler/begin_frame_source_unittest.cc", 50 "scheduler/begin_frame_source_unittest.cc",
51 "scheduler/delay_based_time_source_unittest.cc", 51 "scheduler/delay_based_time_source_unittest.cc",
52 "scheduler/scheduler_state_machine_unittest.cc", 52 "scheduler/scheduler_state_machine_unittest.cc",
53 @@ -825,7 +812,6 @@ test("cc_unittests") { 53 @@ -843,7 +830,6 @@ test("cc_unittests") {
54 "trees/layer_tree_host_unittest_picture.cc", 54 "trees/layer_tree_host_unittest_picture.cc",
55 "trees/layer_tree_host_unittest_proxy.cc", 55 "trees/layer_tree_host_unittest_proxy.cc",
56 "trees/layer_tree_host_unittest_scroll.cc", 56 "trees/layer_tree_host_unittest_scroll.cc",
57 - "trees/layer_tree_host_unittest_video.cc", 57 - "trees/layer_tree_host_unittest_video.cc",
58 "trees/layer_tree_impl_unittest.cc", 58 "trees/layer_tree_impl_unittest.cc",
59 "trees/occlusion_tracker_unittest.cc", 59 "trees/occlusion_tracker_unittest.cc",
60 "trees/occlusion_unittest.cc", 60 "trees/occlusion_unittest.cc",
61 diff --git a/cc/layers/video_frame_provider.h b/cc/layers/video_frame_provider.h 61 diff --git a/cc/layers/video_frame_provider.h b/cc/layers/video_frame_provider.h
62 deleted file mode 100644 62 deleted file mode 100644
63 index 784d951..0000000 63 index 784d951..0000000
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 +++ b/cc/quads/yuv_video_draw_quad.h 605 +++ b/cc/quads/yuv_video_draw_quad.h
606 @@ -8,7 +8,6 @@ 606 @@ -8,7 +8,6 @@
607 #include "base/basictypes.h" 607 #include "base/basictypes.h"
608 #include "base/memory/scoped_ptr.h" 608 #include "base/memory/scoped_ptr.h"
609 #include "cc/base/cc_export.h" 609 #include "cc/base/cc_export.h"
610 -#include "cc/layers/video_layer_impl.h" 610 -#include "cc/layers/video_layer_impl.h"
611 #include "cc/quads/draw_quad.h" 611 #include "cc/quads/draw_quad.h"
612 612
613 namespace cc { 613 namespace cc {
614 diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display _item.cc 614 diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display _item.cc
615 index f8d3c62..eb05e33 100644 615 index e5610ca..473cb77 100644
616 --- a/cc/resources/drawing_display_item.cc 616 --- a/cc/resources/drawing_display_item.cc
617 +++ b/cc/resources/drawing_display_item.cc 617 +++ b/cc/resources/drawing_display_item.cc
618 @@ -4,6 +4,7 @@ 618 @@ -4,6 +4,7 @@
619 619
620 #include "cc/resources/drawing_display_item.h" 620 #include "cc/resources/drawing_display_item.h"
621 621
622 +#include "base/logging.h" 622 +#include "base/logging.h"
623 #include "third_party/skia/include/core/SkCanvas.h" 623 #include "third_party/skia/include/core/SkCanvas.h"
624 #include "third_party/skia/include/core/SkDrawPictureCallback.h" 624 #include "third_party/skia/include/core/SkDrawPictureCallback.h"
625 #include "third_party/skia/include/core/SkMatrix.h" 625 #include "third_party/skia/include/core/SkMatrix.h"
626 diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_hos t_impl_unittest.cc 626 diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_hos t_impl_unittest.cc
627 index fb2fdb6..6c46d8f 100644 627 index 6ac2f8c..7804f22 100644
628 --- a/cc/trees/layer_tree_host_impl_unittest.cc 628 --- a/cc/trees/layer_tree_host_impl_unittest.cc
629 +++ b/cc/trees/layer_tree_host_impl_unittest.cc 629 +++ b/cc/trees/layer_tree_host_impl_unittest.cc
630 @@ -27,7 +27,6 @@ 630 @@ -27,7 +27,6 @@
631 #include "cc/layers/solid_color_scrollbar_layer_impl.h" 631 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
632 #include "cc/layers/texture_layer_impl.h" 632 #include "cc/layers/texture_layer_impl.h"
633 #include "cc/layers/tiled_layer_impl.h" 633 #include "cc/layers/tiled_layer_impl.h"
634 -#include "cc/layers/video_layer_impl.h" 634 -#include "cc/layers/video_layer_impl.h"
635 #include "cc/output/begin_frame_args.h" 635 #include "cc/output/begin_frame_args.h"
636 #include "cc/output/compositor_frame_ack.h" 636 #include "cc/output/compositor_frame_ack.h"
637 #include "cc/output/compositor_frame_metadata.h" 637 #include "cc/output/compositor_frame_metadata.h"
(...skipping 14 matching lines...) Expand all
652 #include "testing/gtest/include/gtest/gtest.h" 652 #include "testing/gtest/include/gtest/gtest.h"
653 #include "third_party/skia/include/core/SkMallocPixelRef.h" 653 #include "third_party/skia/include/core/SkMallocPixelRef.h"
654 @@ -71,7 +68,6 @@ using ::testing::Return; 654 @@ -71,7 +68,6 @@ using ::testing::Return;
655 using ::testing::AnyNumber; 655 using ::testing::AnyNumber;
656 using ::testing::AtLeast; 656 using ::testing::AtLeast;
657 using ::testing::_; 657 using ::testing::_;
658 -using media::VideoFrame; 658 -using media::VideoFrame;
659 659
660 namespace cc { 660 namespace cc {
661 namespace { 661 namespace {
662 @@ -95,7 +91,6 @@ class LayerTreeHostImplTest : public testing::Test, 662 @@ -96,7 +92,6 @@ class LayerTreeHostImplTest : public testing::Test,
663 reduce_memory_result_(true), 663 reduce_memory_result_(true),
664 current_limit_bytes_(0), 664 current_limit_bytes_(0),
665 current_priority_cutoff_value_(0) { 665 current_priority_cutoff_value_(0) {
666 - media::InitializeMediaLibraryForTesting(); 666 - media::InitializeMediaLibraryForTesting();
667 } 667 }
668 668
669 LayerTreeSettings DefaultSettings() { 669 LayerTreeSettings DefaultSettings() {
670 @@ -5314,18 +5309,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) { 670 @@ -5308,18 +5303,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) {
671 root_layer->SetBounds(gfx::Size(10, 10)); 671 root_layer->SetBounds(gfx::Size(10, 10));
672 root_layer->SetHasRenderSurface(true); 672 root_layer->SetHasRenderSurface(true);
673 673
674 - scoped_refptr<VideoFrame> softwareFrame = 674 - scoped_refptr<VideoFrame> softwareFrame =
675 - media::VideoFrame::CreateColorFrame( 675 - media::VideoFrame::CreateColorFrame(
676 - gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); 676 - gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
677 - FakeVideoFrameProvider provider; 677 - FakeVideoFrameProvider provider;
678 - provider.set_frame(softwareFrame); 678 - provider.set_frame(softwareFrame);
679 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( 679 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create(
680 - host_impl_->active_tree(), 4, &provider, media::VIDEO_ROTATION_0); 680 - host_impl_->active_tree(), 4, &provider, media::VIDEO_ROTATION_0);
681 - video_layer->SetBounds(gfx::Size(10, 10)); 681 - video_layer->SetBounds(gfx::Size(10, 10));
682 - video_layer->SetContentBounds(gfx::Size(10, 10)); 682 - video_layer->SetContentBounds(gfx::Size(10, 10));
683 - video_layer->SetDrawsContent(true); 683 - video_layer->SetDrawsContent(true);
684 - root_layer->AddChild(video_layer.Pass()); 684 - root_layer->AddChild(video_layer.Pass());
685 - 685 -
686 scoped_ptr<IOSurfaceLayerImpl> io_surface_layer = 686 scoped_ptr<IOSurfaceLayerImpl> io_surface_layer =
687 IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5); 687 IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5);
688 io_surface_layer->SetBounds(gfx::Size(10, 10)); 688 io_surface_layer->SetBounds(gfx::Size(10, 10));
689 @@ -6405,16 +6388,6 @@ TEST_F(LayerTreeHostImplTest, 689 @@ -6399,16 +6382,6 @@ TEST_F(LayerTreeHostImplTest,
690 scoped_ptr<SolidColorLayerImpl> root_layer = 690 scoped_ptr<SolidColorLayerImpl> root_layer =
691 SolidColorLayerImpl::Create(host_impl_->active_tree(), 1); 691 SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
692 692
693 - // VideoLayerImpl will not be drawn. 693 - // VideoLayerImpl will not be drawn.
694 - FakeVideoFrameProvider provider; 694 - FakeVideoFrameProvider provider;
695 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( 695 - scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create(
696 - host_impl_->active_tree(), 2, &provider, media::VIDEO_ROTATION_0); 696 - host_impl_->active_tree(), 2, &provider, media::VIDEO_ROTATION_0);
697 - video_layer->SetBounds(gfx::Size(10, 10)); 697 - video_layer->SetBounds(gfx::Size(10, 10));
698 - video_layer->SetContentBounds(gfx::Size(10, 10)); 698 - video_layer->SetContentBounds(gfx::Size(10, 10));
699 - video_layer->SetDrawsContent(true); 699 - video_layer->SetDrawsContent(true);
700 - root_layer->AddChild(video_layer.Pass()); 700 - root_layer->AddChild(video_layer.Pass());
701 - SetupRootLayerImpl(root_layer.Pass()); 701 - SetupRootLayerImpl(root_layer.Pass());
702 - 702 -
703 LayerTreeHostImpl::FrameData frame; 703 LayerTreeHostImpl::FrameData frame;
704 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); 704 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame));
705 host_impl_->DrawLayers(&frame, gfx::FrameTime::Now()); 705 host_impl_->DrawLayers(&frame, gfx::FrameTime::Now());
706 diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_uni ttest.cc 706 diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_uni ttest.cc
707 index 50ace9b..69e5272 100644 707 index 5299d70..1e10588 100644
708 --- a/cc/trees/layer_tree_host_unittest.cc 708 --- a/cc/trees/layer_tree_host_unittest.cc
709 +++ b/cc/trees/layer_tree_host_unittest.cc 709 +++ b/cc/trees/layer_tree_host_unittest.cc
710 @@ -18,7 +18,6 @@ 710 @@ -18,7 +18,6 @@
711 #include "cc/layers/painted_scrollbar_layer.h" 711 #include "cc/layers/painted_scrollbar_layer.h"
712 #include "cc/layers/picture_layer.h" 712 #include "cc/layers/picture_layer.h"
713 #include "cc/layers/solid_color_layer.h" 713 #include "cc/layers/solid_color_layer.h"
714 -#include "cc/layers/video_layer.h" 714 -#include "cc/layers/video_layer.h"
715 #include "cc/output/begin_frame_args.h" 715 #include "cc/output/begin_frame_args.h"
716 #include "cc/output/compositor_frame_ack.h" 716 #include "cc/output/compositor_frame_ack.h"
717 #include "cc/output/copy_output_request.h" 717 #include "cc/output/copy_output_request.h"
718 @@ -41,7 +40,6 @@ 718 @@ -41,7 +40,6 @@
719 #include "cc/test/fake_picture_pile.h" 719 #include "cc/test/fake_picture_pile.h"
720 #include "cc/test/fake_proxy.h" 720 #include "cc/test/fake_proxy.h"
721 #include "cc/test/fake_scoped_ui_resource.h" 721 #include "cc/test/fake_scoped_ui_resource.h"
722 -#include "cc/test/fake_video_frame_provider.h" 722 -#include "cc/test/fake_video_frame_provider.h"
723 #include "cc/test/geometry_test_utils.h" 723 #include "cc/test/geometry_test_utils.h"
724 #include "cc/test/impl_side_painting_settings.h"
724 #include "cc/test/layer_tree_test.h" 725 #include "cc/test/layer_tree_test.h"
725 #include "cc/test/test_shared_bitmap_manager.h" 726 @@ -4193,28 +4191,6 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTes t {
726 @@ -4192,28 +4190,6 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTes t {
727 int num_draws_; 727 int num_draws_;
728 }; 728 };
729 729
730 -// VideoLayer must support being invalidated and then passing that along 730 -// VideoLayer must support being invalidated and then passing that along
731 -// to the compositor thread, even though no resources are updated in 731 -// to the compositor thread, even though no resources are updated in
732 -// response to that invalidation. 732 -// response to that invalidation.
733 -class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw { 733 -class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw {
734 - public: 734 - public:
735 - void SetupTree() override { 735 - void SetupTree() override {
736 - LayerTreeHostTest::SetupTree(); 736 - LayerTreeHostTest::SetupTree();
737 - scoped_refptr<VideoLayer> video_layer = 737 - scoped_refptr<VideoLayer> video_layer =
738 - VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0); 738 - VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0);
739 - video_layer->SetBounds(gfx::Size(10, 10)); 739 - video_layer->SetBounds(gfx::Size(10, 10));
740 - video_layer->SetIsDrawable(true); 740 - video_layer->SetIsDrawable(true);
741 - layer_tree_host()->root_layer()->AddChild(video_layer); 741 - layer_tree_host()->root_layer()->AddChild(video_layer);
742 - 742 -
743 - invalidate_layer_ = video_layer; 743 - invalidate_layer_ = video_layer;
744 - } 744 - }
745 - 745 -
746 - private: 746 - private:
747 - FakeVideoFrameProvider provider_; 747 - FakeVideoFrameProvider provider_;
748 -}; 748 -};
749 - 749 -
750 -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestVideoLayerInvalidate); 750 -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestVideoLayerInvalidate);
751 - 751 -
752 // IOSurfaceLayer must support being invalidated and then passing that along 752 // IOSurfaceLayer must support being invalidated and then passing that along
753 // to the compositor thread, even though no resources are updated in 753 // to the compositor thread, even though no resources are updated in
754 // response to that invalidation. 754 // response to that invalidation.
755 diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_ host_unittest_context.cc 755 diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_ host_unittest_context.cc
756 index 24ffcd4..cc4f28f 100644 756 index 681ae4e..cc4f28f 100644
757 --- a/cc/trees/layer_tree_host_unittest_context.cc 757 --- a/cc/trees/layer_tree_host_unittest_context.cc
758 +++ b/cc/trees/layer_tree_host_unittest_context.cc 758 +++ b/cc/trees/layer_tree_host_unittest_context.cc
759 @@ -15,8 +15,6 @@ 759 @@ -15,8 +15,6 @@
760 #include "cc/layers/picture_layer.h" 760 #include "cc/layers/picture_layer.h"
761 #include "cc/layers/texture_layer.h" 761 #include "cc/layers/texture_layer.h"
762 #include "cc/layers/texture_layer_impl.h" 762 #include "cc/layers/texture_layer_impl.h"
763 -#include "cc/layers/video_layer.h" 763 -#include "cc/layers/video_layer.h"
764 -#include "cc/layers/video_layer_impl.h" 764 -#include "cc/layers/video_layer_impl.h"
765 #include "cc/output/filter_operations.h" 765 #include "cc/output/filter_operations.h"
766 #include "cc/resources/single_release_callback.h" 766 #include "cc/resources/single_release_callback.h"
(...skipping 17 matching lines...) Expand all
784 namespace cc { 784 namespace cc {
785 namespace { 785 namespace {
786 @@ -66,7 +60,6 @@ class LayerTreeHostContextTest : public LayerTreeTest { 786 @@ -66,7 +60,6 @@ class LayerTreeHostContextTest : public LayerTreeTest {
787 context_should_support_io_surface_(false), 787 context_should_support_io_surface_(false),
788 fallback_context_works_(false), 788 fallback_context_works_(false),
789 async_output_surface_creation_(false) { 789 async_output_surface_creation_(false) {
790 - media::InitializeMediaLibraryForTesting(); 790 - media::InitializeMediaLibraryForTesting();
791 } 791 }
792 792
793 void LoseContext() { 793 void LoseContext() {
794 @@ -1041,49 +1034,6 @@ class LayerTreeHostContextTestDontUseLostResources 794 @@ -1041,43 +1034,6 @@ class LayerTreeHostContextTestDontUseLostResources
795 layer_with_mask->SetMaskLayer(mask.get()); 795 layer_with_mask->SetMaskLayer(mask.get());
796 root->AddChild(layer_with_mask); 796 root->AddChild(layer_with_mask);
797 797
798 - scoped_refptr<VideoLayer> video_color = 798 - scoped_refptr<VideoLayer> video_color =
799 - VideoLayer::Create(&color_frame_provider_, media::VIDEO_ROTATION_0); 799 - VideoLayer::Create(&color_frame_provider_, media::VIDEO_ROTATION_0);
800 - video_color->SetBounds(gfx::Size(10, 10)); 800 - video_color->SetBounds(gfx::Size(10, 10));
801 - video_color->SetIsDrawable(true); 801 - video_color->SetIsDrawable(true);
802 - root->AddChild(video_color); 802 - root->AddChild(video_color);
803 - 803 -
804 - scoped_refptr<VideoLayer> video_hw = 804 - scoped_refptr<VideoLayer> video_hw =
805 - VideoLayer::Create(&hw_frame_provider_, media::VIDEO_ROTATION_0); 805 - VideoLayer::Create(&hw_frame_provider_, media::VIDEO_ROTATION_0);
806 - video_hw->SetBounds(gfx::Size(10, 10)); 806 - video_hw->SetBounds(gfx::Size(10, 10));
807 - video_hw->SetIsDrawable(true); 807 - video_hw->SetIsDrawable(true);
808 - root->AddChild(video_hw); 808 - root->AddChild(video_hw);
809 - 809 -
810 - scoped_refptr<VideoLayer> video_scaled_hw = 810 - scoped_refptr<VideoLayer> video_scaled_hw =
811 - VideoLayer::Create(&scaled_hw_frame_provider_, media::VIDEO_ROTATION_0) ; 811 - VideoLayer::Create(&scaled_hw_frame_provider_, media::VIDEO_ROTATION_0) ;
812 - video_scaled_hw->SetBounds(gfx::Size(10, 10)); 812 - video_scaled_hw->SetBounds(gfx::Size(10, 10));
813 - video_scaled_hw->SetIsDrawable(true); 813 - video_scaled_hw->SetIsDrawable(true);
814 - root->AddChild(video_scaled_hw); 814 - root->AddChild(video_scaled_hw);
815 - 815 -
816 - color_video_frame_ = VideoFrame::CreateColorFrame( 816 - color_video_frame_ = VideoFrame::CreateColorFrame(
817 - gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); 817 - gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
818 - hw_video_frame_ = 818 - hw_video_frame_ = VideoFrame::WrapNativeTexture(
819 - VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder( 819 - make_scoped_ptr(
820 - mailbox, GL_TEXTURE_2D, sync_point)), 820 - new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)),
821 - media::VideoFrame::ReleaseMailboxCB(), 821 - media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4),
822 - gfx::Size(4, 4), 822 - gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4), base::TimeDelta(),
823 - gfx::Rect(0, 0, 4, 4), 823 - VideoFrame::ReadPixelsCB(), false);
824 - gfx::Size(4, 4), 824 - scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture(
825 - base::TimeDelta(), 825 - make_scoped_ptr(
826 - VideoFrame::ReadPixelsCB()); 826 - new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)),
827 - scaled_hw_video_frame_ = 827 - media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4),
828 - VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder( 828 - gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(),
829 - mailbox, GL_TEXTURE_2D, sync_point)), 829 - VideoFrame::ReadPixelsCB(), false);
830 - media::VideoFrame::ReleaseMailboxCB(),
831 - gfx::Size(4, 4),
832 - gfx::Rect(0, 0, 3, 2),
833 - gfx::Size(4, 4),
834 - base::TimeDelta(),
835 - VideoFrame::ReadPixelsCB());
836 - 830 -
837 - color_frame_provider_.set_frame(color_video_frame_); 831 - color_frame_provider_.set_frame(color_video_frame_);
838 - hw_frame_provider_.set_frame(hw_video_frame_); 832 - hw_frame_provider_.set_frame(hw_video_frame_);
839 - scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); 833 - scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_);
840 - 834 -
841 if (!delegating_renderer()) { 835 if (!delegating_renderer()) {
842 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335 836 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335
843 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); 837 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create();
844 @@ -1113,14 +1063,6 @@ class LayerTreeHostContextTestDontUseLostResources 838 @@ -1107,14 +1063,6 @@ class LayerTreeHostContextTestDontUseLostResources
845 839
846 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { 840 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
847 LayerTreeHostContextTest::CommitCompleteOnThread(host_impl); 841 LayerTreeHostContextTest::CommitCompleteOnThread(host_impl);
848 - 842 -
849 - if (host_impl->active_tree()->source_frame_number() == 3) { 843 - if (host_impl->active_tree()->source_frame_number() == 3) {
850 - // On the third commit we're recovering from context loss. Hardware 844 - // On the third commit we're recovering from context loss. Hardware
851 - // video frames should not be reused by the VideoFrameProvider, but 845 - // video frames should not be reused by the VideoFrameProvider, but
852 - // software frames can be. 846 - // software frames can be.
853 - hw_frame_provider_.set_frame(NULL); 847 - hw_frame_provider_.set_frame(NULL);
854 - scaled_hw_frame_provider_.set_frame(NULL); 848 - scaled_hw_frame_provider_.set_frame(NULL);
855 - } 849 - }
856 } 850 }
857 851
858 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, 852 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
859 @@ -1169,14 +1111,6 @@ class LayerTreeHostContextTestDontUseLostResources 853 @@ -1163,14 +1111,6 @@ class LayerTreeHostContextTestDontUseLostResources
860 scoped_refptr<DelegatedFrameResourceCollection> 854 scoped_refptr<DelegatedFrameResourceCollection>
861 delegated_resource_collection_; 855 delegated_resource_collection_;
862 scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_; 856 scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_;
863 - 857 -
864 - scoped_refptr<VideoFrame> color_video_frame_; 858 - scoped_refptr<VideoFrame> color_video_frame_;
865 - scoped_refptr<VideoFrame> hw_video_frame_; 859 - scoped_refptr<VideoFrame> hw_video_frame_;
866 - scoped_refptr<VideoFrame> scaled_hw_video_frame_; 860 - scoped_refptr<VideoFrame> scaled_hw_video_frame_;
867 - 861 -
868 - FakeVideoFrameProvider color_frame_provider_; 862 - FakeVideoFrameProvider color_frame_provider_;
869 - FakeVideoFrameProvider hw_frame_provider_; 863 - FakeVideoFrameProvider hw_frame_provider_;
870 - FakeVideoFrameProvider scaled_hw_frame_provider_; 864 - FakeVideoFrameProvider scaled_hw_frame_provider_;
871 }; 865 };
872 866
873 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources); 867 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources);
OLDNEW
« no previous file with comments | « mojo/services/network/web_socket_impl.h ('k') | mojo/tools/roll/mojo_services_network.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698