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

Side by Side Diff: gpu/ipc/client/gpu_fence_impl.h

Issue 2384243003: ui: Add libsync GLFence implementation.
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
« no previous file with comments | « gpu/ipc/client/gpu_channel_host.cc ('k') | gpu/ipc/client/gpu_fence_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_ 5 #ifndef GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_
6 #define GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_ 6 #define GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_
7 7
8 #include "gpu/gpu_export.h" 8 #include "gpu/gpu_export.h"
9 #include "ui/gfx/gpu_fence.h" 9 #include "ui/gfx/gpu_fence.h"
10 #include "ui/gfx/shared_event.h"
11 10
12 namespace gpu { 11 namespace gpu {
13 12
14 // Provides common implementation of a GPU fence. 13 // Provides common implementation of a GPU fence.
15 class GPU_EXPORT GpuFenceImpl : public gfx::GpuFence { 14 class GPU_EXPORT GpuFenceImpl : public gfx::GpuFence {
16 public: 15 public:
17 GpuFenceImpl(); 16 GpuFenceImpl();
18 explicit GpuFenceImpl(const gfx::GpuFenceHandle& handle);
19 ~GpuFenceImpl() override; 17 ~GpuFenceImpl() override;
20 18
21 static gfx::GpuFenceHandle CreateForChildProcess( 19 static gfx::GpuFenceHandle CreateForChildProcess(
22 base::ProcessHandle child_process); 20 base::ProcessHandle child_process);
23 21
22 static std::unique_ptr<GpuFenceImpl> CreateFromHandle(
23 const gfx::GpuFenceHandle& handle);
24
24 // Type-checking upcast routine. Returns an NULL on failure. 25 // Type-checking upcast routine. Returns an NULL on failure.
25 static GpuFenceImpl* FromClientFence(ClientFence fence); 26 static GpuFenceImpl* FromClientFence(ClientFence fence);
26 27
27 // Overridden from gfx::GpuFence: 28 // Overridden from gfx::GpuFence:
28 bool IsSignaled() override; 29 bool IsSignaled() override;
29 bool Wait(const base::TimeDelta& max_time) override; 30 bool Wait(const base::TimeDelta& max_time) override;
30 void Reset() override; 31 void Reset() override;
31 gfx::GpuFenceHandle GetHandle() const override;
32 ClientFence AsClientFence() override; 32 ClientFence AsClientFence() override;
33 33
34 private: 34 private:
35 gfx::SharedEvent shared_event_;
36
37 DISALLOW_COPY_AND_ASSIGN(GpuFenceImpl); 35 DISALLOW_COPY_AND_ASSIGN(GpuFenceImpl);
38 }; 36 };
39 37
40 } // namespace gpu 38 } // namespace gpu
41 39
42 #endif // GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_ 40 #endif // GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_channel_host.cc ('k') | gpu/ipc/client/gpu_fence_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698