| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "cc/layers/heads_up_display_layer.h" | 10 #include "cc/layers/heads_up_display_layer.h" |
| 11 #include "cc/layers/io_surface_layer.h" | |
| 12 #include "cc/layers/layer_impl.h" | 11 #include "cc/layers/layer_impl.h" |
| 13 #include "cc/layers/painted_scrollbar_layer.h" | 12 #include "cc/layers/painted_scrollbar_layer.h" |
| 14 #include "cc/layers/picture_layer.h" | 13 #include "cc/layers/picture_layer.h" |
| 15 #include "cc/layers/texture_layer.h" | 14 #include "cc/layers/texture_layer.h" |
| 16 #include "cc/layers/texture_layer_impl.h" | 15 #include "cc/layers/texture_layer_impl.h" |
| 17 #include "cc/layers/video_layer.h" | 16 #include "cc/layers/video_layer.h" |
| 18 #include "cc/layers/video_layer_impl.h" | 17 #include "cc/layers/video_layer_impl.h" |
| 19 #include "cc/output/filter_operations.h" | 18 #include "cc/output/filter_operations.h" |
| 20 #include "cc/resources/single_release_callback.h" | 19 #include "cc/resources/single_release_callback.h" |
| 21 #include "cc/test/failure_output_surface.h" | 20 #include "cc/test/failure_output_surface.h" |
| (...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 media::PIXEL_FORMAT_ARGB, | 1014 media::PIXEL_FORMAT_ARGB, |
| 1016 gpu::MailboxHolder(mailbox, sync_token, GL_TEXTURE_2D), | 1015 gpu::MailboxHolder(mailbox, sync_token, GL_TEXTURE_2D), |
| 1017 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), | 1016 media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), |
| 1018 gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta()); | 1017 gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta()); |
| 1019 ASSERT_TRUE(scaled_hw_video_frame_); | 1018 ASSERT_TRUE(scaled_hw_video_frame_); |
| 1020 | 1019 |
| 1021 color_frame_provider_.set_frame(color_video_frame_); | 1020 color_frame_provider_.set_frame(color_video_frame_); |
| 1022 hw_frame_provider_.set_frame(hw_video_frame_); | 1021 hw_frame_provider_.set_frame(hw_video_frame_); |
| 1023 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); | 1022 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); |
| 1024 | 1023 |
| 1025 scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); | |
| 1026 io_surface->SetBounds(gfx::Size(10, 10)); | |
| 1027 io_surface->SetIsDrawable(true); | |
| 1028 io_surface->SetIOSurfaceProperties(1, gfx::Size(10, 10)); | |
| 1029 root->AddChild(io_surface); | |
| 1030 | |
| 1031 // Enable the hud. | 1024 // Enable the hud. |
| 1032 LayerTreeDebugState debug_state; | 1025 LayerTreeDebugState debug_state; |
| 1033 debug_state.show_property_changed_rects = true; | 1026 debug_state.show_property_changed_rects = true; |
| 1034 layer_tree_host()->SetDebugState(debug_state); | 1027 layer_tree_host()->SetDebugState(debug_state); |
| 1035 | 1028 |
| 1036 scoped_refptr<PaintedScrollbarLayer> scrollbar = | 1029 scoped_refptr<PaintedScrollbarLayer> scrollbar = |
| 1037 PaintedScrollbarLayer::Create(scoped_ptr<Scrollbar>(new FakeScrollbar), | 1030 PaintedScrollbarLayer::Create(scoped_ptr<Scrollbar>(new FakeScrollbar), |
| 1038 layer->id()); | 1031 layer->id()); |
| 1039 scrollbar->SetBounds(gfx::Size(10, 10)); | 1032 scrollbar->SetBounds(gfx::Size(10, 10)); |
| 1040 scrollbar->SetIsDrawable(true); | 1033 scrollbar->SetIsDrawable(true); |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 void AfterTest() override {} | 1603 void AfterTest() override {} |
| 1611 | 1604 |
| 1612 bool deferred_; | 1605 bool deferred_; |
| 1613 }; | 1606 }; |
| 1614 | 1607 |
| 1615 SINGLE_AND_MULTI_THREAD_TEST_F( | 1608 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 1616 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1609 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
| 1617 | 1610 |
| 1618 } // namespace | 1611 } // namespace |
| 1619 } // namespace cc | 1612 } // namespace cc |
| OLD | NEW |