layer 同步调用_关于Layer组件的同步以及减少GPU带宽的问题

本文主要为大家分享一篇P关于Layer组件的同步以及减少GPU带宽的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧。

问题:

1) Layer 之间能否进行单独更新,比如其中video 层上面弹出的状态栏场景如何优化;

初步构想每次仅更新video layer或则将video layer 绕过BQ 进行处理。

2)FW 以及GPU对video layer 的常见处理;

3)几个变量的理解;

(1)mCurrentTexture ,nextTextureImage;

(2)BufferItem,BufferQueue,mslots;slot,mqueuedframe,mqueuedItem;

(3)syncForReleaseLocked,updateAndReleaseLocked,releaseBufferLocked,releaseBuffer

(4)/ acquireBuffer attempts to acquire ownership of the next pending buffer in the BufferQueue.

// If no buffer is pending then it returns NO_BUFFER_AVAILABLE. If a buffer is successfully

// acquired, the information about the buffer is returned in BufferItem.

//

// If the buffer returned had previously been acquired then the BufferItem::mGraphicBuffer field

// of buffer is set to NULL and it is assumed that the consumer still holds a reference to the

// buffer.

//

// If presentWhen is non-zero, it indicates the time when the buffer will be displayed on

// screen. If the buffer's timestamp is farther in the future, the buffer won't be acquired, and

// PRESENT_LATER will be returned. The presentation time is in nanoseconds, and the time base

// is CLOCK_MONOTONIC.

//

// If maxFrameNumber is non-zero, it indicates that acquireBuffer should only return a buffer

// with a frame number less than or equal to maxFrameNumber. If no such frame is available

// (such as when a buffer has been replaced but the consumer has not received the

// onFrameReplaced callback), then PRESENT_LATER will be returned.

//

// Return of NO_ERROR means the operation completed as normal.

//

// Return of a positive value means the operation could not be completed at this time, but the

// user should try again later:

// * NO_BUFFER_AVAILABLE - no buffer is pending (nothing queued by producer)

// * PRESENT_LATER - the buffer's timestamp is farther in the future

//

// Return of a negative value means an error has occurred:

// * INVALID_OPERATION - too many buffers have been acquired// Returned by releaseBuffer, after which the consumer must free any references to the

// just-released buffer that it might have.

STALE_BUFFER_SLOT = 1,

// Returned by dequeueBuffer if there are no pending buffers available.

NO_BUFFER_AVAILABLE,

// Returned by dequeueBuffer if it's too early for the buffer to be acquired.

PRESENT_LATER,

(5)mslots 与mframe 以及mframenumber 的区别

(6)onframavailable 和latchbuffer ,reject,updateteximage,的逻辑。

其中updateteximage;

(7)bufferitem 与mslots的区别

(8)bufferqueueconsumer 与bufferitemconsumer区别;

(9)acquirebuffer的fence 逻辑,fencefd是哪来的;

fence 相关接口定义参见ui/Fence.hstatus_t Fence::waitForever(const char* logname) {64 ATRACE_CALL();

if (mFenceFd == -1) {

return NO_ERROR;

}

int warningTimeout = 3000;

int err = sync_wait(mFenceFd, warningTimeout);

if (err < 0 && errno == ETIME) {

ALOGE("%s: fence %d didn't signal in %u ms", logname, mFenceFd,

warningTimeout);

err = sync_wait(mFenceFd, TIMEOUT_NEVER);

}

return err < 0 ? -errno : status_t(NO_ERROR);

}struct EglSlot {

EglSlot() : mEglFence(EGL_NO_SYNC_KHR) {}

// mEglImage is the EGLImage created from mGraphicBuffer.

sp mEglImage;

// mFence is the EGL sync object that must signal before the buffer

// associated with this buffer slot may be dequeued. It is initialized

// to EGL_NO_SYNC_KHR when the buffer is created and (optionally, based

// on a compile-time option) set to a new sync object in updateTexImage.

EGLSyncKHR mEglFence;

};

(10)updateAndReleaseLocked(item, &mPendingRelease),updateAndReleaseLocked(item),bindTextureImageLocked()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/528845.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

