Chromium Code Reviews| Index: components/exo/surface.h |
| diff --git a/components/exo/surface.h b/components/exo/surface.h |
| index a3706787e488021f0d164a800f35417e2bcdaa6f..e6ef4f25d8519d95beb6da968e1063767c3a927d 100644 |
| --- a/components/exo/surface.h |
| +++ b/components/exo/surface.h |
| @@ -23,6 +23,7 @@ |
| #include "ui/compositor/compositor.h" |
| #include "ui/compositor/layer_owner_delegate.h" |
| #include "ui/gfx/geometry/rect.h" |
| +#include "ui/gfx/gpu_fence.h" |
| namespace base { |
| namespace trace_event { |
| @@ -109,6 +110,11 @@ class Surface : public ui::LayerOwnerDelegate, |
| // to one surface at a time. |
| void Attach(Buffer* buffer); |
| + // Provide an acquire-fence (as a raw file descriptor) for the next surface |
|
reveman
2016/10/09 19:03:17
nit: update comment as this is not a raw file desc
fooishbar
2016/10/12 15:41:56
Done.
|
| + // commit. A buffer must be attached in the same transaction as applying a |
|
reveman
2016/10/09 19:03:17
What happens if a client doesn't respect this? We
fooishbar
2016/10/12 15:41:56
Probably the same which happens if 'A buffer can o
|
| + // fence. |
| + void FenceAcquire(std::unique_ptr<gfx::GpuFence> fence); |
|
reveman
2016/10/09 19:03:17
nit: s/FenceAcquire/SetAcquireFence/. We try to ma
fooishbar
2016/10/12 15:41:56
Done.
|
| + |
| // Describe the regions where the pending buffer is different from the |
| // current surface contents, and where the surface therefore needs to be |
| // repainted. |
| @@ -333,6 +339,9 @@ class Surface : public ui::LayerOwnerDelegate, |
| // The buffer that will become the content of surface when Commit() is called. |
| BufferAttachment pending_buffer_; |
| + std::unique_ptr<gfx::GpuFence> acquire_fence_; |
|
reveman
2016/10/09 19:03:17
nit: can you move acquire_fence_ just below curren
fooishbar
2016/10/12 15:41:56
Done.
|
| + std::unique_ptr<gfx::GpuFence> pending_acquire_fence_; |
| + |
| cc::SurfaceManager* surface_manager_; |
| scoped_refptr<SurfaceFactoryOwner> factory_owner_; |