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

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: format Created 5 years, 1 month 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 a536f9928d71dad9ee05ead3913d460d1c0a359b..127f7e8619ba90e603116a87807bf2bbc514fa83 100644
--- a/content/renderer/gpu/mailbox_output_surface.cc
+++ b/content/renderer/gpu/mailbox_output_surface.cc
@@ -68,8 +68,8 @@ 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_token.HasData())
+ gl->WaitSyncTokenCHROMIUM(current_backing_.sync_token.GetConstData());
returned_textures_.pop();
break;
}
@@ -173,7 +173,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);
@@ -206,8 +206,8 @@ void MailboxOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
frame->gl_frame_data->mailbox = current_backing_.mailbox;
context_provider_->ContextGL()->Flush();
- frame->gl_frame_data->sync_point =
- context_provider_->ContextGL()->InsertSyncPointCHROMIUM();
+ frame->gl_frame_data->sync_token =
+ gpu::SyncToken(context_provider_->ContextGL()->InsertSyncPointCHROMIUM());
CompositorOutputSurface::SwapBuffers(frame);
pending_textures_.push_back(current_backing_);
@@ -219,4 +219,12 @@ size_t MailboxOutputSurface::GetNumAcksPending() {
return pending_textures_.size() - 1;
}
+MailboxOutputSurface::TransferableFrame::TransferableFrame() : texture_id(0) {}
+
+MailboxOutputSurface::TransferableFrame::TransferableFrame(
+ uint32 texture_id,
+ const gpu::Mailbox& mailbox,
+ const gfx::Size size)
+ : texture_id(texture_id), mailbox(mailbox), size(size) {}
+
} // namespace content
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.h ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698