keil流水灯c语言程序两个一起亮,我用keil c51编了一个流水灯程序,编译无误却只有第一和第二个灯亮了,最后停在第一个灯处不动...

满意答案zJ张俭2014.02.09采纳率&#xff1a;43% 等级&#xff1a;12已帮助&#xff1a;10469人你有几个错误:1 你的定时器没有重装,导致第一次中断和后面的中断时间不一样,第一次时间短,后面的时间一直是以65536个周期中断的.2 你在中断函数里用了 for 循环,for循环是一下子…

pyquery获取不到网页完整源代码_python动态网页爬取:爬取pexel上的图片

前言同样的&#xff0c;我们在写一个爬虫前要明确自己想要爬取的东西是什么&#xff0c;明确下载目标数据在浏览器的操作如何对于动态网页的爬取&#xff0c;在网页地址不变的情况下&#xff0c;我们首先要明确如何获取AJAX请求首先我们看看这个网站pexel打开页面后再Chrome浏览…

c语言或命题,求一个“输入一条命题公式(与或非条件,最好有双条件的)求真值表的程序”...

回复 2楼 hahayezhe我晕&#xff0c;现在就是让你帮忙&#xff0c;把一个表都输出来的系统啊。让你做一个系统啊大哥。参考以下程序&#xff1a;#include #include #define MAXNUM 100 //栈最大元素个数#define MAXEXP 30 //允许用户输入的表达式…

python进阶与数据操控_零基础机器学习Python进阶:Python操作MySql

阅读文本大概需要 6 分钟前言基础写了十篇&#xff0c;以后会继续更&#xff0c;这是第二篇进阶&#xff0c;文末会放上链接&#xff0c;进阶分成另一个系列&#xff0c;柠檬有时间会整理好菜单栏让大家更方便的阅读基础和进阶&#xff0c;柠檬会把自己在当时做的项目写到进阶里…

c语言每条代码的含义,为我解释一下,代码的意思。谢谢了。

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼#include #include #define LEN sizeof(struct student)struct student{long num;intscore;struct student *next;};struct student lista,listb;int n,sum0;int main(){struct student *creat(void);struct student *insert(struc…

ios时间相差多少天_iOS 计算某个时间到现在是多少月/天/时

直接上代码&#xff0c;传入一个NSString类型的日期格式如newsDate "2013-08-09 17:01";或者newsDate "2013/08/09 17:01";返回如果有一个月&#xff0c;就不返回天&#xff0c;依次类推。-(NSString *)getUTCFormateDate:(NSString *)newsDate{// newsD…

calender获取日期前几月_java获取当前时间和前一天日期(实现代码)

String basePath request.getScheme()"://"request.getServerName()":"request.getServerPort()path"/";Date dNow new Date(); //当前时间Date dBefore new Date();Calendar calendar Calendar.getInstance(); //得到日历calendar.setTim…

二级c语言题型分数,计算机二级C语言题型和评分标准

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼全国计算机二级考试大题把题目给定程序删除了&#xff0c;正确运行&#xff0c;这样会不会给分&#xff1f;50、请编写函数fun, 函数的功能是: 将M行N列的二维数组中的数据, 按列的顺序依次放到一维数组中。函数fun中给出的语句仅供…

python矩阵乘法菜鸟_Python中的几种矩阵乘法(转)

一. np.dot()1.同线性代数中矩阵乘法的定义。np.dot(A, B)表示&#xff1a;对二维矩阵&#xff0c;计算真正意义上的矩阵乘积。对于一维矩阵&#xff0c;计算两者的内积。2.代码【code】import numpy as np# 2-D array: 2 x 3two_dim_matrix_one np.array([[1, 2, 3], [4, 5,…

W ndows找不到explorer,windows找不到explorer.exe的处理教程

很多网友入手windows过程里找不到explorer.exe&#xff0c;很是烦恼&#xff0c;为了帮助大家排忧解难&#xff0c;这里小编就分享了windows找不到explorer.exe的处理教程&#xff0c;希望可以帮助到大家。windows找不到explorer.exe的处理教程1、按winr打开运行窗口&#xff0…

