History log of /frameworks/native/include/gui/Surface.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
eb7980c224a54f860b7af5ecf30cbc633ae41289 28-Jun-2016 Pablo Ceballos <pceballos@google.com> BQ: Add and expose a unique id

Bug 29422927

Change-Id: I80eab94f073ebc378302f00fa86a740c3643657e
/frameworks/native/include/gui/Surface.h
1a61da5e28fa16ad556a58193c8bbeb32a5f636d 28-Apr-2016 John Reck <jreck@google.com> Return the transform to apply in getLastQueuedBuffer

Bug: 28428955
Change-Id: Id48f7d3bf3f5deb074cf0a6a52a41caac875db41
/frameworks/native/include/gui/Surface.h
50101d02a8eae555887282a5f761fdec57bdaf30 08-Apr-2016 Dan Stoza <stoza@google.com> libgui: Add getLastQueuedBuffer to BufferQueue

Adds the ability to get the last buffer queued to a BufferQueue plus
its acquire fence.

Bug: 27708453
Change-Id: Iee39475740b40c854a5f46178b2934fd930e61b8
/frameworks/native/include/gui/Surface.h
9f31e299b3ec93b7bac969846105e7e926e3efcd 11-Apr-2016 Robert Carr <racarr@google.com> Add Surface::waitForNextFrame

We can use this for cases like SurfaceView
where one thread (e.g. the framework code)
wants to wait for an unknown client thread
to render a frame in to the surface before
we report it as shown to the window manager.

Bug: 22207948
Change-Id: I9d3344aa1c0ab0f0efd9df24e90ce0410d5f2e22
/frameworks/native/include/gui/Surface.h
3559fbf93801e2c0d9d8fb246fb9b867a361b464 17-Mar-2016 Pablo Ceballos <pceballos@google.com> Rename single buffer mode to shared buffer mode

Change-Id: Id43d0737d9367981644e498942ebc0077d61038c
/frameworks/native/include/gui/Surface.h
88612912ac8406f2be0eeff97892274f98509017 06-Jan-2016 Eino-Ville Talvala <etalvala@google.com> GUI: Move Surface.aidl here and implement for native

- Move android/view/Surface.aidl parcelable definition from frameworks/base
- Implement matching native behavior to android.view.Surface parceling,
to enable use of android.view.Surface in generated native AIDL interfaces

Bug: 25091611
Change-Id: I87ffbb9a19c27a99ce0749d0ca1f17aaa6b3fe74
/frameworks/native/include/gui/Surface.h
ff95aabbcc6e8606acbd7933c90eeb9b8b382a21 14-Jan-2016 Pablo Ceballos <pceballos@google.com> Add interface for controlling single buffer auto refresh

- Adds a boolean to BufferQueue that controls whether or not auto
refresh is enabled in SurfaceFlinger when in single buffer mode.
- Adds plumbing up to ANativeWindow.
- When enabled, it will cache the shared buffer slot in Surface in
order to prevent the Binder transaction with SurfaceFlinger.

Bug 24940410

Change-Id: I83142afdc00e203f198a32288f071d926f8fda95
/frameworks/native/include/gui/Surface.h
127fc63e8a15366b4395f1363e8e18eb058d1709 30-Jun-2015 Dan Stoza <stoza@google.com> libgui: Add dequeue/attach timeout

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
/frameworks/native/include/gui/Surface.h
c2e7788721489c5a2ef681fd0bfa591d2ce41175 17-Dec-2015 Robert Carr <racarr@google.com> Expose setScalingMode from Surface.

While we are here fix a validation error causing
NATIVE_WINDOW_SCALING_MODE_NO_SCALE_CROP to never be applied.
Furthermore, we remove GLConsumer logic causing the scaling mode to
be reinitialized when buffers change.

