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

Unified Diff: mojo/converters/surfaces/tests/surface_unittest.cc

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Folded sync_point into sync_tokens Created 5 years, 2 months 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
Index: mojo/converters/surfaces/tests/surface_unittest.cc
diff --git a/mojo/converters/surfaces/tests/surface_unittest.cc b/mojo/converters/surfaces/tests/surface_unittest.cc
index fceaa32393c8d8bc42a3d95151554fdded56f0b0..abd4c8fb99a5f0d606e53b3266ce18db44660f41 100644
--- a/mojo/converters/surfaces/tests/surface_unittest.cc
+++ b/mojo/converters/surfaces/tests/surface_unittest.cc
@@ -402,17 +402,17 @@ TEST(SurfaceLibTest, MailboxHolder) {
gpu::Mailbox mailbox;
mailbox.Generate();
uint32_t texture_target = GL_TEXTURE_2D;
- uint32_t sync_point = 7u;
- gpu::MailboxHolder holder(mailbox, texture_target, sync_point);
+ gpu::SyncToken sync_token(7u);
+ gpu::MailboxHolder holder(mailbox, sync_token, texture_target);
MailboxHolderPtr mus_holder = MailboxHolder::From(holder);
EXPECT_EQ(texture_target, mus_holder->texture_target);
- EXPECT_EQ(sync_point, mus_holder->sync_point);
+ EXPECT_EQ(sync_token, mus_holder->sync_token);
gpu::MailboxHolder round_trip_holder = mus_holder.To<gpu::MailboxHolder>();
EXPECT_EQ(mailbox, round_trip_holder.mailbox);
EXPECT_EQ(texture_target, round_trip_holder.texture_target);
- EXPECT_EQ(sync_point, round_trip_holder.sync_point);
+ EXPECT_EQ(sync_token, round_trip_holder.sync_token);
}
TEST(SurfaceLibTest, TransferableResource) {
@@ -446,32 +446,32 @@ TEST(SurfaceLibTest, TransferableResource) {
EXPECT_EQ(mailbox_holder.mailbox, round_trip_resource.mailbox_holder.mailbox);
EXPECT_EQ(mailbox_holder.texture_target,
round_trip_resource.mailbox_holder.texture_target);
- EXPECT_EQ(mailbox_holder.sync_point,
- round_trip_resource.mailbox_holder.sync_point);
+ EXPECT_EQ(mailbox_holder.sync_token,
+ round_trip_resource.mailbox_holder.sync_token);
EXPECT_EQ(is_software, round_trip_resource.is_software);
}
TEST(SurfaceLibTest, ReturnedResource) {
uint32_t id = 5u;
- uint32_t sync_point = 24u;
+ gpu::SyncToken sync_token(24u);
int count = 2;
bool lost = false;
cc::ReturnedResource resource;
resource.id = id;
- resource.sync_point = sync_point;
+ resource.sync_token = sync_token;
resource.count = count;
resource.lost = lost;
ReturnedResourcePtr mus_resource = ReturnedResource::From(resource);
EXPECT_EQ(id, mus_resource->id);
- EXPECT_EQ(sync_point, mus_resource->sync_point);
+ EXPECT_EQ(sync_token, mus_resource->sync_token);
EXPECT_EQ(count, mus_resource->count);
EXPECT_EQ(lost, mus_resource->lost);
cc::ReturnedResource round_trip_resource =
mus_resource.To<cc::ReturnedResource>();
EXPECT_EQ(id, round_trip_resource.id);
- EXPECT_EQ(sync_point, round_trip_resource.sync_point);
+ EXPECT_EQ(sync_token, round_trip_resource.sync_token);
EXPECT_EQ(count, round_trip_resource.count);
EXPECT_EQ(lost, round_trip_resource.lost);
}

Powered by Google App Engine
This is Rietveld 408576698