| 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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 base::Lock lock_; | 789 base::Lock lock_; |
| 789 unsigned expected_used_textures_on_commit_; | 790 unsigned expected_used_textures_on_commit_; |
| 790 }; | 791 }; |
| 791 | 792 |
| 792 // The TextureLayerClient does not use mailboxes, so can't use a delegating | 793 // The TextureLayerClient does not use mailboxes, so can't use a delegating |
| 793 // renderer. | 794 // renderer. |
| 794 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TextureLayerClientTest); | 795 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TextureLayerClientTest); |
| 795 | 796 |
| 796 } // namespace | 797 } // namespace |
| 797 } // namespace cc | 798 } // namespace cc |
| OLD | NEW |