ProfilerMarkerFactory.h 991 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "IUnityProfiler.h"
  3. namespace unity
  4. {
  5. namespace webrtc
  6. {
  7. class ScopedProfiler;
  8. class ScopedProfilerThread;
  9. class UnityProfiler;
  10. class ProfilerMarkerFactory
  11. {
  12. public:
  13. static std::unique_ptr<ProfilerMarkerFactory> Create(UnityProfiler* profiler);
  14. const UnityProfilerMarkerDesc* CreateMarker(
  15. const char* name, UnityProfilerCategoryId category, UnityProfilerMarkerFlags flags, int eventDataCount);
  16. // todo(kazuki):: support Unity2021.1 above
  17. UnityProfilerCategoryId CreateCategory(const char* name);
  18. std::unique_ptr<const ScopedProfiler> CreateScopedProfiler(const UnityProfilerMarkerDesc& desc);
  19. std::unique_ptr<const ScopedProfilerThread> CreateScopedProfilerThread(const char* groupName, const char* name);
  20. virtual ~ProfilerMarkerFactory();
  21. protected:
  22. ProfilerMarkerFactory(UnityProfiler* profiler);
  23. private:
  24. UnityProfiler* profiler_;
  25. };
  26. }
  27. }