Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/gl/gl_fence_shared_event.h" | |
| 6 | |
| 7 namespace gl { | |
| 8 | |
| 9 GLFenceSharedEvent::GLFenceSharedEvent(const gfx::SharedEventHandle& handle) | |
| 10 : shared_event_(handle) { | |
| 11 // Close shared memory segment to avoid running out of FDs. | |
| 12 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
| |
| 13 } | |
| 14 | |
| 15 GLFenceSharedEvent::~GLFenceSharedEvent() {} | |
| 16 | |
| 17 bool GLFenceSharedEvent::HasCompleted() { | |
| 18 return shared_event_.IsSignaled(); | |
| 19 } | |
| 20 | |
| 21 void GLFenceSharedEvent::ClientWait() { | |
| 22 DLOG(WARNING) << "Unsupported fence operation"; | |
| 23 } | |
| 24 | |
| 25 void GLFenceSharedEvent::ServerWait() { | |
| 26 DLOG(WARNING) << "Unsupported fence operation"; | |
| 27 } | |
| 28 | |
| 29 bool GLFenceSharedEvent::SignalSupported() { | |
| 30 return true; | |
| 31 } | |
| 32 | |
| 33 void GLFenceSharedEvent::Signal() { | |
| 34 shared_event_.Signal(); | |
| 35 } | |
| 36 | |
| 37 } // namespace gl | |
| OLD | NEW |