1 overlay可能支持的颜色格式
/* possible overlay formats可能支持的颜色格式 */
enum {
    OVERLAY_FORMAT_RGBA_8888    = HAL_PIXEL_FORMAT_RGBA_8888,
    OVERLAY_FORMAT_RGB_565      = HAL_PIXEL_FORMAT_RGB_565,
    OVERLAY_FORMAT_BGRA_8888    = HAL_PIXEL_FORMAT_BGRA_8888,
    OVERLAY_FORMAT_YCbCr_422_SP = HAL_PIXEL_FORMAT_YCbCr_422_SP,
    OVERLAY_FORMAT_YCbCr_420_SP = HAL_PIXEL_FORMAT_YCbCr_420_SP,
    OVERLAY_FORMAT_YCbYCr_422_I = HAL_PIXEL_FORMAT_YCbCr_422_I,
    OVERLAY_FORMAT_YCbYCr_420_I = HAL_PIXEL_FORMAT_YCbCr_420_I,
    OVERLAY_FORMAT_CbYCrY_422_I = HAL_PIXEL_FORMAT_CbYCrY_422_I,
    OVERLAY_FORMAT_CbYCrY_420_I = HAL_PIXEL_FORMAT_CbYCrY_420_I,
    OVERLAY_FORMAT_DEFAULT      = 99    // The actual color format is determined
                                        // by the overlay
};

2 overlay_control_device_t结构的子函数

/* get static informations about the capabilities of the overlay engine 获取overlay引擎的固定信息*/
    int (*get)(struct overlay_control_device_t *dev, int name);

/* creates an overlay matching the given parameters as closely as possible.根据所给的参数,尽可能得创建一个overlay。
     * returns an error if no more overlays are available. The actual 如果没有更多的overlay可获取,返回错误。
     * size and format is returned in overlay_t. 实际的尺寸和格式通过overlay_t结构返回*/
    overlay_t* (*createOverlay)(struct overlay_control_device_t *dev,
            uint32_t w, uint32_t h, int32_t format);
   
    /* destroys an overlay. This call releases all 销毁一个overlay,释放所有资源
     * resources associated with overlay_t and make it invalid */
    void (*destroyOverlay)(struct overlay_control_device_t *dev,
            overlay_t* overlay);

/* set position and scaling of the given overlay as closely as possible. 根据所给的参数,尽可能的设置坐标和缩放。
     * if scaling cannot be performed, overlay must be centered. 如果无法执行尺寸变化,必须为中心覆盖*/
    int (*setPosition)(struct overlay_control_device_t *dev,
            overlay_t* overlay,
            int x, int y, uint32_t w, uint32_t h);

/* returns the actual position and size of the overlay 获取overlay的实际位置*/
    int (*getPosition)(struct overlay_control_device_t *dev,
            overlay_t* overlay,
            int* x, int* y, uint32_t* w, uint32_t* h);

/* sets configurable parameters for this overlay. returns an error if not设置配置参数,如果不支持返回错误
     * supported. */
    int (*setParameter)(struct overlay_control_device_t *dev,
            overlay_t* overlay, int param, int value);
/*以下两个函数没有实现*/
    int (*stage)(struct overlay_control_device_t *dev, overlay_t* overlay);
    int (*commit)(struct overlay_control_device_t *dev, overlay_t* overlay);

3、 overlay_data_device_t结构体函数子函数
    /* initialize the overlay from the given handle. this associates this通过传入的handle初始化overlay
     * overlay data module to its control module将data模块附加到控制模块上 */
    int (*initialize)(struct overlay_data_device_t *dev,
            overlay_handle_t handle);

/* can be called to change the width and height of the overlay.改变overlay的宽度和高度 */
    int (*resizeInput)(struct overlay_data_device_t *dev,
            uint32_t w, uint32_t h);
/*以下三个函数没有实现*/
    int (*setCrop)(struct overlay_data_device_t *dev,
            uint32_t x, uint32_t y, uint32_t w, uint32_t h) ;

int (*getCrop)(struct overlay_data_device_t *dev,
       uint32_t* x, uint32_t* y, uint32_t* w, uint32_t* h) ;

int (*setParameter)(struct overlay_data_device_t *dev,
            int param, int value);

/* blocks until an overlay buffer is available and return that buffer.阻塞直到一个overlay释放buffer */
    int (*dequeueBuffer)(struct overlay_data_device_t *dev,
           overlay_buffer_t *buf);

/* release the overlay buffer and post it释放overlay buffer,post我理解是贴到screen上 */
    int (*queueBuffer)(struct overlay_data_device_t *dev,
            overlay_buffer_t buffer);

/* returns the address of a given buffer if supported, NULL otherwise.返回given buffer的地址 */
    void* (*getBufferAddress)(struct overlay_data_device_t *dev,
            overlay_buffer_t buffer);
/*暂未实现*/
    int (*getBufferCount)(struct overlay_data_device_t *dev);

4、get()函数可以提供的种类
enum {
    /* Maximum amount of minification supported by the hardware硬件支持的最大缩小倍数*/
    OVERLAY_MINIFICATION_LIMIT      = 1,
    /* Maximum amount of magnification supported by the hardware硬件支持的最大放大倍数 */
    OVERLAY_MAGNIFICATION_LIMIT     = 2,
    /* Number of fractional bits support by the overlay scaling engine 缩放引擎支持的小数位数 */
    OVERLAY_SCALING_FRAC_BITS       = 3,
    /* Supported rotation step in degrees. 旋转步进*/
    OVERLAY_ROTATION_STEP_DEG       = 4,
    /* horizontal alignment in pixels 像素中的水平对齐?*/
    OVERLAY_HORIZONTAL_ALIGNMENT    = 5,
    /* vertical alignment in pixels 像素中的垂直对齐*/
    OVERLAY_VERTICAL_ALIGNMENT      = 6,
    /* width alignment restrictions. negative number for max. power-of-two 宽度对齐限制。负数为最大值。双功率?*/
    OVERLAY_WIDTH_ALIGNMENT         = 7,
    /* height alignment restrictions. negative number for max. power-of-two 高度对齐限制。负数为最大值。双功率?*/
    OVERLAY_HEIGHT_ALIGNMENT        = 8,
};

