完善资料让更多小伙伴认识你,还能领取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); } |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
rk1126实现BT601输入,输入不带IIC接口的驱动程序
1284 浏览 0 评论
1255 浏览 1 评论
2346 浏览 3 评论
RK3568 Android11让系统ntp校准时间生效,需要设置些什么
3101 浏览 1 评论
5115 浏览 2 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-8-18 08:18 , Processed in 0.511444 second(s), Total 44, Slave 36 queries .
Powered by 电子发烧友网
© 2015 www.ws-dc.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号