fix member names

This commit is contained in:
Charlotte D 2019-04-02 17:11:13 +01:00
parent 8cf484b6a7
commit 2eafd42e3b
2 changed files with 20 additions and 20 deletions

View file

@ -617,7 +617,7 @@ static inline bool check_cursor(hwc_layer_1_t *layer, int order, int count)
struct private_handle_t *handle = (struct private_handle_t *)layer->handle;
return (layer->flags & HWC_IS_CURSOR_LAYER)
&& (count-order == 2)
&& check_cursor_format(handle->iFormat);
&& check_cursor_format(handle->format);
}
static inline int check_valid_format(int format)
@ -688,7 +688,7 @@ bool static inline check_3d_video(const DisplayInfo *PsDisplayInfo, hwc_layer_1_
{
return 0;
}
if(!check_video(handle->iFormat))
if(!check_video(handle->format))
{
goto no_3d;
}
@ -758,7 +758,7 @@ static bool inline check_same_scale(float SRWscaleFac, float SRHscaleFac,
bool inline hwc_rotate_mem(SUNXI_hwcdev_context_t *Globctx, struct private_handle_t *handle)
{
if((Globctx->has_tr_mem + handle->iWidth * handle->iHeight) > Globctx->tr_mem_limit)
if((Globctx->has_tr_mem + handle->width * handle->height) > Globctx->tr_mem_limit)
{
return 0;
}

View file

@ -229,7 +229,7 @@ static bool reset_globle(SUNXI_hwcdev_context_t *Globctx,
handle = (struct private_handle_t *)psLayer->handle;
if(handle != NULL && psLayer->compositionType != HWC_FRAMEBUFFER_TARGET)
{
hwc_format_info(&psAllLayer[j].form_info, handle->iFormat);
hwc_format_info(&psAllLayer[j].form_info, handle->format);
tmp_mem_thruput0 += cal_layer_mem(&psAllLayer[j]);
}
if(psLayer->compositionType == HWC_FRAMEBUFFER_TARGET)
@ -238,7 +238,7 @@ static bool reset_globle(SUNXI_hwcdev_context_t *Globctx,
Localctx->cur_fb_thruput = cal_layer_mem(&psAllLayer[j]);
all_mem_fb += Localctx->cur_fb_thruput;
}
if(handle != NULL && check_video(handle->iFormat))
if(handle != NULL && check_video(handle->format))
{
Localctx->video_mem += cal_layer_mem(&psAllLayer[j]);
Localctx->video_cnt++;
@ -333,7 +333,7 @@ static AssignDUETO_T check_valid_layer(hwc_layer_1_t *layer)
return D_SKIP_LAYER;
}
if (!check_valid_format(handle->iFormat))
if (!check_valid_format(handle->format))
{
return D_NO_FORMAT;
}
@ -357,7 +357,7 @@ static bool check_fix_rotate(SUNXI_hwcdev_context_t *Globctx, hwc_layer_1_t *lay
#endif
}
if(!check_rotate_format(handle->iFormat))
if(!check_rotate_format(handle->format))
{
goto tr_faild;
}
@ -684,8 +684,8 @@ static void resize_crop(rect64 *fb_crop,layer_info_t *hwc_layer, int *buffer_w,
int swap, s_left, s_right, s_top, s_bottom;
hwc_layer_1_t *psLayer = hwc_layer->psLayer;
struct private_handle_t *handle = (struct private_handle_t*)psLayer->handle;
handle_w = ALIGN(handle->iWidth, hwc_layer->form_info.align[0]);
handle_h = handle->iHeight;
handle_w = ALIGN(handle->width, hwc_layer->form_info.align[0]);
handle_h = handle->height;
#ifdef HWC_1_3
sourceCrop.left = int(ceilf(psLayer->sourceCropf.left)) < 0 ? 0 : int(ceilf(psLayer->sourceCropf.left));
@ -989,14 +989,14 @@ bool match_format(layer_info_t *psHwlayer_info, disp_layer_info *layer_info)
if(!err)
{
layer_info->fb.format = psHwlayer_info->form_info.format;
stride = ALIGN(handle->iWidth, psHwlayer_info->form_info.align[0]);
stride = ALIGN(handle->width, psHwlayer_info->form_info.align[0]);
i = 0;
while(i < psHwlayer_info->form_info.plannum)
{
layer_info->fb.size[i].width =
ALIGN(stride / psHwlayer_info->form_info.planWscale[i], psHwlayer_info->form_info.align[i]);
layer_info->fb.size[i].height =
handle->iHeight / psHwlayer_info->form_info.planHscale[i];
handle->height / psHwlayer_info->form_info.planHscale[i];
layer_info->fb.align[i] = psHwlayer_info->form_info.align[i];
if(i > 0)
{
@ -1058,7 +1058,7 @@ HwcAssignStatus hwc_try_assign_layer(HwcDisContext_t *Localctx, size_t singcout,
dueto = D_NULL_BUF;
goto assign_gpu;
}
isvideo = check_video(handle->iFormat);
isvideo = check_video(handle->format);
is3D = check_3d_video(PsDisplayInfo, psLayer);
is_cursor = check_cursor(psLayer, singcout, Localctx->numberofLayer);
if(is3D)
@ -1090,7 +1090,7 @@ HwcAssignStatus hwc_try_assign_layer(HwcDisContext_t *Localctx, size_t singcout,
dueto = check_valid_layer(psLayer);
if(dueto != I_OVERLAY)
{
ALOGV("check_valid_layer:0x%08x", handle->iFormat);
ALOGV("check_valid_layer:0x%08x", handle->format);
goto assign_gpu;
}
if(check_usage_sw_write(handle))
@ -1123,7 +1123,7 @@ HwcAssignStatus hwc_try_assign_layer(HwcDisContext_t *Localctx, size_t singcout,
planealpha = psLayer->planeAlpha;
/*cann't distinguish only pixel alpha*/
if(!check_support_blending(handle->iFormat))
if(!check_support_blending(handle->format))
{
ALOGV("not surpport alpha layer");
dueto = D_ALPHA;
@ -1142,7 +1142,7 @@ HwcAssignStatus hwc_try_assign_layer(HwcDisContext_t *Localctx, size_t singcout,
if(check_is_scale(PsDisplayInfo, psLayer, &WscalFac, &HscaleFac, isvideo)
|| !check_same_scale(Localctx->WidthScaleFactor, Localctx->HighetScaleFactor, 1.0, 1.0))
{
switch(check_scale_format(handle->iFormat))
switch(check_scale_format(handle->format))
{
case 1:
if(!hwc_can_scale(Localctx, psLayer, isvideo))
@ -1172,7 +1172,7 @@ HwcAssignStatus hwc_try_assign_layer(HwcDisContext_t *Localctx, size_t singcout,
CH = Localctx->HwCHUsedCnt;
tmpCH = match_nofull_channel(Localctx, -1, isvideo, addLayerCnt,
handle->iFormat, WscalFac, HscaleFac, planealpha);
handle->format, WscalFac, HscaleFac, planealpha);
while(tmpCH != -1 && CH !=-1 && CH >= tmpCH)
{
@ -1181,7 +1181,7 @@ HwcAssignStatus hwc_try_assign_layer(HwcDisContext_t *Localctx, size_t singcout,
tmCnt2 = find_channel_layer(&Localctx->ChannelInfo[CH], 1);
if((CH == tmpCH)
|| (match_nofull_channel(Localctx, CH, isvideo, addLayerCnt,
handle->iFormat, WscalFac, HscaleFac, planealpha) != -1)
handle->format, WscalFac, HscaleFac, planealpha) != -1)
)
{
if(check_cross_list(psLayer, Localctx, tmCnt1, tmCnt2, CH, ASSIGN_OVERLAY))
@ -1275,14 +1275,14 @@ needchannel:
Localctx->countofhwlayer++;
Localctx->has_tr += has_tr;
Globctx->has_tr_cnt += has_tr;
Localctx->tr_mem += has_tr ? (handle->iWidth * handle->iHeight) : 0;
Globctx->has_tr_mem += has_tr ? (handle->iWidth * handle->iHeight) : 0;
Localctx->tr_mem += has_tr ? (handle->width * handle->height) : 0;
Globctx->has_tr_mem += has_tr ? (handle->width * handle->height) : 0;
Globctx->has_secure += issecure;
Globctx->has_3D += is3D;
psCH[Localctx->HwCHUsedCnt - CHdiff].hasVideo = isvideo;
psCH[Localctx->HwCHUsedCnt - CHdiff].iCHFormat =
(handle == NULL ? HAL_PIXEL_FORMAT_BGRA_8888 : handle->iFormat);
(handle == NULL ? HAL_PIXEL_FORMAT_BGRA_8888 : handle->format);
psCH[Localctx->HwCHUsedCnt - CHdiff].WTScaleFactor =
WscalFac * Localctx->WidthScaleFactor;
psCH[Localctx->HwCHUsedCnt - CHdiff].HTScaleFactor =