Files
XCSDD/docs/api/debug/profiler/setmarker.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

34 lines
769 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Profiler::SetMarker
```cpp
void SetMarker(const char* name, uint32_t color)
```
**状态:** 此方法目前为空实现,暂未功能。
在 Chrome Tracing 时间线上设置一个标记点,用于标记特定位置或状态。标记会显示为一条垂直线,便于在性能图中定位关键事件。
**参数:**
- `name` - 标记名称
- `color` - 标记颜色ABGR 格式)
**复杂度:** O(1)
**示例:**
```cpp
#include <XCEngine/Debug/Profiler.h>
void OnVBlank() {
XCEngine::Debug::Profiler::Get().SetMarker("VBlank", 0xFF00FF00); // 绿色
}
void OnRenderComplete() {
XCEngine::Debug::Profiler::Get().SetMarker("FrameRendered", 0xFFFF0000); // 红色
}
```
## 相关文档
- [Profiler 总览](profiler.md) - 返回类总览