完善资料让更多小伙伴认识你,还能领取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); } |
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
【幸狐Omni3576边缘计算套件试用体验】Debian系统安装和性能测试
324 浏览 0 评论
494 浏览 0 评论
1544 浏览 3 评论
RK 主流平台参数对比文档:助力设计阶段快速选型(包含RK3588 RK3588S RK3588S2 RK3576 RK3568)
1094 浏览 0 评论
行业集结:共同定制 RK3566 集成 AI 眼镜的前沿 AR 方案
1782 浏览 1 评论
/6
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-3-8 12:13 , Processed in 0.518324 second(s), Total 39, Slave 32 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1496