mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 01:00:50 +00:00
optimize CPU cycle
Signed-off-by: yangqilin <yangqilin5@huawei.com>
This commit is contained in:
parent
f42ee5b50a
commit
72917f6b68
@ -22,10 +22,9 @@
|
||||
#include "hook.h"
|
||||
namespace OHOS {
|
||||
struct ThreadPrivateData {
|
||||
ThreadPrivateData() : error(EGL_SUCCESS), ctx(nullptr), table(nullptr) {}
|
||||
ThreadPrivateData() : error(EGL_SUCCESS), ctx(nullptr) {}
|
||||
EGLint error;
|
||||
EGLContext ctx;
|
||||
GlHookTable *table;
|
||||
};
|
||||
|
||||
class ThreadPrivateDataCtl {
|
||||
|
@ -40,7 +40,7 @@ Func GetEglApi(const char* procname)
|
||||
return nullptr;
|
||||
}
|
||||
static GetGlHookTableFunc g_pfnGetGlHookTable = GetEglApi<GetGlHookTableFunc>("GetHookTable");
|
||||
static GetGlHookTableKeyFunc g_pfnGetGlHookTableKey = GetEglApi<GetGlHookTableFunc>("GetHookTableKey");
|
||||
static GetGlHookTableKeyFunc g_pfnGetGlHookTableKey = GetEglApi<GetGlHookTableKeyFunc>("GetHookTableKey");
|
||||
|
||||
static pthread_key_t g_glHookTableKey = -1;
|
||||
|
||||
|
@ -29,7 +29,7 @@ void ThreadPrivateDataCtl::KeyInit()
|
||||
return;
|
||||
}
|
||||
if (pthread_key_create(&tableKey_, nullptr) != 0) {
|
||||
WLOGE("Failed to creat thread key.");
|
||||
WLOGE("Failed to create thread key.");
|
||||
return;
|
||||
}
|
||||
WLOGD("pthread_key_create. key = %{public}d", key_);
|
||||
|
Loading…
Reference in New Issue
Block a user