| 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/heads_up_display_layer.h" | 9 #include "cc/layers/heads_up_display_layer.h" |
| 10 #include "cc/layers/io_surface_layer.h" | 10 #include "cc/layers/io_surface_layer.h" |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 LayerTreeHostContextTestLostContextWhileUpdatingResources() | 957 LayerTreeHostContextTestLostContextWhileUpdatingResources() |
| 958 : parent_(FakeContentLayer::Create(&client_)), | 958 : parent_(FakeContentLayer::Create(&client_)), |
| 959 num_children_(50), | 959 num_children_(50), |
| 960 times_to_lose_on_end_query_(3) {} | 960 times_to_lose_on_end_query_(3) {} |
| 961 | 961 |
| 962 virtual scoped_ptr<TestWebGraphicsContext3D> CreateContext3d() OVERRIDE { | 962 virtual scoped_ptr<TestWebGraphicsContext3D> CreateContext3d() OVERRIDE { |
| 963 scoped_ptr<TestWebGraphicsContext3D> context = | 963 scoped_ptr<TestWebGraphicsContext3D> context = |
| 964 LayerTreeHostContextTest::CreateContext3d(); | 964 LayerTreeHostContextTest::CreateContext3d(); |
| 965 if (times_to_lose_on_end_query_) { | 965 if (times_to_lose_on_end_query_) { |
| 966 --times_to_lose_on_end_query_; | 966 --times_to_lose_on_end_query_; |
| 967 context->set_times_end_query_succeeds(5); | 967 context->set_times_end_query_succeeds(0); |
| 968 } | 968 } |
| 969 return context.Pass(); | 969 return context.Pass(); |
| 970 } | 970 } |
| 971 | 971 |
| 972 virtual void SetupTree() OVERRIDE { | 972 virtual void SetupTree() OVERRIDE { |
| 973 parent_->SetBounds(gfx::Size(num_children_, 1)); | 973 parent_->SetBounds(gfx::Size(num_children_, 1)); |
| 974 | 974 |
| 975 for (int i = 0; i < num_children_; i++) { | 975 for (int i = 0; i < num_children_; i++) { |
| 976 scoped_refptr<FakeContentLayer> child = | 976 scoped_refptr<FakeContentLayer> child = |
| 977 FakeContentLayer::Create(&client_); | 977 FakeContentLayer::Create(&client_); |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 impl_thread ? impl_thread->message_loop_proxy() : NULL); | 1590 impl_thread ? impl_thread->message_loop_proxy() : NULL); |
| 1591 EXPECT_FALSE(layer_tree_host); | 1591 EXPECT_FALSE(layer_tree_host); |
| 1592 } | 1592 } |
| 1593 }; | 1593 }; |
| 1594 | 1594 |
| 1595 SINGLE_AND_MULTI_THREAD_TEST_F( | 1595 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 1596 LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface); | 1596 LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface); |
| 1597 | 1597 |
| 1598 } // namespace | 1598 } // namespace |
| 1599 } // namespace cc | 1599 } // namespace cc |
| OLD | NEW |