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

Unified Diff: components/exo/display.cc

Issue 2404513002: exo: Implement zcr_linux_explicit_synchronization_v1
Patch Set: remove stray aura/env include 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/display.cc
diff --git a/components/exo/display.cc b/components/exo/display.cc
index df470b28122ce118cf389e2f6aa29f09d28e9c3c..d10d00d025cc6b1331e759ed6cecf55956d94051 100644
--- a/components/exo/display.cc
+++ b/components/exo/display.cc
@@ -101,6 +101,22 @@ std::unique_ptr<Buffer> Display::CreateLinuxDMABufBuffer(
// COMMANDS_COMPLETED queries are required by native pixmaps.
GL_COMMANDS_COMPLETED_CHROMIUM, use_zero_copy, is_overlay_candidate);
}
+
+std::unique_ptr<gfx::GpuFence> Display::CreateLinuxFence(base::ScopedFD fd) {
+ TRACE_EVENT1("exo", "Display::CreateLinuxFence", "fd", fd.get());
+
+ gfx::GpuFenceHandle handle;
+
+ handle.fd.fd = fd.release();
+
+ std::unique_ptr<gfx::GpuFence> gpu_fence =
+ aura::Env::GetInstance()
+ ->context_factory()
+ ->GetGpuMemoryBufferManager()
+ ->CreateGpuFenceFromHandle(handle);
+
+ return std::move(gpu_fence);
+}
#endif
std::unique_ptr<ShellSurface> Display::CreateShellSurface(Surface* surface) {

Powered by Google App Engine
This is Rietveld 408576698