linuxOS_D21X/source/artinchip/awtk-ui/awtk/src/base/lcd_profile.h
2024-11-29 16:23:11 +08:00

71 lines
1.4 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* File: lcd_profile.h
* Author: AWTK Develop Team
* Brief: wrap lcd for performance profile.
*
* Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License file for more details.
*
*/
/**
* History:
* ================================================================
* 2018-03-21 Li XianJing <xianjimli@hotmail.com> created
*
*/
#ifndef LCD_PROFILE_H
#define LCD_PROFILE_H
#include "base/lcd.h"
BEGIN_C_DECLS
/**
* @class lcd_profile_t
* @parent lcd_t
* 对现有LCD对象进行包装实现对各个函数的时间统计用于辅助定位性能瓶颈。
*
*/
typedef struct _lcd_profile_t {
lcd_t lcd;
/*private*/
lcd_t* impl;
uint32_t begin_frame_time;
uint32_t total_cost;
uint32_t swap_cost;
uint32_t flush_cost;
uint32_t draw_image_cost;
uint32_t draw_image_times;
uint32_t draw_image_pixels;
uint32_t draw_text_cost;
uint32_t draw_text_times;
uint32_t draw_text_chars;
uint32_t fill_cost;
uint32_t fill_times;
uint32_t fill_pixels;
uint32_t stroke_cost;
uint32_t stroke_times;
uint32_t stroke_pixels;
} lcd_profile_t;
lcd_t* lcd_profile_create(lcd_t* impl);
#define LCD_PROFILE(lcd) ((lcd_profile_t*)(lcd))
END_C_DECLS
#endif /*LCD_PROFILE_H*/