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

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: 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: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 81cc32343306c8b604abaf260c557ad205eeb58d..fc979cc1bf0bedf17315e729c0301686f6d04181 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -488,13 +488,13 @@ void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) {
}
resource_provider_->SetReadLockFence(read_lock_fence.get());
- // Insert WaitSyncPointCHROMIUM on quad resources prior to drawing the frame,
+ // Insert WaitSyncTokenCHROMIUM on quad resources prior to drawing the frame,
// so that drawing can proceed without GL context switching interruptions.
ResourceProvider* resource_provider = resource_provider_;
for (const auto& pass : *frame->render_passes_in_draw_order) {
for (const auto& quad : pass->quad_list) {
for (ResourceId resource_id : quad->resources)
- resource_provider->WaitSyncPointIfNeeded(resource_id);
+ resource_provider->WaitSyncTokenIfNeeded(resource_id);
}
}
@@ -2701,9 +2701,10 @@ void GLRenderer::GetFramebufferPixelsAsync(
DCHECK_EQ(static_cast<unsigned>(GL_TEXTURE_2D),
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_token.HasData())
+ gl_->WaitSyncTokenCHROMIUM(incoming_sync_token.GetConstData());
texture_id =
gl_->CreateAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
@@ -2711,7 +2712,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, gpu::SyncToken(sync_point),
+ GL_TEXTURE_2D);
scoped_ptr<SingleReleaseCallback> release_callback;
if (own_mailbox) {

Powered by Google App Engine
This is Rietveld 408576698