最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題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關(guān)鍵字專題關(guān)鍵字專題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
當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

關(guān)于Layer組件的同步以及減少GPU帶寬的問題

來源:懂視網(wǎng) 責(zé)編:小OO 時間:2020-11-27 19:58:10
文檔

關(guān)于Layer組件的同步以及減少GPU帶寬的問題

問題。1) Layer 之間能否進行單獨更新,比如其中video 層上面彈出的狀態(tài)欄場景如何優(yōu)化。初步構(gòu)想每次僅更新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);
推薦度:
導(dǎo)讀問題。1) Layer 之間能否進行單獨更新,比如其中video 層上面彈出的狀態(tài)欄場景如何優(yōu)化。初步構(gòu)想每次僅更新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關(guān)于Layer組件的同步以及減少GPU帶寬的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧。

問題:

1) Layer 之間能否進行單獨更新,比如其中video 層上面彈出的狀態(tài)欄場景如何優(yōu)化;

初步構(gòu)想每次僅更新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 的區(qū)別

(6)onframavailable 和latchbuffer ,reject,updateteximage,的邏輯。

其中updateteximage;

(7)bufferitem 與mslots的區(qū)別

(8)bufferqueueconsumer 與bufferitemconsumer區(qū)別;

(9)acquirebuffer的fence 邏輯,fencefd是哪來的;

fence 相關(guān)接口定義參見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()

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

關(guān)于Layer組件的同步以及減少GPU帶寬的問題

問題。1) Layer 之間能否進行單獨更新,比如其中video 層上面彈出的狀態(tài)欄場景如何優(yōu)化。初步構(gòu)想每次僅更新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);
推薦度:
標(biāo)簽: gpu 問題 以及
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top