| OLD | NEW |
| 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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 video_scaled_hw->SetBounds(gfx::Size(10, 10)); | 1074 video_scaled_hw->SetBounds(gfx::Size(10, 10)); |
| 1075 video_scaled_hw->SetIsDrawable(true); | 1075 video_scaled_hw->SetIsDrawable(true); |
| 1076 root->AddChild(video_scaled_hw); | 1076 root->AddChild(video_scaled_hw); |
| 1077 | 1077 |
| 1078 color_video_frame_ = VideoFrame::CreateColorFrame( | 1078 color_video_frame_ = VideoFrame::CreateColorFrame( |
| 1079 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); | 1079 gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); |
| 1080 hw_video_frame_ = VideoFrame::WrapNativeTexture( | 1080 hw_video_frame_ = VideoFrame::WrapNativeTexture( |
| 1081 make_scoped_ptr( | 1081 make_scoped_ptr( |
| 1082 new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)), | 1082 new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)), |
| 1083 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), | 1083 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), |
| 1084 gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4), base::TimeDelta(), | 1084 gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4), base::TimeDelta(), false); |
| 1085 VideoFrame::ReadPixelsCB(), false); | |
| 1086 scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture( | 1085 scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture( |
| 1087 make_scoped_ptr( | 1086 make_scoped_ptr( |
| 1088 new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)), | 1087 new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)), |
| 1089 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), | 1088 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), |
| 1090 gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(), | 1089 gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(), false); |
| 1091 VideoFrame::ReadPixelsCB(), false); | |
| 1092 | 1090 |
| 1093 color_frame_provider_.set_frame(color_video_frame_); | 1091 color_frame_provider_.set_frame(color_video_frame_); |
| 1094 hw_frame_provider_.set_frame(hw_video_frame_); | 1092 hw_frame_provider_.set_frame(hw_video_frame_); |
| 1095 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); | 1093 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); |
| 1096 | 1094 |
| 1097 if (!delegating_renderer()) { | 1095 if (!delegating_renderer()) { |
| 1098 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335 | 1096 // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335 |
| 1099 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); | 1097 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); |
| 1100 io_surface->SetBounds(gfx::Size(10, 10)); | 1098 io_surface->SetBounds(gfx::Size(10, 10)); |
| 1101 io_surface->SetIsDrawable(true); | 1099 io_surface->SetIsDrawable(true); |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 void AfterTest() override {} | 1794 void AfterTest() override {} |
| 1797 | 1795 |
| 1798 bool deferred_; | 1796 bool deferred_; |
| 1799 }; | 1797 }; |
| 1800 | 1798 |
| 1801 SINGLE_AND_MULTI_THREAD_TEST_F( | 1799 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 1802 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1800 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
| 1803 | 1801 |
| 1804 } // namespace | 1802 } // namespace |
| 1805 } // namespace cc | 1803 } // namespace cc |
| OLD | NEW |