1. 02 Feb, 2016 1 commit
    • Pablo Ceballos's avatar
      BQ: Improved buffer/slot tracking · 23b4abe0
      Pablo Ceballos authored
      - Explicitly track active buffers and unused slots on top of the
        already existing tracking for free slots and free buffers.
      
      Change-Id: Ife2678678e96f0eb0b3fb21571058378134bd868
      23b4abe0
  2. 05 Jan, 2016 1 commit
    • Dan Stoza's avatar
      libgui: Add dequeue/attach timeout · 127fc63e
      Dan Stoza authored
      Adds the ability to specify the timeout when dequeueBuffer or
      attachBuffer block due to the lack of a free buffer/slot. By default,
      these will block indefinitely (which is signified by a timeout of -1).
      
      When a timeout (other than -1) is specified, non-blocking mode is
      disabled and the given timeout will be used instead.
      
      Bug: 25196773
      Change-Id: I17fdbeebccb7c8d878703d758ac1209608258e61
      127fc63e
  3. 03 Nov, 2015 1 commit
    • Pablo Ceballos's avatar
      BQ: Add support for single buffer mode · ccdfd60d
      Pablo Ceballos authored
      - Adds a single buffer mode to BufferQueue. In this mode designate the
        first dequeued buffer as the shared buffer. All calls to dequeue()
        and acquire() will then return the shared buffer, allowing the
        producer and consumer to share it.
      - Modify the buffer slot state tracking. Add a new SHARED state for
        the shared buffer in single buffer mode. Also track how many times
        a buffer has been dequeued/queued/acquired as it's possible for a
        shared buffer to be both dequeued and acquired at the same time, or
        dequeued/acquired multiple times. This tracking is needed to know
        when to drop the buffer out of the SHARED state after single buffer
        mode has been disabled.
      - Add plumbing for enabling/disabling single buffer mode from Surface.
      
      Bug 24940410
      
      Change-Id: I3fc550c74bacb5523c049a227111356257386853
      ccdfd60d
  4. 29 Oct, 2015 1 commit
    • Dan Stoza's avatar
      Support SurfaceView synchronization. · 7dde599b
      Dan Stoza authored
      Add API for fetching the next frame number to be produced by
      a given buffer producer. Add an API to SurfaceComposer to 
      defer execution of the current transaction until a given frame number. 
      Together these may be used to synchronize app drawing and surface 
      control updates.
      
      Change-Id: I8e0f4993332ac0199c768c88581a453fefbaff1d
      7dde599b
  5. 06 Oct, 2015 1 commit
    • Pablo Ceballos's avatar
      BQ: fix Volantis test failures · b687a281
      Pablo Ceballos authored
      The Volantis driver will dequeue a buffer in eglCreateWindowSurface.
      
      - Remove the requirement that no buffers be dequeued when calling
        setAsyncMode() on a BufferQueueProducer, since this gets called
        from eglSwapInterval.
      - Modify the tests to call setMaxDequeuedBufferCount before calling
        eglCreateWindowSurface.
      
      Change-Id: Icc64e9933f151771bbd57035549cd5928c0b7216
      b687a281
  6. 24 Sep, 2015 1 commit
    • Pablo Ceballos's avatar
      BQ: get rid of async in producer interface · 567dbbb6
      Pablo Ceballos authored
      - Get rid of the async flag in dequeueBuffer, allocateBuffers,
        waitForFreeSlotThenRelock, and QueueBufferInput.
      - Instead use the persistent flags mDequeueBufferCannotBlock and
        mAsyncMode to determine whether to use the async behavior.
      
      Bug 13174928
      
      Change-Id: Ie6f7b9e46ee3844ee77b102003c84dddf1bcafdd
      567dbbb6
  7. 18 Sep, 2015 1 commit
  8. 03 Sep, 2015 1 commit
    • Pablo Ceballos's avatar
      BQ: Modify consumer buffer count interfaces · 19e3e06e
      Pablo Ceballos authored
      - Rename setDefaultMaxBufferCount() to setMaxBufferCount(). Modify it
        to be hard maximum on the number of buffers that can't be overwritten
        by the producer.
      - Enforce the maximum buffer count in setMaxAcquiredBufferCount(),
        setMaxDequeuedBufferCount(), and setAsyncMode().
      - Remove mOverrideMaxBufferCount as it's no longer needed since
        overriding is no longer possible.
      - Expose setMaxAcquiredBufferCount() in GLConsumer.
      - Remove disableAsyncBuffer(), it was only being used for single buffer
        mode. Single buffer mode is now achievable with setMaxBufferCount().
      
      Bug 13174928
      
      Change-Id: Ia33799f42751272a711fbd8559f7602ce9f18e4f
      19e3e06e
  9. 25 Aug, 2015 2 commits
    • Pablo Ceballos's avatar
      BQ: Get rid of setBufferCount · e5b755a0
      Pablo Ceballos authored
      - Remove setBufferCount from BufferQueueProducer and
        IGraphicsBufferQueueProducer.
      - Get rid of the unit tests for it.
      - In Surface, convert setBufferCount calls into calls to
        setMaxDequeuedBufferCount.
      - Change mOverrideMaxBufferCount to a boolean since it can now be
        derived from mMaxAcquiredBufferCount, mMaxDequeuedBufferCount, and
        mAsyncMode.
      
      Bug 13174928
      
      Change-Id: Ia0adc737fae9e13f186df832b8428a0829041bf9
      e5b755a0
    • Pablo Ceballos's avatar
      BQ: add setMaxDequeuedBufferCount · fa455354
      Pablo Ceballos authored
      Adds the new setMaxDequeuedBufferCount() function to
      BufferQueueProducer. This will eventually replace setBufferCount.
      
      Also add setAsyncMode.
      
      Bug 13174928
      
      Change-Id: Iea1adcd5d74a75f67d8e9dde06d521695628ad5a
      fa455354
  10. 09 Jun, 2015 1 commit
    • Dan Stoza's avatar
      libgui/SurfaceFlinger: Add getConsumerName · 53a2e97a
      Dan Stoza authored
      Adds a getConsumerName method to IGraphicBufferProducer and Surface.
      Currently, the name is cached inside of IGBP and is update on connect
      and dequeueBuffer, which should be good enough for most uses.
      
      Bug: 6667401
      Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915
      (cherry picked from commit c6f30bde)
      53a2e97a
  11. 08 Jun, 2015 3 commits
    • Dan Stoza's avatar
      libgui: Add generation numbers to BufferQueue · 993772a6
      Dan Stoza authored
      This change allows producers to set a generation number on a
      BufferQueue. This number will be embedded in any new GraphicBuffers
      created in that BufferQueue, and attempts to attach buffers which have
      a different generation number will fail.
      
      It also plumbs the setGenerationNumber method through Surface, with the
      additional effect that any buffers attached to the Surface after
      setting a new generation number will automatically be updated with the
      new number (as opposed to failing, as would happen on through IGBP).
      
      Bug: 20923096
      Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2
      (cherry picked from commit 812ed064)
      993772a6
    • Dan Stoza's avatar
      libgui/SurfaceFlinger: Add getConsumerName · c6f30bde
      Dan Stoza authored
      Adds a getConsumerName method to IGraphicBufferProducer and Surface.
      Currently, the name is cached inside of IGBP and is update on connect
      and dequeueBuffer, which should be good enough for most uses.
      
      Bug: 6667401
      Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915
      c6f30bde
    • Dan Stoza's avatar
      Revert "libgui: Add getConsumerName" · a2ca9bf0
      Dan Stoza authored
      This reverts commit 107fbe55.
      
      Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
      a2ca9bf0
  12. 05 Jun, 2015 1 commit
    • Dan Stoza's avatar
      libgui: Add getConsumerName · 107fbe55
      Dan Stoza authored
      Adds a getConsumerName method to IGraphicBufferProducer and Surface.
      Currently, the name is cached inside of IGBP and is updated on connect
      and dequeueBuffer, which should be good enough for most uses.
      
      Bug: 6667401
      Change-Id: Ife94bd89023fe7c00bad916932b9a19233fd2290
      107fbe55
  13. 03 Jun, 2015 1 commit
    • Dan Stoza's avatar
      libgui: Add generation numbers to BufferQueue · 812ed064
      Dan Stoza authored
      This change allows producers to set a generation number on a
      BufferQueue. This number will be embedded in any new GraphicBuffers
      created in that BufferQueue, and attempts to attach buffers which have
      a different generation number will fail.
      
      It also plumbs the setGenerationNumber method through Surface, with the
      additional effect that any buffers attached to the Surface after
      setting a new generation number will automatically be updated with the
      new number (as opposed to failing, as would happen on through IGBP).
      
      Bug: 20923096
      Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2
      812ed064
  14. 23 Apr, 2015 1 commit
    • Dan Stoza's avatar
      libgui: Allow an IGBProducer to disable allocation · 9de7293b
      Dan Stoza authored
      Adds a new method IGBP::allowAllocation, which controls whether
      dequeueBuffer is permitted to allocate a new buffer. If allocation is
      disallowed, dequeueBuffer will block or return an error as it
      normally would (as controlled by *ControlledByApp).
      
      If there are free buffers, but they are not of the correct dimensions,
      format, or usage, they may be freed if a more suitable buffer is not
      found first.
      
      Bug: 19801715
      Change-Id: I0d604958b78b2fd775c2547690301423f9a52165
      9de7293b
  15. 15 Apr, 2015 1 commit
    • Dan Stoza's avatar
      libgui: Pass surface damage through BufferQueue · 5065a552
      Dan Stoza authored
      This change adds support for passing surface damage all of the way
      down from the EGL interface through the consumer side of the
      BufferQueue. Depends on system/core change
      Ie645e6a52b37b5c1b3be19481e8348570d1aa62c
      
      Bug: 11239309
      Change-Id: I4457ea826e9ade4ec187f973851d855b7b93a31b
      5065a552
  16. 07 Apr, 2015 1 commit
  17. 06 Apr, 2015 1 commit
  18. 24 Mar, 2015 1 commit
    • Eino-Ville Talvala's avatar
      Add dataSpace to buffer queues; remove old format enums. · 63e8376d
      Eino-Ville Talvala authored
      - Wire up new dataSpace parameter through buffer queue stack
      - Update tests to include the parameter
      - Switch eglApi to using dataSpace to indicate sRGB gamma/linear
        difference
      - Remove RAW_SENSOR in favor of RAW16
      - Remove use of sRGB format enums
      - Add default dataspace to buffer queue core
      - Add query for default dataspace
      
      Change-Id: I070bd2e7c56506055c419004c29e2e3feac725df
      63e8376d
  19. 19 Mar, 2015 1 commit
    • Eino-Ville Talvala's avatar
      DO NOT MERGE Add dataSpace to buffer queues; remove old format enums. · 82c6bcc9
      Eino-Ville Talvala authored
      - Wire up new dataSpace parameter through buffer queue stack
      - Update tests to include the parameter
      - Switch eglApi to using dataSpace to indicate sRGB gamma/linear
        difference
      - Remove RAW_SENSOR in favor of RAW16
      - Remove use of sRGB format enums
      - Add default dataspace to buffer queue core
      - Add query for default dataspace
      
      Cherry pick of I070bd2e7c56506055c419004c29e2e3feac725df
      
      Change-Id: I461952389c18051176c6b75e664f20ad369f5760
      82c6bcc9
  20. 18 Mar, 2015 1 commit
    • Dan Stoza's avatar
      libgui: Enable -Weverything and -Werror · 3be1c6b6
      Dan Stoza authored
      Enables -Weverything and -Werror, with just a few exceptions for
      warnings we can't (or shouldn't need to) work around.
      
      Cherry pick of I034abec27bf4020d84af60d7acc1939c59986dd6 plus a
      couple of minor changes to CpuConsumer.cpp to make it work with a
      prior change:
          Uncomment CC_LOGV on line 46
          Change C-style cast to static_cast on line 71
      
      Change-Id: Iaec610477ea0122317b0578fb74caf2383d4cf08
      3be1c6b6
  21. 04 Mar, 2015 1 commit
    • Eino-Ville Talvala's avatar
      Add dataSpace to buffer queues; remove old format enums. · 5b75a513
      Eino-Ville Talvala authored
      - Wire up new dataSpace parameter through buffer queue stack
      - Update tests to include the parameter
      - Switch eglApi to using dataSpace to indicate sRGB gamma/linear
        difference
      - Remove RAW_SENSOR in favor of RAW16
      - Remove use of sRGB format enums
      - Add default dataspace to buffer queue core
      - Add query for default dataspace
      
      Change-Id: I070bd2e7c56506055c419004c29e2e3feac725df
      5b75a513
  22. 05 Dec, 2014 2 commits
    • Dan Stoza's avatar
      libgui: Enable -Weverything and -Werror · dd883c0b
      Dan Stoza authored
      Enables -Weverything and -Werror, with just a few exceptions for
      warnings we can't (or shouldn't need to) work around.
      
      This is a squashed commit based on an initial change with a couple of
      fixes to avoid breaking certain targets. The source commits are:
        d723bd76
        00d504c0
        429ba89c
      
      Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
      dd883c0b
    • Dan Stoza's avatar
      libgui: Enable -Weverything and -Werror · d723bd76
      Dan Stoza authored
      Enables -Weverything and -Werror, with just a few exceptions for
      warnings we can't (or shouldn't need to) work around.
      
      Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
      d723bd76
  23. 14 Jul, 2014 1 commit
    • Ruben Brunk's avatar
      Add sticky transform to surfaceflinger. · 1681d959
      Ruben Brunk authored
      Bug: 15116722
      
      - Adds a sticky transform field that can be set from a
        SurfaceFlinger client Surface.  This transform is
        added to any transform applied to the Surface.
      
      Change-Id: Idaa4311dfd027b2d2b8ea5e2c6cba2da5779d753
      1681d959
  24. 20 Jun, 2014 1 commit
    • Dan Stoza's avatar
      BufferQueue: Add allocateBuffers method · 29a3e908
      Dan Stoza authored
      This adds an allocateBuffers method to BufferQueue, which instructs
      it to allocate up to the maximum number of buffers allowed by the
      current configuration. The goal is that this method can be called
      ahead of render time, which will prevent dequeueBuffers from blocking
      in allocation and inducing jank.
      
      This interface is also plumbed up to the native Surface (and, in
      another change, up to the Java Surface and ThreadedRenderer).
      
      Bug: 11792166
      Change-Id: I4aa96b4351ea1c95ed5db228ca3ef98303229c74
      29a3e908
  25. 15 Apr, 2014 1 commit
    • Dan Stoza's avatar
      BufferQueueProducer: add detachNextBuffer · d9822a38
      Dan Stoza authored
      Adds a new method, IGBP::detachNextBuffer, that effectively does
      dequeue + request + detach in a single call, but does not need to
      know anything about the dequeued buffer, and will not block on
      dequeue. This is mostly for the upcoming StreamSplitter to use in
      its onBufferReleased callback.
      
      Change-Id: Ie88a69de109003acebaa486a5b44c8a455726550
      d9822a38
  26. 31 Mar, 2014 1 commit
    • Dan Stoza's avatar
      BufferQueue: Add producer buffer-released callback · f0eaf25e
      Dan Stoza authored
      Add a callback to the producer side, onBufferReleased, which will be
      called every time the consumer releases a buffer back to the
      BufferQueue. This will enable a buffer stream splitter to work
      autonomously without having to block on dequeueBuffer.
      
      The binder object used for the callback replaces the generic IBinder
      token that was passed into IGraphicBufferProducer::connect to detect
      the death of the producer. If a producer does not wish to listen for
      buffer release events, it can pass in an instance of the
      DummyProducerListener class defined in IProducerListener.h, if it even
      cares about death events (BufferQueue doesn't enforce the token being
      non-NULL, though perhaps we should).
      
      Change-Id: I23935760673524abeafea2b58dccc3583b368710
      f0eaf25e
  27. 11 Mar, 2014 1 commit
    • Jesse Hall's avatar
      Add sideband streams to BufferQueue and related classes · 399184a4
      Jesse Hall authored
      Sideband streams are essentially a device-specific buffer queue that
      bypasses the BufferQueue system. They can be used for situations with
      hard real-time requirements like high-quality TV and video playback
      with A/V sync. A handle to the stream is provided by the source HAL,
      and attached to a BufferQueue. The sink HAL can read buffers via the
      stream handle rather than acquiring individual buffers from the
      BufferQueue.
      
      Change-Id: Ib3f262eddfc520f4bbe3d9b91753ed7dd09d3a9b
      399184a4
  28. 10 Mar, 2014 1 commit
    • Dan Stoza's avatar
      BufferQueue: Allow detaching/reattaching buffers · 9f3053de
      Dan Stoza authored
      Adds detachBuffer and attachBuffer calls to both the producer and
      consumer sides of BufferQueue. Buffers may be detached while dequeued
      by the producer or acquired by the consumer, and when attached, enter
      the dequeued and acquired states, respectively.
      
      Bug: 13173343
      Change-Id: Ic152692b0a94d99e0135b9bfa62747dab2a54220
      9f3053de
  29. 21 Nov, 2013 1 commit
  30. 14 Nov, 2013 1 commit
  31. 16 Sep, 2013 1 commit
  32. 16 Aug, 2013 1 commit
    • Andy McFadden's avatar
      Re-enable frame dropping for non-auto timestamps · 3c25621a
      Andy McFadden authored
      This change adds an entire field to note whether the timestamp was
      auto-generated by Surface or supplied by the application.
      
      The value is used when deciding whether or not to drop frames based
      on buffer presentation timestamps.  If a desired presentation time
      was set explicitly, BufferQueue will use that value to decide if a
      frame should be dropped.  If the timestamp was generated by Surface
      at the time the buffer was queued, the timestamp is ignored.
      
      Bug 10151804
      
      Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
      3c25621a
  33. 31 Jul, 2013 1 commit
    • Mathias Agopian's avatar
      Make Flattenable not virtual · e142428a
      Mathias Agopian authored
      Fallout from the Flattenable change, update all its uses.
      
      Additionnaly, fix/tighten size checks when (un)flatten()ing
      things.
      
      Removed the assumption by some flattenables (e.g.: Fence)
      that the size passed to them would be exact (it can
      and will be larger in some cases)
      
      The code in Parcel is a bit complicated so that we don't
      have to expose the full implementation (and also to
      keep the code smallish).
      
      Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
      e142428a
  34. 20 Jul, 2013 1 commit
    • Mathias Agopian's avatar
      Make ANW.setSwapInterval(0) work again · 7cdd786f
      Mathias Agopian authored
      we can now queue/dequeue a buffer in asynchrnous mode by using the
      async parameter to these calls. async mode is only specified
      with those calls (it is not modal anymore).
      
      as a consequence it can only be specified when the buffer count
      is not overidden, as error is returned otherwise.
      
      Change-Id: Ic63f4f96f671cb9d65c4cecbcc192615e09a8b6b
      7cdd786f
  35. 19 Jul, 2013 1 commit
    • Mathias Agopian's avatar
      BufferQueue improvements and APIs changes · 595264f1
      Mathias Agopian authored
      this is the first step of a series of improvements to
      BufferQueue. A few things happen in this change:
      
      - setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
      - BufferQueue now defaults to (what used to be) synchronous mode
      - a new "controlled by app" flag is passed when creating consumers and producers
        those flags are used to put the BufferQueue in a mode where it
        will never block if both flags are set. This is achieved by:
        - returning an error from dequeueBuffer() if it would block
        - making sure a buffer is always available by replacing
          the previous buffer with the new one in queueBuffer()
          (note: this is similar to what asynchrnous mode used to be)
      
      Note: in this change EGL's swap-interval 0 is broken; this will be
      fixed in another change.
      
      Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
      595264f1
  36. 18 Mar, 2013 1 commit