mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
commit
3abc804c8c
@ -92,6 +92,7 @@ ohos_shared_library("libvsync") {
|
||||
"c_utils:utils",
|
||||
"eventhandler:libeventhandler",
|
||||
"hilog:libhilog",
|
||||
"hitrace:hitrace_meter",
|
||||
"ipc:ipc_core",
|
||||
"safwk:system_ability_fwk",
|
||||
"samgr:samgr_proxy",
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <unistd.h>
|
||||
#include <scoped_bytrace.h>
|
||||
#include <fcntl.h>
|
||||
#include <hitrace_meter.h>
|
||||
#include "event_handler.h"
|
||||
#include "graphic_common.h"
|
||||
#include "vsync_log.h"
|
||||
@ -30,6 +31,7 @@ constexpr int32_t INVALID_FD = -1;
|
||||
}
|
||||
void VSyncCallBackListener::OnReadable(int32_t fileDescriptor)
|
||||
{
|
||||
HitracePerfScoped perfTrace(ScopedDebugTrace::isEnabled(), HITRACE_TAG_GRAPHIC_AGP, "OnReadablePerfCount");
|
||||
if (fileDescriptor < 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -34,6 +34,12 @@ class ScopedDebugTrace {
|
||||
public:
|
||||
ScopedDebugTrace(const std::string &traceStr);
|
||||
~ScopedDebugTrace();
|
||||
|
||||
static bool isEnabled()
|
||||
{
|
||||
return debugTraceEnabled_;
|
||||
}
|
||||
|
||||
private:
|
||||
static bool debugTraceEnabled_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user