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

Unified Diff: content/renderer/gpu/mailbox_output_surface.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: content/renderer/gpu/mailbox_output_surface.cc
diff --git a/content/renderer/gpu/mailbox_output_surface.cc b/content/renderer/gpu/mailbox_output_surface.cc
index fe6bd6aeb41c9fdf3e4995903f5c9a25029bab6d..b09f74bf7a7cdd439a1e036396414d84dedbae34 100644
--- a/content/renderer/gpu/mailbox_output_surface.cc
+++ b/content/renderer/gpu/mailbox_output_surface.cc
@@ -68,8 +68,11 @@ void MailboxOutputSurface::EnsureBackbuffer() {
TransferableFrame& texture = returned_textures_.front();
if (texture.size == surface_size_) {
current_backing_ = texture;
- if (current_backing_.sync_point)
- gl->WaitSyncPointCHROMIUM(current_backing_.sync_point);
+ if (current_backing_.sync_point ||
+ current_backing_.sync_token.HasData()) {
+ gl->WaitSyncPointCHROMIUM(current_backing_.sync_point,
+ current_backing_.sync_token.GetConstData());
+ }
returned_textures_.pop();
break;
}
@@ -174,6 +177,7 @@ void MailboxOutputSurface::OnSwapAck(uint32 output_surface_id,
}
DCHECK(it != pending_textures_.end());
it->sync_point = ack.gl_frame_data->sync_point;
+ it->sync_token = ack.gl_frame_data->sync_token;
if (!is_backbuffer_discarded_) {
returned_textures_.push(*it);
@@ -219,4 +223,13 @@ size_t MailboxOutputSurface::GetNumAcksPending() {
return pending_textures_.size() - 1;
}
+MailboxOutputSurface::TransferableFrame::TransferableFrame()
+ : texture_id(0), sync_point(0) {}
+
+MailboxOutputSurface::TransferableFrame::TransferableFrame(
+ uint32 texture_id,
+ const gpu::Mailbox& mailbox,
+ const gfx::Size size)
+ : texture_id(texture_id), mailbox(mailbox), size(size), sync_point(0) {}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698