Chromium Code Reviews| Index: ui/gl/gl_fence_shared_event.cc |
| diff --git a/ui/gl/gl_fence_shared_event.cc b/ui/gl/gl_fence_shared_event.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..19e6ef93a2bb0f1ffd9ee0102e7fdd17208e6c24 |
| --- /dev/null |
| +++ b/ui/gl/gl_fence_shared_event.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/gl/gl_fence_shared_event.h" |
| + |
| +namespace gl { |
| + |
| +GLFenceSharedEvent::GLFenceSharedEvent(const gfx::SharedEventHandle& handle) |
| + : shared_event_(handle) { |
| + // Close shared memory segment to avoid running out of FDs. |
| + shared_event_.Close(); |
|
ericrk
2017/03/10 03:04:39
So, to make sure I understand, closing this frees
reveman
2017/03/13 12:33:05
Correct. We do the same for shared bitmaps and dis
|
| +} |
| + |
| +GLFenceSharedEvent::~GLFenceSharedEvent() {} |
| + |
| +bool GLFenceSharedEvent::HasCompleted() { |
| + return shared_event_.IsSignaled(); |
| +} |
| + |
| +void GLFenceSharedEvent::ClientWait() { |
| + DLOG(WARNING) << "Unsupported fence operation"; |
| +} |
| + |
| +void GLFenceSharedEvent::ServerWait() { |
| + DLOG(WARNING) << "Unsupported fence operation"; |
| +} |
| + |
| +bool GLFenceSharedEvent::SignalSupported() { |
| + return true; |
| +} |
| + |
| +void GLFenceSharedEvent::Signal() { |
| + shared_event_.Signal(); |
| +} |
| + |
| +} // namespace gl |