Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1667)

Unified Diff: cc/surfaces/display_unittest.cc

Issue 2468633002: Replaced cc::Display::SetSurfaceId() with SetLocalFrameId() (Closed)
Patch Set: rebase and minor bug fixes Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display_unittest.cc
diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
index c1622096e16eb87ee4128da0b98d16b532ad7ab4..7b576ac21a8d41c54b66246b8d985fce43e54e4b 100644
--- a/cc/surfaces/display_unittest.cc
+++ b/cc/surfaces/display_unittest.cc
@@ -132,8 +132,8 @@ class DisplayTest : public testing::Test {
display_ = base::MakeUnique<Display>(
&shared_bitmap_manager_, nullptr /* gpu_memory_buffer_manager */,
- settings, std::move(begin_frame_source), std::move(output_surface),
- std::move(scheduler),
+ settings, kArbitraryFrameSinkId, std::move(begin_frame_source),
+ std::move(output_surface), std::move(scheduler),
base::MakeUnique<TextureMailboxDeleter>(task_runner_.get()));
display_->SetVisible(true);
}
@@ -180,13 +180,12 @@ TEST_F(DisplayTest, DisplayDamaged) {
SetUpDisplay(settings, nullptr);
StubDisplayClient client;
- display_->Initialize(&client, &manager_, kArbitraryFrameSinkId);
+ display_->Initialize(&client, &manager_);
LocalFrameId local_frame_id(id_allocator_.GenerateId());
- SurfaceId surface_id(factory_.frame_sink_id(), local_frame_id);
EXPECT_FALSE(scheduler_->damaged);
EXPECT_FALSE(scheduler_->has_new_root_surface);
- display_->SetSurfaceId(surface_id, 1.f);
+ display_->SetLocalFrameId(local_frame_id, 1.f);
EXPECT_FALSE(scheduler_->damaged);
EXPECT_FALSE(scheduler_->display_resized_);
EXPECT_TRUE(scheduler_->has_new_root_surface);
@@ -426,7 +425,6 @@ class MockedContext : public TestWebGraphicsContext3D {
TEST_F(DisplayTest, Finish) {
LocalFrameId local_frame_id(id_allocator_.GenerateId());
- SurfaceId surface_id(factory_.frame_sink_id(), local_frame_id);
RendererSettings settings;
settings.partial_swap_enabled = true;
@@ -439,9 +437,9 @@ TEST_F(DisplayTest, Finish) {
SetUpDisplay(settings, std::move(context));
StubDisplayClient client;
- display_->Initialize(&client, &manager_, kArbitraryFrameSinkId);
+ display_->Initialize(&client, &manager_);
- display_->SetSurfaceId(surface_id, 1.f);
+ display_->SetLocalFrameId(local_frame_id, 1.f);
display_->Resize(gfx::Size(100, 100));
factory_.Create(local_frame_id);
@@ -510,7 +508,7 @@ TEST_F(DisplayTest, ContextLossInformsClient) {
SetUpDisplay(RendererSettings(), TestWebGraphicsContext3D::Create());
CountLossDisplayClient client;
- display_->Initialize(&client, &manager_, kArbitraryFrameSinkId);
+ display_->Initialize(&client, &manager_);
// Verify DidLoseOutputSurface callback is hooked up correctly.
EXPECT_EQ(0, client.loss_count());
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698