最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501
当前位置: 首页 - 科技 - 知识百科 - 正文

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

来源:懂视网 责编:小OO 时间:2020-11-27 19:58:10
文档

关于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);
推荐度:
导读问题。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);

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

 status_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<EglImage> 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()

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文档

关于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);
推荐度:
标签: gpu 问题 以及
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top