Bug: 26010823
Change-Id: I1bf1e4fdc2eded67ff401783cf24f920e4684326
/frameworks/native/include/gui/Surface.h
ccdfd60d79a8b7f1ed6401d0f2e8e29166a10584 08-Oct-2015 Pablo Ceballos <pceballos@google.com> BQ: Add support for single buffer mode

- 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
/frameworks/native/include/gui/Surface.h
7dde599bf1a0dbef7390d91c2689d506371cdbd7 22-May-2015 Dan Stoza <stoza@google.com> Support SurfaceView synchronization.

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
/frameworks/native/include/gui/Surface.h
19e3e06e3c65a7c001a6fe0971744ba5ff536515 20-Aug-2015 Pablo Ceballos <pceballos@google.com> BQ: Modify consumer buffer count interfaces

- 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
/frameworks/native/include/gui/Surface.h
fa455354557f6283ff3a7d76979e52fd251c155f 13-Aug-2015 Pablo Ceballos <pceballos@google.com> BQ: add setMaxDequeuedBufferCount

Adds the new setMaxDequeuedBufferCount() function to
BufferQueueProducer. This will eventually replace setBufferCount.

Also add setAsyncMode.

Bug 13174928

Change-Id: Iea1adcd5d74a75f67d8e9dde06d521695628ad5a
/frameworks/native/include/gui/Surface.h
c6f30bdee1f634eb90d68cb76efe935b6535a1e8 08-Jun-2015 Dan Stoza <stoza@google.com> libgui/SurfaceFlinger: Add getConsumerName

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
/frameworks/native/include/gui/Surface.h
a2ca9bf0a9789e9e5e37961ebfb356347f59309e 08-Jun-2015 Dan Stoza <stoza@google.com> Revert "libgui: Add getConsumerName"

This reverts commit 107fbe5599016b0e35145a1a00c4f238b63d61e4.

Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
/frameworks/native/include/gui/Surface.h
107fbe5599016b0e35145a1a00c4f238b63d61e4 06-Jun-2015 Dan Stoza <stoza@google.com> libgui: Add getConsumerName

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
/frameworks/native/include/gui/Surface.h
812ed0644f8f8f71ca403f4e5793f0dbc1fcf9b2 03-Jun-2015 Dan Stoza <stoza@google.com> libgui: Add generation numbers to BufferQueue

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
/frameworks/native/include/gui/Surface.h
d9c4971da2f2c4f980a748006bd40469c3332a13 27-Apr-2015 Dan Stoza <stoza@google.com> libgui: Change detachNextBuffer to return sp<GB>

Changes Surface::detachNextBuffer to return an sp<GraphicBuffer>
instead of an ANativeWindowBuffer* to ensure that reference counting
works correctly.

Bug: 20092217
Change-Id: I3979ea6121aaf14845f0554477b778770413581e
(cherry picked from commit 8b2daa3ca29492b181fb67840640d771c4a2b3ac)
/frameworks/native/include/gui/Surface.h
c62acbd12711ee6cff1ef94c146316dfe5169045 22-Apr-2015 Dan Stoza <stoza@google.com> libgui: Fix CPU rendering on Surface

When the surface damage code went in, it incorrectly assumed that if
an application was doing CPU rendering, it would be using lock and
unlockAndPost instead of dequeue and queue, so it repurposed the dirty
region too aggressively. This change keeps it from clobbering the
dirty region if a CPU producer is attached.

Bug: 20431815
Change-Id: Id4dfd71378311ea822f0289f6de2d20a7bd84014
/frameworks/native/include/gui/Surface.h
5065a55291b67f584d7b0be3fa3cfc4e29a3cd1c 18-Mar-2015 Dan Stoza <stoza@google.com> libgui: Pass surface damage through BufferQueue

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
/frameworks/native/include/gui/Surface.h
231832eb27107fb561467f5f4a9be2c577c61ea8 11-Mar-2015 Dan Stoza <stoza@google.com> DO NOT MERGE libgui: Plumb attach/detach through Surface