vue2实践揭秘pdf_《Vue2实践揭秘》源码

todos 组件源码&#xff1a;{{title}}keyup.13"addItem"placeholder"快写下您要我记住的事吧"autofocus"true"/>{{index1}}.{{todo.value}}{{todo.created|date}}import ./assets/todos.lessimport moment from momentimport moment/locale/z…

c语言设计四路彩灯显示系统,四路彩灯控制器设计方案.doc

四路彩灯控制器设计方案1 前言1.1序言随着经济的发展&#xff0c;城市之间的灯光系统花样越来越多&#xff0c;用中规模集成电路设计并制作一个四路彩灯显示系统&#xff0c;可用于节日庆典&#xff0c;医院病房等多处地方&#xff0c;同用单片机控制相比&#xff0c;它具有准确…

python django restful框架_Django RESTful API 实例带你快速上手开发

1. Django 是什么Django 是基于 Python 的一个 Web 开发框架&#xff0c;一般和 Flask Tornado 被称为 Python Web 三大框架&#xff0c;Django 是其中最成熟、稳定、完善的。非常适合企业级应用。Django 是一个基于 MVC 架构的框架&#xff0c;但在 Django 中是模型(Model)、模…

c语言 复杂指针声明,C指针复杂声明

对于这种复杂的声明格式&#xff0c;可以采用替换的形式来看明白。比如char (*(*x())[])();这个&#xff0c; 你可以找个 a代替括号里面的&#xff0c;然后逐步代替。char (*(*x())[])();// 用a 代替 (*x())[]char (*a)();// 上面的a的意思就是一个函数指针&#xff0c;空参&am…

echarts地图api series_echarts学习(4)——地图实现

本文记录两点&#xff1a;1.地图实现&#xff1b;2.各省份地图数据。地图实现都开始做地图了&#xff0c;echarts怎么也有点了解了吧&#xff0c;所以前两句初始化就不多说了&#xff0c;不清楚的可以翻翻我以前的随笔。代码&#xff1a;var china document.getElementById(&q…

android如何阻塞主线程,Android-Android如何避免阻塞主线程

Android的Handler和AsyncTask&#xff0c;可以避免阻塞主线程(UI线程)&#xff0c;且UI的更新只能在主线程中完成&#xff0c;因此异步处理是不可避免的。AsyncTask&#xff0c;它使创建需要与用户界面交互的长时间运行的任务变得更简单。不需要借助线程和Handler即可实现。获取…

易源数据_易源接口-互联网API入口

提交网址推广网站请加QQ群159729064昆明秀派科技有限公司在2015年成立&#xff0c;以领先的API数据服务及系列产品为用户提供基于大数据的API服务&#xff0c;帮助用户快速获得API数据&#xff0c;解决API数据买卖双方缺乏交易场所、技术标准、财务流程、第三方担保、运营维护、…

极光推送 android 最新,Android——快速集成极光推送-Go语言中文社区

集成极光推送1&#xff0c;首先肯定是注册&#xff0c;添加应用2&#xff0c;开始自动集成比手动集成简单第一步 在 build.gradledefaultConfig {multiDexEnabledtrueapplicationId rootProject.ext.cfg.applicationIdminSdkVersionrootProject.ext.cfg.minSdkVersiontargetSdk…

raft2020年更新_ECCV2020最佳论文解读之递归全对场变换(RAFT)光流计算模型

计算机视觉三大国际顶级会议之一的 ECCV 2020 已经召开。今年 ECCV 共收到有效投稿 5025 篇&#xff0c;是 ECCV 2018 论文投稿数量的二倍还要多&#xff0c;接收论文1361 篇&#xff0c;接收率为 27%&#xff0c;相比上届会议下降了约 5%。在接收论文中&#xff0c;oral论文数…

android从服务检查,android开发分享Android:你如何检查是否启用了特定的AccessibilityService...

我最后自己做了这个&#xff1a;public boolean isAccessibilityEnabled(){ int accessibilityEnabled 0; final String LIGHTFLOW_ACCESSIBILITY_SERVICE "com.example.test/com.example.text.ccessibilityService"; boolean accessibilityFound false; try { ac…