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

Unified Diff: components/exo/surface.cc

Issue 2404513002: exo: Implement zcr_linux_explicit_synchronization_v1
Patch Set: rebase, address review comments Created 4 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: components/exo/surface.cc
diff --git a/components/exo/surface.cc b/components/exo/surface.cc
index 5f22ec6fd64ad5a361039368515743886f0a1530..d6bf4b4a04fedf8aaae20200e0f0f58f6a22876c 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -260,6 +260,12 @@ void Surface::Attach(Buffer* buffer) {
pending_buffer_.Reset(buffer ? buffer->AsWeakPtr() : base::WeakPtr<Buffer>());
}
+void Surface::SetAcquireFence(std::unique_ptr<gfx::GpuFence> fence) {
+ TRACE_EVENT1("exo", "Surface::FenceAcquire", "fence", !!fence);
+
+ pending_acquire_fence_ = std::move(fence);
+}
+
void Surface::Damage(const gfx::Rect& damage) {
TRACE_EVENT1("exo", "Surface::Damage", "damage", damage.ToString());
@@ -466,6 +472,7 @@ void Surface::CommitSurfaceHierarchy() {
has_pending_contents_ = false;
current_buffer_ = std::move(pending_buffer_);
+ acquire_fence_ = std::move(pending_acquire_fence_);
UpdateResource(true);
}
@@ -715,7 +722,8 @@ void Surface::UpdateResource(bool client_usage) {
if (current_buffer_.buffer()) {
texture_mailbox_release_callback =
current_buffer_.buffer()->ProduceTextureMailbox(
- &texture_mailbox, state_.only_visible_on_secure_output,
+ &texture_mailbox, acquire_fence_.get(),
+ state_.only_visible_on_secure_output,
client_usage);
}

Powered by Google App Engine
This is Rietveld 408576698