IssueNo:#I3W2Fn

Description:add hilog
Sig:graphic
Feature or Bugfix:Feature
Binary Source:No

Signed-off-by: dengzhihao <dengzhihao7@huawei.com>
Change-Id: Ib45717c8b700184d823c022da89a008cebd5c0db
This commit is contained in:
dengzhihao
2021-06-21 14:28:24 +08:00
parent 06ff6f7b06
commit c0ba6bdb29
9 changed files with 80 additions and 80 deletions
+4 -4
View File
@@ -72,11 +72,11 @@ int32_t SurfaceBufferImpl::SetData(uint32_t key, uint8_t type, const void* data,
type >= BUFFER_DATA_TYPE_MAX ||
size <= 0 ||
size > sizeof(int64_t)) {
GRAPHIC_LOGI("Invaild Param");
HILOG_INFO(HILOG_MODULE_GRAPHIC, "Invaild Param");
return SURFACE_ERROR_INVAILD_PARAM;
}
if (extDatas_.size() > MAX_USER_DATA_COUNT) {
GRAPHIC_LOGI("No more data can be saved because the storage space is full.");
HILOG_INFO(HILOG_MODULE_GRAPHIC, "No more data can be saved because the storage space is full.");
return SURFACE_ERROR_SYSTEM_ERROR;
}
ExtraData extData = {0};
@@ -91,13 +91,13 @@ int32_t SurfaceBufferImpl::SetData(uint32_t key, uint8_t type, const void* data,
if (extData.value == NULL) {
extData.value = malloc(size);
if (extData.value == NULL) {
GRAPHIC_LOGE("Couldn't allocate %zu bytes for ext data", size);
HILOG_ERROR(HILOG_MODULE_GRAPHIC, "Couldn't allocate %zu bytes for ext data", size);
return SURFACE_ERROR_SYSTEM_ERROR;
}
}
if (memcpy_s(extData.value, size, data, size) != EOK) {
free(extData.value);
GRAPHIC_LOGW("Couldn't copy %zu bytes for ext data", size);
HILOG_WARN(HILOG_MODULE_GRAPHIC, "Couldn't copy %zu bytes for ext data", size);
return SURFACE_ERROR_SYSTEM_ERROR;
}
extData.size = size;