bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

Graphic學習筆記-創新互聯

發現一個比較好的介紹graphic帖子, 后面會跟著帖子來梳理下graphic相關知識點
http://blog.csdn.net/u014409795/article/details/51276468

創新互聯公司是一家專業提供青秀企業網站建設,專注與成都網站設計、成都做網站、H5技術、小程序制作等業務。10年已為青秀眾多企業、政府機構等服務。創新互聯專業的建站公司優惠進行中。
  1. BufferQueue

      class BufferQueue {
             class ProxyConsumerListener : public BnConsumerListener;
             static void createBufferQueue(sp<IGraphicBufferProducer>* outProducer,
                       sp<IGraphicBufferConsumer>* outConsumer,
                        const sp<IGraphicBufferAlloc>& allocator = NULL);
        private:
            BufferQueue(); // Create through createBufferQueue

    }

    //看起來只有consumer一個角色?

   void BufferQueue::createBufferQueue(sp<IGraphicBufferProducer>* outProducer,
       sp<IGraphicBufferConsumer>* outConsumer,
       const sp<IGraphicBufferAlloc>& allocator) {

       sp<BufferQueueCore> core(new BufferQueueCore(allocator));
       sp<IGraphicBufferProducer> producer(new BufferQueueProducer(core));

       sp<IGraphicBufferConsumer> consumer(new BufferQueueConsumer(core));

 BufferQueue核心是BufferQueueCore,

  看BufferQueueCore里面是管理什么的

 class BufferQueueCore : public virtual RefBase {

          friend class BufferQueueProducer;
          friend class BufferQueueConsumer;

          typedef Vector<BufferItem> Fifo; //一個BufferItem Vector

        private:

        // mAllocator is the connection to SurfaceFlinger that is used to allocate
        // new GraphicBuffer objects.
       sp<IGraphicBufferAlloc> mAllocator;
        // mSlots is an array of buffer slots that must be mirrored on the producer
       // side. This allows buffer ownership to be transferred between the producer
       // and consumer without sending a GraphicBuffer over Binder. The entire
      // array is initialized to NULL at construction time, and buffers are
      // allocated for a slot when requestBuffer is called with that slot's index.
       BufferQueueDefs::SlotsType mSlots;  //

       BufferSlot()
   : mEglDisplay(EGL_NO_DISPLAY),
     mBufferState(BufferSlot::FREE),   //state
     mRequestBufferCalled(false),
     mFrameNumber(0),
     mEglFence(EGL_NO_SYNC_KHR),
     mAcquireCalled(false),
     mNeedsCleanupOnRelease(false),
     mAttachedByConsumer(false) {
   }

   // mGraphicBuffer points to the buffer allocated for this slot or is NULL
   // if no buffer has been allocated.
   sp<GraphicBuffer> mGraphicBuffer;  //bufferslot中指向GraphicBuffer

   enum BufferState { // state 表示buffer state

    FREE = 0,  //FREE indicates that the buffer is available to be dequeued by the producer.
     // 允許produce獲取該buffer,填充數據,狀態變為dequeue   free 時表示該buffer還被bufferqueue 所有

  DEQUEUED = 1,// DEQUEUED indicates that the buffer has been dequeued by the  producer, but has not yet been queued or canceled. The slot is "owned" by the producer. 處于待填充數據狀態,被producer所有

 QUEUED = 2,//QUEUED indicates that the buffer has been filled by the producer and queued for use by the consumer; producer填充完數據,準備提供給consumer消費,被bufferqueue所有

  ACQUIRED = 3//ACQUIRED indicates that the buffer has been acquired by the  consumer.

  buffer被consumer獲取到,消費完后轉為free

  在bufferqueuecore中bufferItem又是什么
  class BufferItem : public Flattenable<BufferItem> {

  // mGraphicBuffer points to the buffer allocated for this slot, or is NULL
   // if the buffer in this slot has been acquired in the past (see
   // BufferSlot.mAcquireCalled).
   sp<GraphicBuffer> mGraphicBuffer; //也有GraphicBuffer指針

    union {
       // mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT).
       int mSlot; // slot數組中索引

       // mBuf is the former name for mSlot
       int mBuf; // 舊名字
   };

  BufferSlot 與 BufferItem 都指向GraphicBuffer,然后又 通過mSlot下標關聯起來,至于兩者使用場景再看

另外有需要云服務器可以了解下創新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

分享標題:Graphic學習筆記-創新互聯
分享鏈接:http://vcdvsql.cn/article0/ccidoo.html

成都網站建設公司_創新互聯,為您提供網站維護網站內鏈搜索引擎優化企業建站App設計商城網站

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

網站優化排名