Chromium Code Reviews| 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); |
| } |