| 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/layers/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "cc/layers/texture_layer_client.h" | 10 #include "cc/layers/texture_layer_client.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 test_layer->SetLayerTreeHost(layer_tree_host_.get()); | 186 test_layer->SetLayerTreeHost(layer_tree_host_.get()); |
| 187 | 187 |
| 188 // Test properties that should call SetNeedsCommit. All properties need to | 188 // Test properties that should call SetNeedsCommit. All properties need to |
| 189 // be set to new values in order for SetNeedsCommit to be called. | 189 // be set to new values in order for SetNeedsCommit to be called. |
| 190 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFlipped(false)); | 190 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFlipped(false)); |
| 191 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUV( | 191 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUV( |
| 192 gfx::PointF(0.25f, 0.25f), gfx::PointF(0.75f, 0.75f))); | 192 gfx::PointF(0.25f, 0.25f), gfx::PointF(0.75f, 0.75f))); |
| 193 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetVertexOpacity( | 193 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetVertexOpacity( |
| 194 0.5f, 0.5f, 0.5f, 0.5f)); | 194 0.5f, 0.5f, 0.5f, 0.5f)); |
| 195 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPremultipliedAlpha(false)); | 195 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPremultipliedAlpha(false)); |
| 196 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendBackgroundColor(true)); |
| 196 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTextureId(1)); | 197 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTextureId(1)); |
| 197 | 198 |
| 198 // Calling SetTextureId can call AcquireLayerTextures. | 199 // Calling SetTextureId can call AcquireLayerTextures. |
| 199 EXPECT_CALL(*layer_tree_host_, AcquireLayerTextures()).Times(AnyNumber()); | 200 EXPECT_CALL(*layer_tree_host_, AcquireLayerTextures()).Times(AnyNumber()); |
| 200 } | 201 } |
| 201 | 202 |
| 202 class MockMailboxCallback { | 203 class MockMailboxCallback { |
| 203 public: | 204 public: |
| 204 MOCK_METHOD3(Release, void(const std::string& mailbox, | 205 MOCK_METHOD3(Release, void(const std::string& mailbox, |
| 205 unsigned sync_point, | 206 unsigned sync_point, |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 base::Lock lock_; | 738 base::Lock lock_; |
| 738 unsigned expected_used_textures_on_commit_; | 739 unsigned expected_used_textures_on_commit_; |
| 739 }; | 740 }; |
| 740 | 741 |
| 741 // The TextureLayerClient does not use mailboxes, so can't use a delegating | 742 // The TextureLayerClient does not use mailboxes, so can't use a delegating |
| 742 // renderer. | 743 // renderer. |
| 743 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TextureLayerClientTest); | 744 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TextureLayerClientTest); |
| 744 | 745 |
| 745 } // namespace | 746 } // namespace |
| 746 } // namespace cc | 747 } // namespace cc |
| OLD | NEW |