| Index: cc/surfaces/display_unittest.cc
|
| diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
|
| index 30477f8069a102dc1ed9949d3f440d22305979a8..cbedd2f9b44c6a3c31ce9d5840514b54a727adbd 100644
|
| --- a/cc/surfaces/display_unittest.cc
|
| +++ b/cc/surfaces/display_unittest.cc
|
| @@ -16,6 +16,7 @@
|
| #include "cc/scheduler/begin_frame_source.h"
|
| #include "cc/surfaces/display_client.h"
|
| #include "cc/surfaces/display_scheduler.h"
|
| +#include "cc/surfaces/frame_sink_id.h"
|
| #include "cc/surfaces/surface.h"
|
| #include "cc/surfaces/surface_factory.h"
|
| #include "cc/surfaces/surface_factory_client.h"
|
| @@ -32,6 +33,8 @@ using testing::AnyNumber;
|
| namespace cc {
|
| namespace {
|
|
|
| +static constexpr FrameSinkId kArbitraryFrameSinkId(3, 3);
|
| +
|
| class FakeSurfaceFactoryClient : public SurfaceFactoryClient {
|
| public:
|
| FakeSurfaceFactoryClient() : begin_frame_source_(nullptr) {}
|
| @@ -97,13 +100,13 @@ class DisplayTest : public testing::Test {
|
| public:
|
| DisplayTest()
|
| : factory_(&manager_, &surface_factory_client_),
|
| - id_allocator_(kArbitraryClientId),
|
| + id_allocator_(kArbitraryFrameSinkId),
|
| task_runner_(new base::NullTaskRunner) {
|
| - manager_.RegisterSurfaceClientId(id_allocator_.client_id());
|
| + manager_.RegisterFrameSinkId(id_allocator_.frame_sink_id());
|
| }
|
|
|
| ~DisplayTest() override {
|
| - manager_.InvalidateSurfaceClientId(id_allocator_.client_id());
|
| + manager_.InvalidateFrameSinkId(id_allocator_.frame_sink_id());
|
| }
|
|
|
| void SetUpDisplay(const RendererSettings& settings,
|
| @@ -147,8 +150,6 @@ class DisplayTest : public testing::Test {
|
| SurfaceFactory::DrawCallback());
|
| }
|
|
|
| - static constexpr int kArbitraryClientId = 3;
|
| -
|
| SurfaceManager manager_;
|
| FakeSurfaceFactoryClient surface_factory_client_;
|
| SurfaceFactory factory_;
|
| @@ -181,7 +182,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
|
| SetUpDisplay(settings, nullptr);
|
|
|
| StubDisplayClient client;
|
| - display_->Initialize(&client, &manager_, id_allocator_.client_id());
|
| + display_->Initialize(&client, &manager_, id_allocator_.frame_sink_id());
|
|
|
| SurfaceId surface_id(id_allocator_.GenerateId());
|
| EXPECT_FALSE(scheduler_->damaged);
|
| @@ -444,7 +445,7 @@ TEST_F(DisplayTest, Finish) {
|
| SetUpDisplay(settings, std::move(context));
|
|
|
| StubDisplayClient client;
|
| - display_->Initialize(&client, &manager_, id_allocator_.client_id());
|
| + display_->Initialize(&client, &manager_, id_allocator_.frame_sink_id());
|
|
|
| display_->SetSurfaceId(surface_id, 1.f);
|
|
|
|
|