本文主要为大家分享一篇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()

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

  1. layer 同步调用_YYText源码解读-YYText同步/异步渲染流程(一)—UIView与CALayer

    一.CALayer官方文档 Layers are often used to provide the backing store for views but can also be used with ...

  2. sql 不同数据库同步数据_什么是SQL数据同步

    sql 不同数据库同步数据 SQL Data Sync is a service that allows synchronizing data across multiple Azure SQL da ...

  3. 虚拟同步发电机_学术简报︱基于虚拟同步发电机控制的T型三电平并网逆变器研究...

    南京工程学院电力工程学院.南京工程学院自动化学院的研究人员朱爱华.赵涛.徐宏健.季宁一,在2019年第11期<电气技术>杂志上撰文指出,微电网作为可再生能源接入电网的有效途径越来越受到人们 ...

  4. onclick判断组件调用_从子组件Onclick更新状态

    onclick判断组件调用 How to update the state of a parent component from a child component is one of the mos ...

  5. photon四种同步方式_【Linux】多线程同步的四种方式

    背景问题:在特定的应用场景下,多线程不进行同步会造成什么问题? 通过多线程模拟多窗口售票为例: #include #include#include#include#include#include us ...

  6. 同步数据_体验GoldenGate 18C数据同步到ADW

    ADW的厉害,我们之前的文章都已经说过很多了,Oracle最新发布的GoldenGate 18C可以把本地或是云端数据库的数据变化实时同步到ADW中.前段时间一直在研究这个课题,但是一直不成功,猜想过 ...

  7. es mysql 同步插件_[es和数据库怎么同步]mysql与elasticsearch实时同步常用插件及优缺点对比(ES与关系型数据库同步)...

    目前mysql与elasticsearch常用的同步机制大多是基于插件实现的,常用的插件包括:elasticsearch-jdbc,elasticsearch-river-MySQL,go-mysql ...

  8. mysql主从数据库同步问题_聊聊MySQL主从数据库同步的那些事儿

    在linux服务器下测试:主(master)服务器IP:219.223.5.105(对应内网IP:192.168.1.75)从(slave)服务器IP:219.223.5.104(对应内网IP:192 ...

  9. mysql 主从同步 阻塞_如何解决主从数据库同步延迟问题?

    题主说的方案感觉非常不靠谱. 不过mysql-proxy本人也几乎没怎么接触,它能否实现上诉功能有些不大确定,即使它有,也不建议为了这个就用它,官网自己都不推荐用到生产环境. 针对主从延迟,本人的经验 ...

最新文章

  1. 解决Bootstrap中代码不高亮问题
  2. JAVA 多用户商城系统b2b2c-服务容错保护(Hystrix依赖隔离)
  3. Spring AOP详解(http://sishuok.com/forum/posts/list/281.html)
  4. 连接数据库是显示无法连接到服务器,如何解决出现无法与数据库服务器建立连接的方法...
  5. uploadify插件的使用
  6. linux中流设备_[快速上手Linux设备驱动]之块设备驱动流程详解一
  7. python爬虫ppt_完全零基础 轻松学Python:数据类型:数字类型、空类型、布尔类型...
  8. python中去掉外部引号的函数是_在Python中删除String中的引号
  9. 瀑布流布局的实现方式
  10. 选项卡jacascript
  11. 《C++面向对象高效编程(第2版)》——4.5 对象复制的语义
  12. 【Windows】操作系统原理
  13. 《Using OpenRefine》翻译~1
  14. Fluke DSX2-5000 CH线缆测试仪技术标书
  15. 自考行政管理计算机应用基础好考吗,通过自考《计算机应用基础》之经验谈
  16. 带你玩转kubernetes-k8s(第54篇-Kubernetes之使用API聚合机制扩展API资源)
  17. 亚特兰提斯之人鱼宝宝
  18. SpringBoot返回值封装
  19. 用matlab画一些骚东西,求助matlab大神,学校的课程安排太骚了,我们压根就不用学matlab...
  20. 【读书笔记】《红玫瑰与白玫瑰》

热门文章

  1. 新型数据中心需要什么样的存储
  2. ​谁是信创担当 《2021中国信创生态市场研究报告》今日正式发布
  3. 如何成功构建大规模 Web 搜索引擎架构?
  4. 重磅!AWS任命张文翊女士为全球副总裁及大中华区执行董事!
  5. 纯粹,极致!他用两个词阐释了UCloud
  6. 西门子和阿里云要搞啥事情?| 极客头条
  7. 上周五,小编参加了一场高大上的“9”会
  8. redis rdb aof区别_Redis(三):持久化RDB,fork.copyonwrite,AOF,RDBamp;AOF混合使用
  9. 曲师大教务系统服务器,曲师大教务处信息门户入口地址
  10. ssh是什么_【科普】SSH都不懂,还搞什么网络