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

Unified Diff: components/exo/surface.h

Issue 2404513002: exo: Implement zcr_linux_explicit_synchronization_v1
Patch Set: rebase, pull in cl 2443823002 Created 4 years, 1 month 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
« no previous file with comments | « components/exo/display_unittest.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/surface.h
diff --git a/components/exo/surface.h b/components/exo/surface.h
index 744587db667507e671e4996c4dfc6d5276691dc9..667915eae65f920cfd11ef0b5bbf7d9b14aef8bb 100644
--- a/components/exo/surface.h
+++ b/components/exo/surface.h
@@ -34,6 +34,7 @@ class SurfaceFactory;
}
namespace gfx {
+class GpuFence;
class Path;
}
@@ -107,6 +108,10 @@ class Surface : public ui::ContextFactoryObserver {
// 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.
@@ -328,6 +333,10 @@ class Surface : public ui::ContextFactoryObserver {
// 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_fence_;
+
cc::SurfaceManager* surface_manager_;
scoped_refptr<SurfaceFactoryOwner> factory_owner_;
@@ -367,6 +376,10 @@ class Surface : public ui::ContextFactoryObserver {
// 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> fence_;
+
// The last resource that was sent to a surface.
cc::TransferableResource current_resource_;
« no previous file with comments | « components/exo/display_unittest.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698