示例#1
0
struct rtgui_dc* rtgui_dc_begin_drawing(rtgui_widget_t* owner)
{
	struct rtgui_dc* dc;
	RT_ASSERT(owner != RT_NULL);

	rtgui_screen_lock(RT_WAITING_FOREVER);

	if ((rtgui_region_is_flat(&owner->clip) == RT_EOK) &&
		rtgui_rect_is_equal(&(owner->extent), &(owner->clip.extents)) == RT_EOK)
		dc = rtgui_dc_hw_create(owner);
	else
		dc = rtgui_dc_client_create(owner);

	if (dc == RT_NULL) rtgui_screen_unlock();

	return dc;
}
示例#2
0
void rtgui_graphic_driver_vmode_exit(void)
{
    _current_driver = &_driver;
    rtgui_screen_unlock();
}
示例#3
0
void rtgui_dc_end_drawing(struct rtgui_dc* dc)
{
	dc->engine->fini(dc);
	rtgui_screen_unlock();
}