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/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
6 | 6 |
7 #include "base/synchronization/lock.h" | 7 #include "base/synchronization/lock.h" |
8 #include "cc/content_layer.h" | 8 #include "cc/content_layer.h" |
9 #include "cc/content_layer_client.h" | 9 #include "cc/content_layer_client.h" |
10 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
(...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 public: | 2646 public: |
2647 static scoped_ptr<EvictionTestLayerImpl> create(LayerTreeImpl* treeImpl, int
id) | 2647 static scoped_ptr<EvictionTestLayerImpl> create(LayerTreeImpl* treeImpl, int
id) |
2648 { | 2648 { |
2649 return make_scoped_ptr(new EvictionTestLayerImpl(treeImpl, id)); | 2649 return make_scoped_ptr(new EvictionTestLayerImpl(treeImpl, id)); |
2650 } | 2650 } |
2651 virtual ~EvictionTestLayerImpl() { } | 2651 virtual ~EvictionTestLayerImpl() { } |
2652 | 2652 |
2653 virtual void appendQuads(QuadSink& quadSink, AppendQuadsData&) OVERRIDE | 2653 virtual void appendQuads(QuadSink& quadSink, AppendQuadsData&) OVERRIDE |
2654 { | 2654 { |
2655 ASSERT_TRUE(m_hasTexture); | 2655 ASSERT_TRUE(m_hasTexture); |
2656 ASSERT_NE(0u, layerTreeHostImpl()->resourceProvider()->numResources()); | 2656 ASSERT_NE(0u, layerTreeImpl()->resource_provider()->numResources()); |
2657 } | 2657 } |
2658 | 2658 |
2659 void setHasTexture(bool hasTexture) { m_hasTexture = hasTexture; } | 2659 void setHasTexture(bool hasTexture) { m_hasTexture = hasTexture; } |
2660 | 2660 |
2661 private: | 2661 private: |
2662 EvictionTestLayerImpl(LayerTreeImpl* treeImpl, int id) | 2662 EvictionTestLayerImpl(LayerTreeImpl* treeImpl, int id) |
2663 : LayerImpl(treeImpl, id) | 2663 : LayerImpl(treeImpl, id) |
2664 , m_hasTexture(false) { } | 2664 , m_hasTexture(false) { } |
2665 | 2665 |
2666 bool m_hasTexture; | 2666 bool m_hasTexture; |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3379 LayerTreeSettings settings; | 3379 LayerTreeSettings settings; |
3380 settings.maxPartialTextureUpdates = 4; | 3380 settings.maxPartialTextureUpdates = 4; |
3381 | 3381 |
3382 scoped_ptr<LayerTreeHost> host = LayerTreeHost::create(&client, settings, sc
oped_ptr<Thread>()); | 3382 scoped_ptr<LayerTreeHost> host = LayerTreeHost::create(&client, settings, sc
oped_ptr<Thread>()); |
3383 EXPECT_TRUE(host->initializeRendererIfNeeded()); | 3383 EXPECT_TRUE(host->initializeRendererIfNeeded()); |
3384 EXPECT_EQ(0u, host->settings().maxPartialTextureUpdates); | 3384 EXPECT_EQ(0u, host->settings().maxPartialTextureUpdates); |
3385 } | 3385 } |
3386 | 3386 |
3387 } // namespace | 3387 } // namespace |
3388 } // namespace cc | 3388 } // namespace cc |
OLD | NEW |