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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 4868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4879 | 4879 |
4880 void DidCommit() override { layer_tree_host()->SetVisible(false); } | 4880 void DidCommit() override { layer_tree_host()->SetVisible(false); } |
4881 | 4881 |
4882 void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, | 4882 void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, |
4883 bool visible) override { | 4883 bool visible) override { |
4884 visible_ = visible; | 4884 visible_ = visible; |
4885 | 4885 |
4886 // Once invisible, we can go visible again. | 4886 // Once invisible, we can go visible again. |
4887 if (!visible) { | 4887 if (!visible) { |
4888 PostSetVisibleToMainThread(true); | 4888 PostSetVisibleToMainThread(true); |
4889 } else { | 4889 } else if (activation_count_) { |
4890 EXPECT_TRUE(host_impl->RequiresHighResToDraw()); | 4890 EXPECT_TRUE(host_impl->RequiresHighResToDraw()); |
4891 EndTest(); | 4891 EndTest(); |
4892 } | 4892 } |
4893 } | 4893 } |
4894 | 4894 |
4895 void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { | 4895 void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { |
4896 ++activation_count_; | 4896 ++activation_count_; |
4897 EXPECT_FALSE(visible_); | 4897 EXPECT_FALSE(visible_); |
4898 } | 4898 } |
4899 | 4899 |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6388 EndTest(); | 6388 EndTest(); |
6389 } | 6389 } |
6390 | 6390 |
6391 void AfterTest() override {} | 6391 void AfterTest() override {} |
6392 }; | 6392 }; |
6393 | 6393 |
6394 MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface); | 6394 MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface); |
6395 | 6395 |
6396 } // namespace | 6396 } // namespace |
6397 } // namespace cc | 6397 } // namespace cc |
OLD | NEW |