• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2021 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // CLEventImpl.h: Defines the abstract rx::CLEventImpl class.
7 
8 #ifndef LIBANGLE_RENDERER_CLEVENTIMPL_H_
9 #define LIBANGLE_RENDERER_CLEVENTIMPL_H_
10 
11 #include "libANGLE/renderer/cl_types.h"
12 
13 namespace rx
14 {
15 
16 class CLEventImpl : angle::NonCopyable
17 {
18   public:
19     using Ptr        = std::unique_ptr<CLEventImpl>;
20     using CreateFunc = std::function<Ptr(const cl::Event &)>;
21 
22     CLEventImpl(const cl::Event &event);
23     virtual ~CLEventImpl();
24 
25     virtual angle::Result onEventCreate() = 0;
26 
27     virtual angle::Result getCommandExecutionStatus(cl_int &executionStatus) = 0;
28 
29     virtual angle::Result setUserEventStatus(cl_int executionStatus) = 0;
30 
31     virtual angle::Result setCallback(cl::Event &event, cl_int commandExecCallbackType) = 0;
32 
33     virtual angle::Result getProfilingInfo(cl::ProfilingInfo name,
34                                            size_t valueSize,
35                                            void *value,
36                                            size_t *valueSizeRet) = 0;
37 
38   protected:
39     const cl::Event &mEvent;
40 };
41 
42 }  // namespace rx
43 
44 #endif  // LIBANGLE_RENDERER_CLEVENTIMPL_H_
45