| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/texture_layer.h" | 7 #include "cc/texture_layer.h" |
| 8 | 8 |
| 9 #include "cc/layer_tree_host.h" | 9 #include "cc/layer_tree_host.h" |
| 10 #include "cc/single_thread_proxy.h" | 10 #include "cc/single_thread_proxy.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); | 86 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); |
| 87 | 87 |
| 88 EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AtLeast(1)); | 88 EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AtLeast(1)); |
| 89 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AtLeast(1)); | 89 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AtLeast(1)); |
| 90 testLayer->setTextureId(0); | 90 testLayer->setTextureId(0); |
| 91 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); | 91 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); |
| 92 } | 92 } |
| 93 | 93 |
| 94 TEST_F(TextureLayerTest, syncImplWhenDrawing) | 94 TEST_F(TextureLayerTest, syncImplWhenDrawing) |
| 95 { | 95 { |
| 96 FloatRect dirtyRect(0, 0, 1, 1); | 96 gfx::RectF dirtyRect(0, 0, 1, 1); |
| 97 | 97 |
| 98 scoped_refptr<TextureLayer> testLayer = TextureLayer::create(0); | 98 scoped_refptr<TextureLayer> testLayer = TextureLayer::create(0); |
| 99 ASSERT_TRUE(testLayer); | 99 ASSERT_TRUE(testLayer); |
| 100 scoped_ptr<TextureLayerImpl> implLayer; | 100 scoped_ptr<TextureLayerImpl> implLayer; |
| 101 implLayer = TextureLayerImpl::create(1); | 101 implLayer = TextureLayerImpl::create(1); |
| 102 ASSERT_TRUE(implLayer); | 102 ASSERT_TRUE(implLayer); |
| 103 | 103 |
| 104 EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AnyNumber()); | 104 EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AnyNumber()); |
| 105 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AnyNumber()); | 105 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AnyNumber()); |
| 106 m_layerTreeHost->setRootLayer(testLayer); | 106 m_layerTreeHost->setRootLayer(testLayer); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 testLayer->setTextureId(1); | 176 testLayer->setTextureId(1); |
| 177 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); | 177 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); |
| 178 | 178 |
| 179 EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AtLeast(1)); | 179 EXPECT_CALL(*m_layerTreeHost, acquireLayerTextures()).Times(AtLeast(1)); |
| 180 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AtLeast(1)); | 180 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AtLeast(1)); |
| 181 testLayer->removeFromParent(); | 181 testLayer->removeFromParent(); |
| 182 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); | 182 Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // anonymous namespace | 185 } // anonymous namespace |
| OLD | NEW |