Exposes the attachBuffer and detachNextBuffer calls from
IGraphicBufferProducer to the public Surface interface. Also moves
the version of connect that takes a producer callback from protected
to public.

Bug: 19628705
Change-Id: I9ebc3013c4d9c84c4e8ef150c00e03f8af80319e
(cherry picked from commit c14ecb9de243af8864610fd3c74342e3ca2cb4bc)
/frameworks/native/include/gui/Surface.h
82c6bcc9705eabcaf5b9e45bc81867b0e2d61a02 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.

- 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
/frameworks/native/include/gui/Surface.h
966b98bd86abc6473167bc98ddf8ddb1f8dd2ed5 03-Mar-2015 Dan Stoza <stoza@google.com> Surface: Permit an IProducerListener on connect

This change allows clients of Surface to provide an IProducerListener
callback object to Surface::connect, which will be passed down to the
underlying IGraphicBufferProducer.

Cherry pick of I5ea5229bf3a329bf02c6bd20e7247039c75d136b

Change-Id: I6f8f52c72654e4cee649721383819bafe378f964
/frameworks/native/include/gui/Surface.h
3be1c6b60a188dc10025e2ce156c11fac050625d 18-Nov-2014 Dan Stoza <stoza@google.com> libgui: Enable -Weverything and -Werror

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
/frameworks/native/include/gui/Surface.h
7cb0d39016ff8061fe9fc2967870c145a6ffa2ac 30-Jul-2014 Rachad <rachad@google.com> Tunneled Video Playback support

Added native_window_set_sideband_stream() method to Surface.[h|cpp]
Added ConfigureVideoTunnelModeParams OMX configuration structure to
HardwareAPI.h

Bug: 16132368
Change-Id: I28fa1b9dbe858d93e353e0991098cad45c626bd9
/frameworks/native/include/gui/Surface.h
1681d95989271f3a9ac0dbb93d10e4a29f2b4444 28-Jun-2014 Ruben Brunk <rubenbrunk@google.com> Add sticky transform to surfaceflinger.

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
/frameworks/native/include/gui/Surface.h
29a3e90879fd96404c971e7187cd0e05927bbce0 20-Jun-2014 Dan Stoza <stoza@google.com> BufferQueue: Add allocateBuffers method

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
/frameworks/native/include/gui/Surface.h
399184a4cd728ea1421fb0bc1722274a29e38f4a 04-Mar-2014 Jesse Hall <jessehall@google.com> Add sideband streams to BufferQueue and related classes

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
/frameworks/native/include/gui/Surface.h
3f84483382be2d528918cc1a6fbc6a7d68e0b181 08-Aug-2013 Mathias Agopian <mathias@google.com> SurfaceFlinger now uses GLES 2.x when available

Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
/frameworks/native/include/gui/Surface.h
7cdd786fa80cf03551291ae8feca7b77583be1c5 19-Jul-2013 Mathias Agopian <mathias@google.com> Make ANW.setSwapInterval(0) work again

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
/frameworks/native/include/gui/Surface.h
595264f1af12e25dce57d7c5b1d52ed86ac0d0c9 17-Jul-2013 Mathias Agopian <mathias@google.com> BufferQueue improvements and APIs changes

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
/frameworks/native/include/gui/Surface.h
35ffa6a868f1aa650c90956a4129bb70f780fc99 13-Mar-2013 Mathias Agopian <mathias@google.com> Surface can now be created only from an IGraphicBufferProducer

it can't write itself to a parcel, nor can it be created from a
parcel.

Change-Id: I69165d5c54d6024b3e546e80d8b57e3dedda7893
/frameworks/native/include/gui/Surface.h
cf0b8c85fb0106751256dba7821f86b5ad03126c 20-Feb-2013 Mathias Agopian <mathias@google.com> get rid of Surface::getISurfaceTexture()

this was there just for legacy reasons.

