| Index: ui/compositor/layer_unittest.cc
|
| diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
|
| index 6af9ee719b955df2474e2d0c8357d06a986fda74..8b4c9adbb31fbe236935656fe6719c780cda8de5 100644
|
| --- a/ui/compositor/layer_unittest.cc
|
| +++ b/ui/compositor/layer_unittest.cc
|
| @@ -27,6 +27,7 @@
|
| #include "cc/output/copy_output_request.h"
|
| #include "cc/output/copy_output_result.h"
|
| #include "cc/surfaces/surface_id.h"
|
| +#include "cc/surfaces/surface_info.h"
|
| #include "cc/surfaces/surface_sequence.h"
|
| #include "cc/test/pixel_test_utils.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -1833,9 +1834,10 @@ TEST_F(LayerWithDelegateTest, ExternalContent) {
|
|
|
| // Showing surface content changes the underlying cc layer.
|
| before = child->cc_layer_for_testing();
|
| - child->SetShowSurface(cc::SurfaceId(), base::Bind(&FakeSatisfyCallback),
|
| - base::Bind(&FakeRequireCallback), gfx::Size(10, 10),
|
| - 1.0, gfx::Size(10, 10));
|
| + child->SetShowSurface(
|
| + cc::SurfaceInfo(cc::SurfaceId(), 1.0, gfx::Size(10, 10)),
|
| + base::Bind(&FakeSatisfyCallback), base::Bind(&FakeRequireCallback),
|
| + gfx::Size(10, 10));
|
| EXPECT_TRUE(child->cc_layer_for_testing());
|
| EXPECT_NE(before.get(), child->cc_layer_for_testing());
|
|
|
| @@ -1855,8 +1857,8 @@ TEST_F(LayerWithDelegateTest, ExternalContentMirroring) {
|
| cc::SurfaceId surface_id(
|
| cc::FrameSinkId(0, 1),
|
| cc::LocalFrameId(2, base::UnguessableToken::Create()));
|
| - layer->SetShowSurface(surface_id, satisfy_callback, require_callback,
|
| - gfx::Size(10, 10), 1.0f, gfx::Size(10, 10));
|
| + layer->SetShowSurface(cc::SurfaceInfo(surface_id, 1.0f, gfx::Size(10, 10)),
|
| + satisfy_callback, require_callback, gfx::Size(10, 10));
|
|
|
| const auto mirror = layer->Mirror();
|
| auto* const cc_layer = mirror->cc_layer_for_testing();
|
| @@ -1872,8 +1874,8 @@ TEST_F(LayerWithDelegateTest, ExternalContentMirroring) {
|
| surface_id =
|
| cc::SurfaceId(cc::FrameSinkId(1, 2),
|
| cc::LocalFrameId(3, base::UnguessableToken::Create()));
|
| - layer->SetShowSurface(surface_id, satisfy_callback, require_callback,
|
| - gfx::Size(20, 20), 2.0f, gfx::Size(20, 20));
|
| + layer->SetShowSurface(cc::SurfaceInfo(surface_id, 2.0f, gfx::Size(20, 20)),
|
| + satisfy_callback, require_callback, gfx::Size(20, 20));
|
|
|
| // A new cc::Layer should be created for the mirror.
|
| EXPECT_NE(cc_layer, mirror->cc_layer_for_testing());
|
| @@ -1899,9 +1901,10 @@ TEST_F(LayerWithDelegateTest, LayerFiltersSurvival) {
|
|
|
| // Showing surface content changes the underlying cc layer.
|
| scoped_refptr<cc::Layer> before = layer->cc_layer_for_testing();
|
| - layer->SetShowSurface(cc::SurfaceId(), base::Bind(&FakeSatisfyCallback),
|
| - base::Bind(&FakeRequireCallback), gfx::Size(10, 10),
|
| - 1.0, gfx::Size(10, 10));
|
| + layer->SetShowSurface(
|
| + cc::SurfaceInfo(cc::SurfaceId(), 1.0, gfx::Size(10, 10)),
|
| + base::Bind(&FakeSatisfyCallback), base::Bind(&FakeRequireCallback),
|
| + gfx::Size(10, 10));
|
| EXPECT_EQ(layer->layer_grayscale(), 0.5f);
|
| EXPECT_TRUE(layer->cc_layer_for_testing());
|
| EXPECT_NE(before.get(), layer->cc_layer_for_testing());
|
| @@ -2222,9 +2225,10 @@ TEST(LayerDelegateTest, DelegatedFrameDamage) {
|
|
|
| FrameDamageCheckingDelegate delegate;
|
| layer->set_delegate(&delegate);
|
| - layer->SetShowSurface(cc::SurfaceId(), base::Bind(&FakeSatisfyCallback),
|
| - base::Bind(&FakeRequireCallback), gfx::Size(10, 10),
|
| - 1.0, gfx::Size(10, 10));
|
| + layer->SetShowSurface(
|
| + cc::SurfaceInfo(cc::SurfaceId(), 1.0, gfx::Size(10, 10)),
|
| + base::Bind(&FakeSatisfyCallback), base::Bind(&FakeRequireCallback),
|
| + gfx::Size(10, 10));
|
|
|
| EXPECT_FALSE(delegate.delegated_frame_damage_called());
|
| layer->OnDelegatedFrameDamage(damage_rect);
|
|
|