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

Unified Diff: components/exo/surface.cc

Issue 2404513002: exo: Implement zcr_linux_explicit_synchronization_v1
Patch Set: 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..2d6a996bd8e4387af8e64c0e91b9696d2bf2d41b 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -260,6 +260,15 @@ void Surface::Attach(Buffer* buffer) {
pending_buffer_.Reset(buffer ? buffer->AsWeakPtr() : base::WeakPtr<Buffer>());
}
+void Surface::FenceAcquire(std::unique_ptr<gfx::GpuFence> fence) {
+ // A better representation would be good here.
reveman 2016/10/09 19:03:17 TRACE_EVENT1(... "fence", !!fence) would be good e
fooishbar 2016/10/12 15:41:56 Done.
+ TRACE_EVENT1("exo", "Surface::FenceAcquire", "fence", fence.get());
+
+ pending_acquire_fence_ = std::move(fence);
+
+ DLOG(WARNING) << "Surface " << GetSurfaceId().ToString() << ": new acquire-fence";
reveman 2016/10/09 19:03:17 Please remove this debug log before landing this c
fooishbar 2016/10/12 15:41:55 Done.
+}
+
void Surface::Damage(const gfx::Rect& damage) {
TRACE_EVENT1("exo", "Surface::Damage", "damage", damage.ToString());
@@ -466,6 +475,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 +725,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, std::move(acquire_fence_),
reveman 2016/10/09 19:03:17 I think we need to keep the ownership of the acqui
fooishbar 2016/10/12 15:41:56 Phew, that was my guess as to what probably made t
+ state_.only_visible_on_secure_output,
client_usage);
}

Powered by Google App Engine
This is Rietveld 408576698