日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2024/9/27 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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()

總結

以上是生活随笔為你收集整理的layer 同步调用_关于Layer组件的同步以及减少GPU带宽的问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。