欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Graphic學(xué)習(xí)筆記

發(fā)現(xiàn)一個(gè)比較好的介紹graphic帖子, 后面會(huì)跟著帖子來(lái)梳理下graphic相關(guān)知識(shí)點(diǎn)
http://blog.csdn.net/u014409795/article/details/51276468

目前創(chuàng)新互聯(lián)已為千余家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)頁(yè)空間、綿陽(yáng)服務(wù)器托管、企業(yè)網(wǎng)站設(shè)計(jì)、昔陽(yáng)網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶(hù)導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶(hù)和合作伙伴齊心協(xié)力一起成長(zhǎng),共同發(fā)展。

  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

     }

     //看起來(lái)只有consumer一個(gè)角色?

    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;  //一個(gè)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,填充數(shù)據(jù),狀態(tài)變?yōu)閐equeue    free 時(shí)表示該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.  處于待填充數(shù)據(jù)狀態(tài),被producer所有

  QUEUED = 2,//QUEUED indicates that the buffer has been filled by the producer and queued for use by the consumer; producer填充完數(shù)據(jù),準(zhǔn)備提供給consumer消費(fèi),被bufferqueue所有

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

   buffer被consumer獲取到,消費(fèi)完后轉(zhuǎn)為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數(shù)組中索引

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

   

   BufferSlot 與 BufferItem 都指向GraphicBuffer,然后又 通過(guò)mSlot下標(biāo)關(guān)聯(lián)起來(lái),至于兩者使用場(chǎng)景再看
 

本文標(biāo)題:Graphic學(xué)習(xí)筆記
當(dāng)前URL:http://aaarwkj.com/article42/peiphc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計(jì)響應(yīng)式網(wǎng)站、關(guān)鍵詞優(yōu)化定制開(kāi)發(fā)、建站公司、網(wǎng)站改版

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司
国产精品黄色片在线观看| 国产三级在线视频不卡| 亚洲丰满毛茸茸毛茸茸| 午夜性生活免费在线观看| 国内揄拍国内精品对久久| 性生活免费在线观看视频| 日本亚洲美丽少妇天堂| 午夜视频在线观看黄片| 国产老太婆精品久久久久| 成熟人妻中文字幕在线看| 日韩精品一区二区三区av在线| 国产亚洲精品久久综合阿香| 欧美一区二区三区情色| 日本精品av一区二区| 精品人妻人伦一区二区三区| 国产亚洲高清一区二区| 国产探花猛操性感美女| 亚洲精品国产av一区二区三区| 亚洲理论在线观看电影| 久久精品国产亚洲夜色av网站| 免费无遮挡午夜视频网站| 中文字幕一区侵犯人妻| 91精品国产在线观看| 91香蕉国产精品日韩| 国产剧情av网址观看免费| 欧美激情网页一区三区| 欧美激情片免费在线观看| av天堂网站在线观看| 亚洲精品综合在线二区| 国产一区二区三区在线观看俏佳人 | 国产精品一区在线免费看| 日本午夜免费在线视频| 最新日本免费久久精品| 亚洲福利一区二区在线| 中国女人内射69xx| 日本不卡免费一区二区视频| 日韩三级在线观看av| 国产日韩欧美 一区二区三区| 国产我和子的乱视频亲生| 亚洲中文字幕av每天更新| 少妇一夜一次一区二区|