RETURN_VAL_IF_FAIL(hwc_data, 0);
LIST_FOR_EACH_ENTRY(window, &hwc_data->hwc_window_list, link) {
- if (window->client_type == TDM_COMPOSITION_NONE)
+ if (window->validated_type == TDM_COMPOSITION_NONE)
continue;
number++;
sprd_hwc_validate(tdm_hwc *hwc, tdm_hwc_window **composited_wnds, uint32_t num_wnds, uint32_t *num_types)
{
tdm_sprd_hwc_data *hwc_data = hwc;
+ tdm_sprd_hwc_window_data *hwc_window_data = NULL;
tdm_sprd_hwc_window_data **composited_list = NULL;
int i = 0, zpos = 0;
hwc_data->need_target_window = 1;
+ /* initialize the validated_types */
+ LIST_FOR_EACH_ENTRY_REV(hwc_window_data, &hwc_data->hwc_window_list, link) {
+ if (hwc_window_data->validated_type == TDM_COMPOSITION_NONE)
+ continue;
+
+ hwc_window_data->validated_type = TDM_COMPOSITION_NONE;
+ }
+
if (num_wnds == 0) {
hwc_data->need_target_window = 1;
} else if (num_wnds == 1) {
RETURN_VAL_IF_FAIL(hwc_data != NULL, TDM_ERROR_INVALID_PARAMETER);
- tdm_sprd_hwc_window_data *hwc_window_data = NULL;
- LIST_FOR_EACH_ENTRY_REV(hwc_window_data, &hwc_data->hwc_window_list, link) {
- if (hwc_window_data->client_type == TDM_COMPOSITION_NONE)
- continue;
-
- hwc_window_data->client_type = hwc_window_data->validated_type;
- }
-
return TDM_ERROR_NONE;
}