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

Unified Diff: cc/test/layer_tree_pixel_test.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: Fix mock gpu video accelerator factory 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: cc/test/layer_tree_pixel_test.cc
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc
index a8e3c1cf716c36be0c3891fa5aee9efebf8ab916..ea9b97c150845aa6c3d383b3e5ae920772ea7761 100644
--- a/cc/test/layer_tree_pixel_test.cc
+++ b/cc/test/layer_tree_pixel_test.cc
@@ -247,8 +247,10 @@ scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap(
scoped_ptr<gpu::GLInProcessContext> context = CreateTestInProcessContext();
GLES2Interface* gl = context->GetImplementation();
- if (texture_mailbox.sync_point())
- gl->WaitSyncPointCHROMIUM(texture_mailbox.sync_point());
+ if (texture_mailbox.sync_point() || texture_mailbox.sync_token().HasData()) {
+ gl->WaitSyncPointCHROMIUM(texture_mailbox.sync_point(),
+ texture_mailbox.sync_token().GetConstData());
+ }
GLuint texture_id = 0;
gl->GenTextures(1, &texture_id);
@@ -306,10 +308,11 @@ void LayerTreePixelTest::ReleaseTextureMailbox(
scoped_ptr<gpu::GLInProcessContext> context,
uint32 texture,
uint32 sync_point,
+ const gpu::SyncToken& sync_token,
bool lost_resource) {
GLES2Interface* gl = context->GetImplementation();
- if (sync_point)
- gl->WaitSyncPointCHROMIUM(sync_point);
+ if (sync_point || sync_token.HasData())
+ gl->WaitSyncPointCHROMIUM(sync_point, sync_token.GetConstData());
gl->DeleteTextures(1, &texture);
pending_texture_mailbox_callbacks_--;
TryEndTest();
@@ -373,7 +376,8 @@ void LayerTreePixelTest::CopyBitmapToTextureMailboxAsTexture(
gl->BindTexture(GL_TEXTURE_2D, 0);
uint32 sync_point = gl->InsertSyncPointCHROMIUM();
- *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point);
+ *texture_mailbox =
+ TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point, gpu::SyncToken());
*release_callback = SingleReleaseCallback::Create(
base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
base::Unretained(this),

Powered by Google App Engine
This is Rietveld 408576698