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

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

Issue 388643002: Rotation into Video Layer + Content Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed android webmediaplayer Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 mask->SetBounds(gfx::Size(10, 10)); 754 mask->SetBounds(gfx::Size(10, 10));
755 755
756 scoped_refptr<ContentLayer> content_with_mask = 756 scoped_refptr<ContentLayer> content_with_mask =
757 ContentLayer::Create(&client_); 757 ContentLayer::Create(&client_);
758 content_with_mask->SetBounds(gfx::Size(10, 10)); 758 content_with_mask->SetBounds(gfx::Size(10, 10));
759 content_with_mask->SetIsDrawable(true); 759 content_with_mask->SetIsDrawable(true);
760 content_with_mask->SetMaskLayer(mask.get()); 760 content_with_mask->SetMaskLayer(mask.get());
761 root->AddChild(content_with_mask); 761 root->AddChild(content_with_mask);
762 762
763 scoped_refptr<VideoLayer> video_color = 763 scoped_refptr<VideoLayer> video_color =
764 VideoLayer::Create(&color_frame_provider_); 764 VideoLayer::Create(&color_frame_provider_, media::VIDEO_ROTATION_0);
765 video_color->SetBounds(gfx::Size(10, 10)); 765 video_color->SetBounds(gfx::Size(10, 10));
766 video_color->SetIsDrawable(true); 766 video_color->SetIsDrawable(true);
767 root->AddChild(video_color); 767 root->AddChild(video_color);
768 768
769 scoped_refptr<VideoLayer> video_hw = 769 scoped_refptr<VideoLayer> video_hw =
770 VideoLayer::Create(&hw_frame_provider_); 770 VideoLayer::Create(&hw_frame_provider_, media::VIDEO_ROTATION_0);
771 video_hw->SetBounds(gfx::Size(10, 10)); 771 video_hw->SetBounds(gfx::Size(10, 10));
772 video_hw->SetIsDrawable(true); 772 video_hw->SetIsDrawable(true);
773 root->AddChild(video_hw); 773 root->AddChild(video_hw);
774 774
775 scoped_refptr<VideoLayer> video_scaled_hw = 775 scoped_refptr<VideoLayer> video_scaled_hw =
776 VideoLayer::Create(&scaled_hw_frame_provider_); 776 VideoLayer::Create(&scaled_hw_frame_provider_, media::VIDEO_ROTATION_0);
777 video_scaled_hw->SetBounds(gfx::Size(10, 10)); 777 video_scaled_hw->SetBounds(gfx::Size(10, 10));
778 video_scaled_hw->SetIsDrawable(true); 778 video_scaled_hw->SetIsDrawable(true);
779 root->AddChild(video_scaled_hw); 779 root->AddChild(video_scaled_hw);
780 780
781 color_video_frame_ = VideoFrame::CreateColorFrame( 781 color_video_frame_ = VideoFrame::CreateColorFrame(
782 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); 782 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta());
783 hw_video_frame_ = 783 hw_video_frame_ =
784 VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder( 784 VideoFrame::WrapNativeTexture(make_scoped_ptr(new gpu::MailboxHolder(
785 mailbox, GL_TEXTURE_2D, sync_point)), 785 mailbox, GL_TEXTURE_2D, sync_point)),
786 media::VideoFrame::ReleaseMailboxCB(), 786 media::VideoFrame::ReleaseMailboxCB(),
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 virtual void AfterTest() OVERRIDE {} 1527 virtual void AfterTest() OVERRIDE {}
1528 1528
1529 bool deferred_; 1529 bool deferred_;
1530 }; 1530 };
1531 1531
1532 // TODO(danakj): We don't use scheduler with SingleThreadProxy yet. 1532 // TODO(danakj): We don't use scheduler with SingleThreadProxy yet.
1533 MULTI_THREAD_TEST_F(LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); 1533 MULTI_THREAD_TEST_F(LayerTreeHostContextTestLoseAfterSendingBeginMainFrame);
1534 1534
1535 } // namespace 1535 } // namespace
1536 } // namespace cc 1536 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698