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/base/thread_impl.h" | 8 #include "cc/base/thread_impl.h" |
9 #include "cc/layers/content_layer.h" | 9 #include "cc/layers/content_layer.h" |
10 #include "cc/layers/heads_up_display_layer.h" | 10 #include "cc/layers/heads_up_display_layer.h" |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 | 1569 |
1570 // FakeLayerTreeHostClient implementation. | 1570 // FakeLayerTreeHostClient implementation. |
1571 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE { | 1571 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE { |
1572 return scoped_ptr<OutputSurface>(); | 1572 return scoped_ptr<OutputSurface>(); |
1573 } | 1573 } |
1574 | 1574 |
1575 void RunTest(bool threaded, | 1575 void RunTest(bool threaded, |
1576 bool delegating_renderer, | 1576 bool delegating_renderer, |
1577 bool impl_side_painting) { | 1577 bool impl_side_painting) { |
1578 scoped_ptr<base::Thread> impl_thread; | 1578 scoped_ptr<base::Thread> impl_thread; |
1579 scoped_ptr<cc::Thread> impl_ccthread(NULL); | 1579 scoped_ptr<cc::Thread> impl_ccthread; |
1580 if (threaded) { | 1580 if (threaded) { |
1581 impl_thread.reset(new base::Thread("LayerTreeTest")); | 1581 impl_thread.reset(new base::Thread("LayerTreeTest")); |
1582 impl_ccthread = cc::ThreadImpl::CreateForDifferentThread( | 1582 impl_ccthread = cc::ThreadImpl::CreateForDifferentThread( |
1583 impl_thread->message_loop_proxy()); | 1583 impl_thread->message_loop_proxy()); |
1584 ASSERT_TRUE(impl_ccthread); | 1584 ASSERT_TRUE(impl_ccthread); |
1585 } | 1585 } |
1586 | 1586 |
1587 LayerTreeSettings settings; | 1587 LayerTreeSettings settings; |
1588 settings.impl_side_painting = impl_side_painting; | 1588 settings.impl_side_painting = impl_side_painting; |
1589 scoped_ptr<LayerTreeHost> layer_tree_host = | 1589 scoped_ptr<LayerTreeHost> layer_tree_host = |
1590 LayerTreeHost::Create(this, settings, impl_ccthread.Pass()); | 1590 LayerTreeHost::Create(this, settings, impl_ccthread.Pass()); |
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 |