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

Unified Diff: cc/output/gl_renderer.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/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 81cc32343306c8b604abaf260c557ad205eeb58d..3ce4e7eec8d41be01f4485872657e61271d8c60a 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -2702,8 +2702,11 @@ void GLRenderer::GetFramebufferPixelsAsync(
request->texture_mailbox().target());
DCHECK(!mailbox.IsZero());
unsigned incoming_sync_point = request->texture_mailbox().sync_point();
- if (incoming_sync_point)
- gl_->WaitSyncPointCHROMIUM(incoming_sync_point);
+ const gpu::SyncToken& incoming_sync_token =
+ request->texture_mailbox().sync_token();
+ if (incoming_sync_point || incoming_sync_token.HasData())
+ gl_->WaitSyncPointCHROMIUM(incoming_sync_point,
+ incoming_sync_token.GetConstData());
texture_id =
gl_->CreateAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
@@ -2711,7 +2714,8 @@ void GLRenderer::GetFramebufferPixelsAsync(
GetFramebufferTexture(texture_id, RGBA_8888, window_rect);
unsigned sync_point = gl_->InsertSyncPointCHROMIUM();
- TextureMailbox texture_mailbox(mailbox, GL_TEXTURE_2D, sync_point);
+ TextureMailbox texture_mailbox(mailbox, GL_TEXTURE_2D, sync_point,
+ gpu::SyncToken());
scoped_ptr<SingleReleaseCallback> release_callback;
if (own_mailbox) {

Powered by Google App Engine
This is Rietveld 408576698