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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 test_layer->SetLayerTreeHost(layer_tree_host_.get()); | 187 test_layer->SetLayerTreeHost(layer_tree_host_.get()); |
188 | 188 |
189 // Test properties that should call SetNeedsCommit. All properties need to | 189 // Test properties that should call SetNeedsCommit. All properties need to |
190 // be set to new values in order for SetNeedsCommit to be called. | 190 // be set to new values in order for SetNeedsCommit to be called. |
191 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFlipped(false)); | 191 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFlipped(false)); |
192 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUV( | 192 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUV( |
193 gfx::PointF(0.25f, 0.25f), gfx::PointF(0.75f, 0.75f))); | 193 gfx::PointF(0.25f, 0.25f), gfx::PointF(0.75f, 0.75f))); |
194 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetVertexOpacity( | 194 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetVertexOpacity( |
195 0.5f, 0.5f, 0.5f, 0.5f)); | 195 0.5f, 0.5f, 0.5f, 0.5f)); |
196 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPremultipliedAlpha(false)); | 196 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPremultipliedAlpha(false)); |
| 197 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendBackgroundColor(true)); |
197 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTextureId(1)); | 198 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTextureId(1)); |
198 | 199 |
199 // Calling SetTextureId can call AcquireLayerTextures. | 200 // Calling SetTextureId can call AcquireLayerTextures. |
200 EXPECT_CALL(*layer_tree_host_, AcquireLayerTextures()).Times(AnyNumber()); | 201 EXPECT_CALL(*layer_tree_host_, AcquireLayerTextures()).Times(AnyNumber()); |
201 } | 202 } |
202 | 203 |
203 class MockMailboxCallback { | 204 class MockMailboxCallback { |
204 public: | 205 public: |
205 MOCK_METHOD3(Release, void(const std::string& mailbox, | 206 MOCK_METHOD3(Release, void(const std::string& mailbox, |
206 unsigned sync_point, | 207 unsigned sync_point, |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 scoped_refptr<TextureLayer> texture_layer_; | 872 scoped_refptr<TextureLayer> texture_layer_; |
872 scoped_ptr<TestWebGraphicsContext3D> texture_context_; | 873 scoped_ptr<TestWebGraphicsContext3D> texture_context_; |
873 unsigned texture_; | 874 unsigned texture_; |
874 int draw_count_; | 875 int draw_count_; |
875 }; | 876 }; |
876 | 877 |
877 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TextureLayerLostContextTest); | 878 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TextureLayerLostContextTest); |
878 | 879 |
879 } // namespace | 880 } // namespace |
880 } // namespace cc | 881 } // namespace cc |
OLD | NEW |