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/CLtypes.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 cl_int getCommandExecutionStatus(cl_int &executionStatus) = 0; 26 27 virtual cl_int setUserEventStatus(cl_int executionStatus) = 0; 28 29 virtual cl_int setCallback(cl::Event &event, cl_int commandExecCallbackType) = 0; 30 31 virtual cl_int getProfilingInfo(cl::ProfilingInfo name, 32 size_t valueSize, 33 void *value, 34 size_t *valueSizeRet) = 0; 35 36 protected: 37 const cl::Event &mEvent; 38 }; 39 40 } // namespace rx 41 42 #endif // LIBANGLE_RENDERER_CLEVENTIMPL_H_ 43