Change-Id: I0a48d6e04d7efa65033f9f10c91bba557f16ae8b
/frameworks/native/include/gui/Surface.h
c4905eb49d20667381f3cda7c6f6894234404bd3 16-Feb-2013 Mathias Agopian <mathias@google.com> fix build: SurfaceTextureClient to Surface rename

Change-Id: I0041e6f49bc637bc52161c83f0bd44101246f480
/frameworks/native/include/gui/Surface.h
f25c5086cf46eb029d887f34f25a09220e44958c 15-Feb-2013 Mathias Agopian <mathias@google.com> fix build: SurfaceTextureClient to Surface rename

Change-Id: I54d68241f1080eef640aefe71f33912ad79345ef
/frameworks/native/include/gui/Surface.h
e3c697fb929c856b59fa56a8e05a2a7eba187c3d 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
/frameworks/native/include/gui/Surface.h
6d9b9dfd555ee2bc1dd8381dde95d45f9500b3ca 14-Feb-2013 Mathias Agopian <mathias@google.com> remove access ANDROID_VIEW_SURFACE_JNI_ID

Change-Id: I0ef474ed9be2cd26fa520ef871ffcf21a25e4994
/frameworks/native/include/gui/Surface.h
ac9fa427d4a86745e60a5f7fd8e3ea340c4db907 12-Feb-2013 Mathias Agopian <mathias@google.com> get rid of Surface identity and token

we use the IBinder instead.

Change-Id: I4aa0b58869ba43f19980013620051e5a261b062d
/frameworks/native/include/gui/Surface.h
882e3a39ed770b335a203e233b57127fde1c839e 09-Jan-2013 Andy McFadden <fadden@android.com> Add some comments.

Also, minor tweak to SurfaceTextureLayer.

Change-Id: If616d5ee4e8226dd0e16c5dbb0e0f80db553110e
/frameworks/native/include/gui/Surface.h
2adaf04fab35cf47c824d74d901b54094e01ccd3 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

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
/frameworks/native/include/gui/Surface.h
0273adbf0bc202eda2ca579ae0773464ea9c701f 13-Dec-2012 Andy McFadden <fadden@android.com> Added some comments

Added a quick intro section at the top of the class. Also noted
the proposed new name for the class.

Change-Id: I3f79663527544aa4e910db0e5a1374b54d16ba2f
/frameworks/native/include/gui/Surface.h
380223bf1b340e7503177254a60d5982f95ab793 27-Aug-2012 Jeff Brown <jeffbrown@google.com> Remove unused "layer" argument from show().

Change-Id: I8944a9f4a27c330b11e5e837c69b88c8f84145ba
/frameworks/native/include/gui/Surface.h
9d4e3d2f42e93e2d12bacabe97d307d30c3c20dd 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Banish DisplayID from the SurfaceFlinger API.

Use only display tokens in the API to refer to new displays.

Don't require the caller to specify the display when creating
a surface (since in general a surface could be shown on
any display).

This is intended to be a minimum change just to update the API.
Note that SurfaceFlinger still uses DisplayID in a few places
internally that might cause some features not to work properly
when there are multiple displays (LayerScreenshot, for example).

Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
/frameworks/native/include/gui/Surface.h
6501e9944df131b3b7e293007084735dfa217f24 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freeze(), unfreeze() and setFreezeTint().

This is all dead code.

Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce
/frameworks/native/include/gui/Surface.h
f15a83f5814219c167f87cb8aaea622fc8493499 11-May-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add a crop to the layer state

This change adds a crop rectangle specified in window coordinates to the layer
state. The all window pixels outside this crop rectangle are treated as though
they were fully transparent. This change also adds the plumbing necessary for
WindowManager to set that crop.

Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
/frameworks/native/include/gui/Surface.h
90ac799241f077a7b7e6c1875fd933864c8dd2a7 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
/frameworks/native/include/gui/Surface.h