1. 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
  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. 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
  4. 21 Nov, 2013 1 commit
  5. 14 Nov, 2013 1 commit
  6. 16 Sep, 2013 1 commit
  7. 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
  8. 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
  9. 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
  10. 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
  11. 18 Mar, 2013 1 commit
  12. 15 Feb, 2013 1 commit
  13. 08 Jan, 2013 1 commit
  14. 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
  15. 17 Dec, 2012 1 commit
    • Andy McFadden's avatar
      Added some comments · 0273adbf
      Andy McFadden authored
      Added a quick intro section at the top of the class.  Also noted
      the proposed new name for the class.
      
      Change-Id: I3f79663527544aa4e910db0e5a1374b54d16ba2f
      0273adbf
  16. 01 Sep, 2012 1 commit
    • Jamie Gennis's avatar
      libgui: add BufferQueue test infrastructure · 9e75ddda
      Jamie Gennis authored
      This change adds some infrastructure for testing the BufferQueue class.  It
      also includes a test that tests the new check in BufferQueue::acquireBuffer
      that prevents the consumer from acquiring more than one buffer beyond the max
      acquired buffer count that was set.
      
      Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
      9e75ddda
  17. 01 Jul, 2012 1 commit
  18. 22 Jun, 2012 1 commit
    • Jesse Hall's avatar
      Pass fences from BufferQueue to SurfaceTextureClient · f7857540
      Jesse Hall authored
      ISurfaceTexture::dequeueBuffer now returns the buffer's fence for the
      client to wait on. For BufferQueue, this means passing it through
      Binder so it can be returned to the SurfaceTextureClient. Now
      SurfaceTextureClient is responsible for waiting on the fence in
      dequeueBuffer instead of BufferQueue: one step closer to the goal.
      
      Change-Id: I677ae758bcd23acee2d784b8cec11b32cccc196d
      f7857540
  19. 09 May, 2012 1 commit
    • Jamie Gennis's avatar
      libgui: Add support for post-xform crops. · d72f233f
      Jamie Gennis authored
      This change adds support for specifying a crop rectangle to a
      SurfaceTextureClient that is in post-transformed coordinate space.
      
      Change-Id: I247901de343e71b32850f7ae3bac62dfa612ad3d
      Bug: 6299171
      d72f233f
  20. 25 Apr, 2012 1 commit
    • Jamie Gennis's avatar
      libgui: Add plumbing for active rectangle · efc7ab6d
      Jamie Gennis authored
      This change adds the plumbing to SurfaceTextureClient, BufferQueue, and
      SurfaceTexture to get the active rectangle passed to the ANativeWindow to
      the buffer consumer.
      
      Change-Id: I35da0889b266327ebb079b6a7136fa3e2e8b00e6
      efc7ab6d
  21. 24 Apr, 2012 2 commits
  22. 11 Apr, 2012 1 commit
  23. 30 Mar, 2012 1 commit
    • Mathias Agopian's avatar
      reduce IPC with BufferQueue · 851ef8f1
      Mathias Agopian authored
      collapse setCrop, setTransform and setScalingMode to queueBuffer()
      this ends up simplifying things quite a bit and reducing the numnber
      of IPC needed per frame.
      
      Change-Id: I3a13c07603abe4e76b8251e6380b107fde22e6d9
      851ef8f1
  24. 09 Aug, 2011 1 commit
    • Mathias Agopian's avatar
      return correct value from query after connecting a surface · 5bfc2451
      Mathias Agopian authored
      the first time a surface was connected, the values returned
      by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
      NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
      to queueBuffer was performed.
      
      Bug: 5137366, 5121607
      Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
      5bfc2451
  25. 22 Jul, 2011 1 commit
    • Jamie Gennis's avatar
      SurfaceTexture: add the abandon method. · 7b305fff
      Jamie Gennis authored
      This change adds the 'abandon' method to the SurfaceTexture C++ class.
      This method may be used to put the SurfaceTexture in an abandoned state,
      causing all ISurfaceTexture methods to fail.
      
      Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
      7b305fff
  26. 21 Jul, 2011 1 commit
    • Jamie Gennis's avatar
      SurfaceTexture: remove getAllocator · 976f494d
      Jamie Gennis authored
      This change removes the SurfaceTexture::getAllocator method, as it's no
      longer needed.  Proper refcounting of the Gralloc buffers is now handled
      by the IGraphicBufferAlloc binder marshalling code.
      
      Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
      976f494d
  27. 20 Jul, 2011 1 commit
  28. 19 Jul, 2011 2 commits
  29. 15 Jul, 2011 1 commit
    • Jamie Gennis's avatar
      SurfaceTexture: make (dis)connect into an IPC · fe0a87b5
      Jamie Gennis authored
      This change makes the ANativeWindow connect and disconnect calls result
      in an IPC to the SurfaceTexture object.  This will allow us to prevent
      multiple simultaneous connections from different processes.
      
      Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
      fe0a87b5
  30. 12 May, 2011 3 commits
    • Mathias Agopian's avatar
      Implement {Surface|SurfaceTextureClient}::setSwapInterval() · 80727113
      Mathias Agopian authored
      Change-Id: I8382e346ddaa2c4c8ff56ac3ffd7f0109572f188
      80727113
    • Mathias Agopian's avatar
      unify SurfaceTexture and Surface · eafabcdc
      Mathias Agopian authored
      Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
      eafabcdc
    • Mathias Agopian's avatar
      Fix a bug where setgeometry couldn't be undone · c04f1533
      Mathias Agopian authored
      This change the binder protocol between SurfaceTextureClient
      and SurfaceTexture. dequeueBuffer() now takes the requested
      parameters for the buffer. SurfaceTexture decides if the
      buffer needs to be reallocated and does the allocation
      if needed. In that case it returns BUFFER_NEEDS_REALLOCATION
      to tell SurfaceTextureClient that it needs to call
      requestBuffer (which all parameters have been removed) to
      acquire a pointer to the buffer.
      
      dequeueBuffer and requestBuffer could be folded into a single
      IPC call, but we chose to optimize the case where buffers are
      not created and avoid some complexity in the marshalling code.
      
      Change-Id: I097a7f6f40a3491e10f3f3742eab33999286c304
      c04f1533
  31. 01 Apr, 2011 1 commit
    • Mathias Agopian's avatar
      SurfaceTexture can now force the client to request a buffer · a5c75c01
      Mathias Agopian authored
      SurfaceTexture now has the concept of default size a new method,
      setDefaultBufferSize() to set it. When the default size is
      changed, dequeueBuffer() will return a value telling the
      client that it must ask for a new buffer.
      
      The above only applies if the client has not
      overriden the buffer size with setGeometry.
      
      Change-Id: I520dc40363054b7e37fdb67d6a2e7bce70326e81
      a5c75c01
  32. 17 Mar, 2011 1 commit
    • Eino-Ville Talvala's avatar
      Add support for timestamps into SurfaceTexture. · 1d01a12e
      Eino-Ville Talvala authored
      API addition: The timestamps are represented as nanoseconds from some
      arbitrary time point. Like the SurfaceTexture transform matrix, the
      timestamp retrieved by getTimestamp is for the last frame sent to the
      GL texture using updateTexImage().
      
      Camera HAL change: Expect vendors to set these timestamps using
      native_window_set_buffers_timestamp().  For now, they are
      autogenerated by SurfaceTextureClient if set_buffers_timestamp() is
      never called, but such timing is likely not accurate enough to pass a
      CTS test.
      
      bug:3300707
      
      Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
      1d01a12e
  33. 02 Feb, 2011 1 commit
    • Jamie Gennis's avatar
      Pass the IGraphicBufferAlloc to SurfaceTextureClient. · 1b20cde3
      Jamie Gennis authored
      This change passes a reference to the IGraphicBufferAlloc binder object
      to SurfaceTextureClient objects.  When STC objects are created they
      query their associated ISurfaceTexture object for the
      IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers.
      Having the SurfaceTextureClient hold this reference prevents the
      GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers
      before the SurfaceTextureClient is done with them.
      
      Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c
      related-bug: 3362519
      1b20cde3
  34. 06 Jan, 2011 1 commit
    • Jamie Gennis's avatar
      Add the SurfaceTexture C++ implementation. · 8ba32fad
      Jamie Gennis authored
      This change adds the C++ implementation of SurfaceTexture and related
      classes. The goal of this is for a SurfaceTexture to be passed to
      camera service or Stagefright in place of a Surface to allow camera
      preview or decoded video frames to be streamed to an OpenGL ES texture
      that an application can use.
      
      Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
      8ba32fad