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

Side by Side Diff: ui/gl/gl_fence_shared_event.cc

Issue 2383753002: gpu: Add GpuFence framework.
Patch Set: rebase 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 unified diff | Download patch
« ui/gfx/shared_event.cc ('K') | « ui/gl/gl_fence_shared_event.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« ui/gfx/shared_event.cc ('K') | « ui/gl/gl_fence_shared_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698