1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
Platform: ROCKCHIP
OS: Android 6.0 Kernel: 3.10.92 解决方法: device/rockchip/common/BoardConfig.mk: #rotate screen to 0, 90, 180, 270 #0: rotate_0 #90: rotate_90 #180: rotate_180 #270: rotate_270 ROTATE_SCREEN := rotate_180 调用过程: bootable/recovery/minui/Android.mk: ifeq ($(strip $(ROTATE_SCREEN)), rotate_0) LOCAL_CFLAGS += -DRotateScreen_0 endif ifeq ($(strip $(ROTATE_SCREEN)), rotate_90) LOCAL_CFLAGS += -DRotateScreen_90 endif ifeq ($(strip $(ROTATE_SCREEN)), rotate_180) LOCAL_CFLAGS += -DRotateScreen_180 endif ifeq ($(strip $(ROTATE_SCREEN)), rotate_270) LOCAL_CFLAGS += -DRotateScreen_270 endif bootable/recovery/minui/graphics_fbdev.cpp static GRSurface* fbdev_flip(minui_backend* backend __unused) { ...... #ifdef RotateScreen_90 rk_rotate_surface_90(&gr_framebuffer[1-displayed_buffer], gr_framebuffer[1-displayed_buffer].height, gr_framebuffer[1-displayed_buffer].width); #elif defined RotateScreen_180 rk_rotate_surface_180(&gr_framebuffer[1-displayed_buffer]); #elif defined RotateScreen_270 rk_rotate_surface_270(&gr_framebuffer[1-displayed_buffer], gr_framebuffer[1-displayed_buffer].height, gr_framebuffer[1-displayed_buffer].width); #endif ...... } void rk_rotate_surface_180(GRSurface* surface) { GGLuint width = surface->width; GGLuint height = surface->height; int byt = 4; // 4 byte for ARGB_8888 (2 byte for RGB_565) int length = width * height; GGLubyte* des_data = (GGLubyte *)malloc(sizeof(GGLubyte)*length*byt); memcpy(des_data,surface->data,sizeof(GGLubyte)*length*byt); memset(surface->data, 0, sizeof(GGLubyte)*length*byt); int i = 0; for (i=0; i { surface->data[i*byt] = des_data[(length-i-1)*byt]; surface->data[i*byt+1] = des_data[(length-i-1)*byt+1]; surface->data[i*byt+2] = des_data[(length-i-1)*byt+2]; surface->data[i*byt+3] = des_data[(length-i-1)*byt+3]; } free(des_data); } |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
626 浏览 0 评论
887 浏览 1 评论
784 浏览 1 评论
1997 浏览 1 评论
3242 浏览 1 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 23:19 , Processed in 0.646672 second(s), Total 72, Slave 54 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号