5、设置setParameter()函数可设置的种类
enum {
    /* rotation of the source image in degrees (0 to 359)源图像旋转角度(0 到 359)6410好像还不支持任意角度旋转 */
    OVERLAY_ROTATION_DEG = 1,
    /* enable or disable dithering */
    OVERLAY_DITHER        = 3,
    /* transformation applied (this is a superset of COPYBIT_ROTATION_DEG) */
    OVERLAY_TRANSFORM    = 4,
};

第二部分 overlay 架构初探的更多相关文章

  1. 云原生时代, Kubernetes 多集群架构初探

    为什么我们需要多集群? 近年来,多集群架构已经成为“老生常谈”.我们喜欢高可用,喜欢异地多可用区,而多集群架构天生就具备了这样的能力.另一方面我们也希望通过多集群混合云来降低成本,利用到不同集群各自的 ...

  2. scrapy架构初探

    scrapy架构初探 引言 Python即时网络爬虫启动的目标是一起把互联网变成大数据库.单纯的开放源代码并不是开源的全部,开源的核心是"开放的思想",聚合最好的想法.技术.人员, ...

  3. OceanBase 架构初探

    OceanBase 架构初探 原创衣舞晨风 发布于2018-11-13 08:44:14 阅读数 1417  收藏 展开 1.设计思路 OceanBase的目标是支持数百TB的数据量以及数十万TPS. ...

  4. Android开发学习之路--Android系统架构初探

    环境搭建好了,最简单的app也运行过了,那么app到底是怎么运行在手机上的,手机又到底怎么能运行这些应用,一堆的电子元器件最后可以运行这么美妙的界面,在此还是需要好好研究研究.这里从芯片及硬件模块-& ...

  5. 《深入理解bootstrap》读书笔记:第二章 整体架构

    一.  整体架构   1. CSS-12栅格系统 把网页宽度均分为12等分(保留15位精度)--这是bootstrap的核心功能. 2.基础布局组件 包括排版.按钮.表格.布局.表单等等. 3.jQu ...

  6. React Native For Android 架构初探

    版权声明:本文由王少鸣原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/171 来源:腾云阁 https://www.qclo ...

  7. Scrapy的架构初探

    Scrapy,Python开发的一个web抓取框架. 1,引言 Python即时网络爬虫启动的目标是一起把互联网变成大数据库.单纯的开放源代码并不是开源的全部,开源的核心是“开放的思想”,聚合最好的想 ...

  8. DDD「领域驱动设计」分层架构初探

    前言 基于 DDD 传统分层架构实现. 项目 github地址:https://github.com/WuMortal/DDDSample 这个分层架构是工作中项目正在使用的分层架构,使用了一段时间发 ...

  9. Android架构初探

    #一 背景点评美团合并之后,业务需要整合,我们部门的几条业务需要往美团平台迁移,为了降低迁移成本,开发和维护成本,以及将来可能要做的单元测试,需要对架构进行相应的调整.之前的代码都堆在Activity ...

随机推荐

  1. jquery 点击查看,收起特效

    <div class="all"> <p><a href="javascript:;" id="onvk"&g ...

  2. Clone table header and set as the first element, and replace header's th with td

    Clone table header and replace header's th with td var tableHeaderRow = '#tableId tbody tr:nth-child ...

  3. Implement Custom Cache Dependencies in ASP.NET 1.x

    Code download available at:CuttingEdge0407.exe(128 KB)   Contents What's a Cache Dependency, Anyway? ...

  4. php 字母大小写转换的函数

    分享下,在php编程中,将字母大小写进行转换的常用函数. 1.将字符串转换成小写strtolower(): 该函数将传入的字符串参数所有的字符都转换成小写,并以小定形式放回这个字符串 2.将字符转成大 ...

  5. Spark Streaming揭秘 Day11 Receiver Tracker的具体实现

    Spark Streaming揭秘 Day11 Receiver Tracker的具体实现 ReceiverTracker是运行在Driver上Receiver管理程序,今天让我们深入学习一下. 核心 ...

  6. cadence 封装制作小结

    assembly :是装配层,就是元器件的实际大小,用来产生元器件的装配图.也可以使用此层进行布局:外框尺寸应该为元件除焊盘外的部分 该区域可比silkscreen小10mil,线宽不用设置,矩形即可 ...

  7. 2014年辛星完全解读Javascript第三节

    经过第一节的入门和第二节的运算符,那么接下来我们就可以学习Javascript的函数了,当然了,不管大家之前学习的是什么编程语言,都会有函数的概念,如果大家学的是Pascal,还会有”过程“的概念,但 ...

  8. The connection to adb is down

    有一周时间没有打开ADT了,最近想为我的APP增加下些新的功能,但是在编译的时候出现了一个奇怪问题 [2013-10-18 14:43:50 - zzbus] Android Launch![2013 ...

  9. Sqoop 1.99.4 安装

    1.安装准备工作:已经装好的 hadoop 环境是 hadoop-2.5.1 64位下载的sqoop安装包(注意是hadoop200)http://www.us.apache.org/dist/sqo ...

  10. 创建dblink 同义词

     database link dblink的主要作用是两个数据库间的数据访问 create database link my_test connect to testdbname identified ...