OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 <algorithm> | 10 #include <algorithm> |
(...skipping 6992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7003 EXPECT_EQ(21u, frame.resource_list.size()); | 7003 EXPECT_EQ(21u, frame.resource_list.size()); |
7004 | 7004 |
7005 EndTest(); | 7005 EndTest(); |
7006 } | 7006 } |
7007 | 7007 |
7008 void AfterTest() override {} | 7008 void AfterTest() override {} |
7009 }; | 7009 }; |
7010 | 7010 |
7011 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); | 7011 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); |
7012 | 7012 |
7013 // Ensure that content_source_id is propagated to the frame's metadata. | |
7014 class LayerTreeHostTestContentSourceId : public LayerTreeHostTest { | |
7015 protected: | |
7016 void BeginTest() override { | |
7017 layer_tree_host()->SetContentSourceId(5); | |
7018 PostSetNeedsCommitToMainThread(); | |
7019 } | |
7020 | |
7021 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | |
7022 LayerTreeHostImpl::FrameData* frame_data, | |
7023 DrawResult draw_result) override { | |
7024 EXPECT_EQ(DRAW_SUCCESS, draw_result); | |
7025 EXPECT_EQ(5U, host_impl->active_tree()->content_source_id()); | |
7026 return draw_result; | |
7027 } | |
7028 | |
7029 void DisplayReceivedCompositorFrameOnThread( | |
7030 const CompositorFrame& frame) override { | |
7031 EXPECT_EQ(5U, frame.metadata.content_source_id); | |
7032 EndTest(); | |
7033 } | |
7034 | |
7035 void AfterTest() override {} | |
7036 }; | |
7037 | |
7038 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestContentSourceId); | |
7039 | |
7040 } // namespace | 7013 } // namespace |
7041 } // namespace cc | 7014 } // namespace cc |
OLD | NEW |