| Index: components/exo/surface.h
|
| diff --git a/components/exo/surface.h b/components/exo/surface.h
|
| index a3706787e488021f0d164a800f35417e2bcdaa6f..11dd3a12888a16784b8a12fccb62a1161035fb1b 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,10 @@ class Surface : public ui::LayerOwnerDelegate,
|
| // to one surface at a time.
|
| void Attach(Buffer* buffer);
|
|
|
| + // Provide an acquire-fence for the next surface commit. A buffer must be
|
| + // attached in the same transaction as applying a fence.
|
| + void SetAcquireFence(std::unique_ptr<gfx::GpuFence> fence);
|
| +
|
| // 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 +338,10 @@ class Surface : public ui::LayerOwnerDelegate,
|
| // The buffer that will become the content of surface when Commit() is called.
|
| BufferAttachment pending_buffer_;
|
|
|
| + // The fence which will be used to wait before sourcing from
|
| + // |pending_buffer_|, on next Commit().
|
| + std::unique_ptr<gfx::GpuFence> pending_acquire_fence_;
|
| +
|
| cc::SurfaceManager* surface_manager_;
|
|
|
| scoped_refptr<SurfaceFactoryOwner> factory_owner_;
|
| @@ -372,6 +381,10 @@ class Surface : public ui::LayerOwnerDelegate,
|
| // The buffer that is currently set as content of surface.
|
| BufferAttachment current_buffer_;
|
|
|
| + // The fence which will be used to wait before sourcing from
|
| + // |current_buffer_|.
|
| + std::unique_ptr<gfx::GpuFence> acquire_fence_;
|
| +
|
| // The last resource that was sent to a surface.
|
| cc::TransferableResource current_resource_;
|
|
|
|
|