1. 07 Nov, 2014 1 commit
    • Dan Stoza's avatar
      Add a BufferItem parameter to onFrameAvailable · 8dc55396
      Dan Stoza authored
      Passes the BufferItem for the queued buffer to the onFrameAvailable
      callback so the consumer can track the BufferQueue's contents. Also
      adds an onFrameReplaced callback, which is necessary if the consumer
      wants to do anything more than simple queue length tracking.
      
      Bug: 18111837
      Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
      8dc55396
  2. 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
  3. 06 Aug, 2013 1 commit
  4. 02 Aug, 2013 1 commit
    • Mathias Agopian's avatar
      Binderize the consumer side of BufferQueue · a4e19521
      Mathias Agopian authored
      While currently untested, this should allow to move the
      BuffereQueue in the consumer process and have everything
      work as usual.
      
      Bug: 9265647
      
      Change-Id: I9ca8f099f7c65b9a27b7e7a3643b46d1b58eacfc
      a4e19521
  5. 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
  6. 10 Jul, 2013 1 commit
    • Andy McFadden's avatar
      Pay attention to buffer timestamps · 1585c4d9
      Andy McFadden authored
      When acquiring a buffer, SurfaceFlinger now computes the expected
      presentation time and passes it to the BufferQueue acquireBuffer()
      method.  If it's not yet time to display the buffer, acquireBuffer()
      returns PRESENT_LATER instead of a buffer.
      
      The current implementation of the expected-present-time computation
      uses approximations and guesswork.
      
      Bug 7900302
      
      Change-Id: If9345611c5983a11a811935aaf27d6388a5036f1
      1585c4d9
  7. 23 May, 2013 1 commit
    • Lajos Molnar's avatar
      BufferQueue: track buffer-queue by instance vs. by reference · c5d7b7d3
      Lajos Molnar authored
      
      Instead of representing the buffer-queue as a vector of buffer
      indices, represent them as a vector of BufferItems (copies).
      This allows modifying the buffer slots independent of the queued
      buffers.
      
      As part of this change, BufferSlot properties that are only
      been relevant in the buffer-queue have been removed.
      
      Also, invalid scalingMode in queueBuffer now returns an error.
      
      ConsumerBase has also changed to allow reuse of the same
      buffer slots by different buffers.
      
      Change-Id: If2a698fa142b67c69ad41b8eaca6e127eb3ef75b
      Signed-off-by: default avatarLajos Molnar <lajos@google.com>
      Related-to-bug: 7093648
      c5d7b7d3
  8. 22 Apr, 2013 1 commit
  9. 08 Apr, 2013 1 commit
    • Jamie Gennis's avatar
      libgui: fix an EGLImage leak · ad669b04
      Jamie Gennis authored
      This moves the call to ConsumerBase::abandon from the ConsumerBase dtor to
      ConsumerBase::onLastStrongRef.  The abandon call relies on virtual methods to
      perform the clean-up, so calling it from the ConsumerBase dtor after the
      derived classes dtors ran was skipping some of the clean-up.  The
      onLastStrongRef method should get called just before the most derived class's
      dtor gets called.
      
      Bug: 8349135
      Change-Id: I836946826927cc1ed69c049049f525f92b17a269
      ad669b04
  10. 18 Mar, 2013 1 commit
    • Jesse Hall's avatar
      Minor cleanups/fixes before virtual display refactoring · 7adb0f8a
      Jesse Hall authored
      None of these should change behavior, except for removing some
      incorrect log messages when using a virtual display.
      
      - HWComposer::getAndResetReleaseFenceFd() checks the HWC version, so
        no need to do that in the DisplayDevice::onSwapBuffersCompleted().
        However, it should check that mFramebufferSurface is not NULL like
        it is for virtual displays.
      - Comment that FramebufferSurface::dump() overrides the non-virtual
        ConsumerBase::dump(), and fix it so the right thing happens
        regardless of the static type of the pointer/reference the callee
        has. FramebufferSurface::dump() could be removed right now, but I'd
        need to bring it back in a later change.
      - Use the right enum for validating display type ids.
      - Don't try to send hotplug events for virtual displays.
      - Mark virtual displays as connected so HWComposer::prepare() doesn't
        think something is wrong when it gets a non-NULL layer list.
      - Remove unused FramebufferSurface methods.
      
      Bug: 8384764
      Change-Id: Id28a2f9be86b45f4bb7915fdf7752157035f4294
      7adb0f8a
  11. 18 Dec, 2012 1 commit
    • Andy McFadden's avatar
      Rename ISurfaceTexture and SurfaceTexture · 2adaf04f
      Andy McFadden authored
      The C++ class names don't match what the classes do, so rename
      ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
      GLConsumer.
      
      Bug 7736700
      
      Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
      2adaf04f
  12. 05 Nov, 2012 1 commit
  13. 05 Oct, 2012 1 commit
    • Jesse Hall's avatar
      Fix race condition in ConsumerBase::addReleaseFence() · 9504eb91
      Jesse Hall authored
      This needs the ConsumerBase mutex locked, but wasn't locking it. Two
      of the four places that called it already held the lock so were fine.
      Now addReleaseFence() takes the lock itself, and I added
      addReleaseFenceLocked() for the two already-locked callers, since in
      one of them dropping the lock would be inconvenient.
      
      Bug: 7289269
      Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a
      9504eb91
  14. 07 Sep, 2012 1 commit
    • Jamie Gennis's avatar
      libgui: move fence handling into ConsumerBase · b2725415
      Jamie Gennis authored
      This change moves some common fence handling code into the base class for
      BufferQueue consumer classes.  It also makes the ConsumerBase class initialize
      a buffer slot's fence with the acquire fence every time a buffer is acquired.
      
      Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
      b2725415
  15. 21 Aug, 2012 1 commit
    • Jamie Gennis's avatar
      SurfaceTexture: inherit from ConsumerBase (try 2) · 9fea3421
      Jamie Gennis authored
      This change makes SurfaceTexture inherit from ConsumerBase.  It removes all of
      the functionality from SurfaceTexture that is now provided by the base class.
      This includes fixes for two bugs that were found after checking this change in
      the first time and then reverting it.
      
      Change-Id: Ie2d9f4f27cfef26fdac341de3152e842b01a58d2
      9fea3421
  16. 20 Aug, 2012 2 commits
  17. 17 Aug, 2012 1 commit
    • Jamie Gennis's avatar
      SurfaceTexture: inherit from ConsumerBase · ed059a8d
      Jamie Gennis authored
      This change makes SurfaceTexture inherit from ConsumerBase.  It removes all of
      the functionality from SurfaceTexture that is now provided by the base class.
      
      Change-Id: I4a881df42810a14ee32d4ef7c8772a8f2510f4c7
      ed059a8d
  18. 07 Aug, 2012 1 commit