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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 2384243003: ui: Add libsync GLFence implementation.
Patch Set: rebase 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
« no previous file with comments | « no previous file | content/child/child_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.cc
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index ad0647281a3ebb559336e7a09098857dcf126319..61ab8f947d26583f7d8fc94fc5a9d1fc153ebbad 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -21,6 +21,7 @@
#include "content/public/common/content_switches.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/ipc/client/gpu_fence_impl.h"
+#include "gpu/ipc/client/gpu_fence_impl_shared_event.h"
#include "gpu/ipc/client/gpu_memory_buffer_impl.h"
#include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
@@ -28,6 +29,10 @@
#include "ui/gfx/gpu_memory_buffer_tracing.h"
#include "ui/gl/gl_switches.h"
+#if defined(OS_LINUX)
+#include "gpu/ipc/client/gpu_fence_impl_libsync.h"
+#endif
+
namespace content {
namespace {
@@ -306,13 +311,17 @@ void BrowserGpuMemoryBufferManager::SetDestructionSyncToken(
}
std::unique_ptr<gfx::GpuFence> BrowserGpuMemoryBufferManager::CreateGpuFence() {
- std::unique_ptr<gpu::GpuFenceImpl> fence(new gpu::GpuFenceImpl);
+ std::unique_ptr<gpu::GpuFenceImpl> fence(new gpu::GpuFenceImplSharedEvent);
return std::move(fence);
}
std::unique_ptr<gfx::GpuFence>
BrowserGpuMemoryBufferManager::CreateGpuFenceFromHandle(
const gfx::GpuFenceHandle& handle) {
+#if defined(OS_LINUX)
+ if (handle.fd.fd >= 0)
+ return base::MakeUnique<gpu::GpuFenceImplLibsync>(handle.fd);
+#endif
return nullptr;
}
« no previous file with comments | « no previous file | content/child/child_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698