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 <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 }; | 198 }; |
199 | 199 |
200 TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) { | 200 TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) { |
201 scoped_refptr<TextureLayer> test_layer = | 201 scoped_refptr<TextureLayer> test_layer = |
202 TextureLayer::CreateForMailbox(nullptr); | 202 TextureLayer::CreateForMailbox(nullptr); |
203 EXPECT_SET_NEEDS_COMMIT(1, layer_tree_host_->SetRootLayer(test_layer)); | 203 EXPECT_SET_NEEDS_COMMIT(1, layer_tree_host_->SetRootLayer(test_layer)); |
204 | 204 |
205 // Test properties that should call SetNeedsCommit. All properties need to | 205 // Test properties that should call SetNeedsCommit. All properties need to |
206 // be set to new values in order for SetNeedsCommit to be called. | 206 // be set to new values in order for SetNeedsCommit to be called. |
207 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFlipped(false)); | 207 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetFlipped(false)); |
| 208 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNearestNeighbor(true)); |
208 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUV( | 209 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUV( |
209 gfx::PointF(0.25f, 0.25f), gfx::PointF(0.75f, 0.75f))); | 210 gfx::PointF(0.25f, 0.25f), gfx::PointF(0.75f, 0.75f))); |
210 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetVertexOpacity( | 211 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetVertexOpacity( |
211 0.5f, 0.5f, 0.5f, 0.5f)); | 212 0.5f, 0.5f, 0.5f, 0.5f)); |
212 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPremultipliedAlpha(false)); | 213 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPremultipliedAlpha(false)); |
213 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendBackgroundColor(true)); | 214 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendBackgroundColor(true)); |
214 } | 215 } |
215 | 216 |
216 TEST_F(TextureLayerTest, VisibleContentOpaqueRegion) { | 217 TEST_F(TextureLayerTest, VisibleContentOpaqueRegion) { |
217 const gfx::Size layer_bounds(100, 100); | 218 const gfx::Size layer_bounds(100, 100); |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1561 int callback_count_; | 1562 int callback_count_; |
1562 scoped_refptr<Layer> root_; | 1563 scoped_refptr<Layer> root_; |
1563 scoped_refptr<TextureLayer> layer_; | 1564 scoped_refptr<TextureLayer> layer_; |
1564 }; | 1565 }; |
1565 | 1566 |
1566 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1567 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
1567 TextureLayerWithMailboxImplThreadDeleted); | 1568 TextureLayerWithMailboxImplThreadDeleted); |
1568 | 1569 |
1569 } // namespace | 1570 } // namespace |
1570 } // namespace cc | 1571 } // namespace cc |
OLD | NEW |