| Index: gpu/ipc/client/gpu_fence_impl.h
|
| diff --git a/gpu/ipc/client/gpu_fence_impl.h b/gpu/ipc/client/gpu_fence_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1c82d014981839e369ce567cd8979e4f6472813f
|
| --- /dev/null
|
| +++ b/gpu/ipc/client/gpu_fence_impl.h
|
| @@ -0,0 +1,42 @@
|
| +// 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.
|
| +
|
| +#ifndef GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_
|
| +#define GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_
|
| +
|
| +#include "gpu/gpu_export.h"
|
| +#include "ui/gfx/gpu_fence.h"
|
| +#include "ui/gfx/shared_event.h"
|
| +
|
| +namespace gpu {
|
| +
|
| +// Provides common implementation of a GPU fence.
|
| +class GPU_EXPORT GpuFenceImpl : public gfx::GpuFence {
|
| + public:
|
| + GpuFenceImpl();
|
| + explicit GpuFenceImpl(const gfx::GpuFenceHandle& handle);
|
| + ~GpuFenceImpl() override;
|
| +
|
| + static gfx::GpuFenceHandle CreateForChildProcess(
|
| + base::ProcessHandle child_process);
|
| +
|
| + // Type-checking upcast routine. Returns an NULL on failure.
|
| + static GpuFenceImpl* FromClientFence(ClientFence fence);
|
| +
|
| + // Overridden from gfx::GpuFence:
|
| + bool IsSignaled() override;
|
| + bool Wait(const base::TimeDelta& max_time) override;
|
| + void Reset() override;
|
| + gfx::GpuFenceHandle GetHandle() const override;
|
| + ClientFence AsClientFence() override;
|
| +
|
| + private:
|
| + gfx::SharedEvent shared_event_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GpuFenceImpl);
|
| +};
|
| +
|
| +} // namespace gpu
|
| +
|
| +#endif // GPU_IPC_CLIENT_GPU_FENCE_IMPL_H_
|
|
|