hwc_overlay
来源:互联网 发布:程序员没有女朋友组图 编辑:程序博客网 时间:2024/06/05 12:03
1,
/* this layer is to be drawn into the framebuffer by SurfaceFlinger */
HWC_FRAMEBUFFER;
/* this layer will be handled in the HWC */
HWC_OVERLAY = 1,
2,
android_vendor_asus_tilapia /proprietary /hwcomposer.tegra3.so
3, 三星驱动
https://bitbucket.org/seandroid/device-samsung-crespo/src/c932ac3b9f8a53a5c433dc7d3cfa2fb5d45a7eb9/libhwcomposer/SecHWC.cpp?at=seandroid
static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list){ struct hwc_context_t* ctx = (struct hwc_context_t*)dev; int overlay_win_cnt = 0; int compositionType = 0; int ret; //if geometry is not changed, there is no need to do any work here if( !list || (!(list->flags & HWC_GEOMETRY_CHANGED))) return 0; //all the windows are free here.... for (int i = 0; i < NUM_OF_WIN; i++) { ctx->win[i].status = HWC_WIN_FREE; ctx->win[i].buf_index = 0; } ctx->num_of_hwc_layer = 0; ctx->num_of_fb_layer = 0; LOGV("%s:: hwc_prepare list->numHwLayers %d", __func__, list->numHwLayers); for (int i = 0; i < list->numHwLayers ; i++) { hwc_layer_t* cur = &list->hwLayers[i]; if (overlay_win_cnt < NUM_OF_WIN) { compositionType = get_hwc_compos_decision(cur); if (compositionType == HWC_FRAMEBUFFER) { cur->compositionType = HWC_FRAMEBUFFER; ctx->num_of_fb_layer++; } else { ret = assign_overlay_window(ctx, cur, overlay_win_cnt, i); if (ret != 0) { cur->compositionType = HWC_FRAMEBUFFER; ctx->num_of_fb_layer++; continue; } cur->compositionType = HWC_OVERLAY; cur->hints = HWC_HINT_CLEAR_FB; overlay_win_cnt++; ctx->num_of_hwc_layer++; } } else { cur->compositionType = HWC_FRAMEBUFFER; ctx->num_of_fb_layer++; } } if(list->numHwLayers != (ctx->num_of_fb_layer + ctx->num_of_hwc_layer)) LOGV("%s:: numHwLayers %d num_of_fb_layer %d num_of_hwc_layer %d ", __func__, list->numHwLayers, ctx->num_of_fb_layer, ctx->num_of_hwc_layer); if (overlay_win_cnt < NUM_OF_WIN) { //turn off the free windows for (int i = overlay_win_cnt; i < NUM_OF_WIN; i++) { window_hide(&ctx->win[i]); reset_win_rect_info(&ctx->win[i]); } } return 0;}static int get_hwc_compos_decision(hwc_layer_t* cur){ if(cur->flags & HWC_SKIP_LAYER || !cur->handle) { LOGV("%s::is_skip_layer %d cur->handle %x", __func__, cur->flags & HWC_SKIP_LAYER, (uint32_t)cur->handle); return HWC_FRAMEBUFFER; } IMG_native_handle_t *prev_handle = (IMG_native_handle_t *)(cur->handle); int compositionType = HWC_FRAMEBUFFER; /* check here....if we have any resolution constraints */ if (((cur->sourceCrop.right - cur->sourceCrop.left) < 16) || ((cur->sourceCrop.bottom - cur->sourceCrop.top) < 8)) return compositionType; if ((cur->transform == HAL_TRANSFORM_ROT_90) || (cur->transform == HAL_TRANSFORM_ROT_270)) { if(((cur->displayFrame.right - cur->displayFrame.left) < 4)|| ((cur->displayFrame.bottom - cur->displayFrame.top) < 8)) return compositionType; } else if (((cur->displayFrame.right - cur->displayFrame.left) < 8) || ((cur->displayFrame.bottom - cur->displayFrame.top) < 4)) return compositionType; if((prev_handle->usage & GRALLOC_USAGE_PHYS_CONTIG) && (cur->blending == HWC_BLENDING_NONE)) compositionType = HWC_OVERLAY; else compositionType = HWC_FRAMEBUFFER; LOGV("%s::compositionType %d bpp %d format %x usage %x", __func__,compositionType, prev_handle->uiBpp, prev_handle->iFormat, prev_handle->usage & GRALLOC_USAGE_PHYS_CONTIG); return compositionType;}
0 0
- hwc_overlay
- 12、手机防盗--设置安全号码与选择联系人
- 关于TCP非阻塞方式connect连接
- Oracle新建用户、角色,授权,建表空间
- mac 10.9 usb安装win7的方法
- C# Winform 中webBrowser显示html内容时禁止错误提示的方法
- hwc_overlay
- TI wiki sd卡启动分区
- 海量影像快速发布(二)image service Definition
- Oracle用户密码含有特殊字符应当如何处理
- 使用 Flash 描述复杂的社交网络
- 关于android:screenOrientation="portrait"
- javascript常用小脚本 --完善ing
- 字符杂项设备(miscdevice)
- BP神经网络java实现,按照算法步骤也参考网上相关资源写的,若君有高见,非常欢迎指教