History log of /frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8dc55396fc9bc425b5e2c82e76a38080f2a655ff 04-Nov-2014 Dan Stoza <stoza@google.com> Add a BufferItem parameter to onFrameAvailable

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
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
7cd85979e81cd632c37852f7ca716089dc52e899 08-Aug-2014 Jesse Hall <jessehall@google.com> surfaceflinger: fix -Wunused-parameter warning

warning: unused parameter 'mustRecompose' [-Wunused-parameter]

Change-Id: I6b8c671189639d851bfa5548742de988d6fa2687
(cherry picked from d2e514f71709e6af3dbc754e59686129737f2300)
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
993146092f8205d9747f082ccd63c09b536caa4e 14-Mar-2014 Mark Salyzyn <salyzyn@google.com> am d4dabf87: am cdbf28b3: Merge "native frameworks: 64-bit compile issues"

* commit 'd4dabf872ac0a12e12aebae9032f7d62762c2aeb':
native frameworks: 64-bit compile issues
92dc3fc52cf097bd105460cf377779bdcf146d62 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
7143316af216fa92c31a60d4407b707637382da1 05-Feb-2014 Dan Stoza <stoza@google.com> Fix virtual display nesting

This fixes the cycling rendering loop caused by nesting virtual
displays by preventing them from recomposing if their contents
haven't changed.

Bug: 12101046
Change-Id: I600365c0fd5d3ad93e04295d26cf9de177ffc79b
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
028dc8f2d72bc7cd4fbe7808781443125a742f78 21-Aug-2013 Jesse Hall <jessehall@google.com> Provide HWC prepare with a valid output buffer

We weren't dequeing and setting the output buffer until just before
set(). This didn't allow HWC to make decisions in prepare() based on
the output buffer format, dimensions, etc.

Now we dequeue the output buffer at the beginning of the composition
loop and provide it to HWC in prepare. In GLES-only rendering, we may
have to cancel the buffer and acquire a new one if GLES requests a
buffer with properties different than the one we already dequeued.

Bug: 10365313
Change-Id: I96b4b0a851920e4334ef05080d58097d46467ab8
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
db89edc94bd2a78226b407f9f7261e202e7fa325 02-Aug-2013 Mathias Agopian <mathias@google.com> All consumers now take an IGraphicBufferConsumer instead of a BufferQueue

this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that

Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
ad678e18b66f495efa78dc3b9ab99b579945c9e2 24-Jul-2013 Mathias Agopian <mathias@google.com> single buffer mode for BufferQueue

Bug: 9891035
Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
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/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
3bc38408882487dc2a63ba036394addd839b0695 16-Jul-2013 Jesse Hall <jessehall@google.com> Merge "Rewrite VirtualDisplaySurface"
38efe86d9459cf5c96a24a34cc5cbf31fdba7e19 07-Apr-2013 Jesse Hall <jessehall@google.com> Rewrite VirtualDisplaySurface

The previous implementation assumed that the HWC could read and write
the same buffer on frames that involved both GLES and HWC composition.
It turns out some hardware can't do this. The new implementation
maintains a scratch buffer pool to use on these mixed frames, but on
GLES-only or HWC-only frames still does composition directly into the
output buffer.

Bug: 8384764
Change-Id: I7a3addb34fad9bfcbdabbb8b635083e10223df69
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
1585c4d9fbbba3ba70ae625923b85cd02cb8a0fd 28-Jun-2013 Andy McFadden <fadden@android.com> Pay attention to buffer timestamps

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
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
c5d7b7d323bba8772a9005f7d300ad983a04733a 03-May-2013 Lajos Molnar <lajos@google.com> BufferQueue: track buffer-queue by instance vs. by reference

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: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
74d211ae26a0257c6075a823812e40b55aa1e653 22-Apr-2013 Mathias Agopian <mathias@google.com> clean-up/simplify all dump() APIs

remove the scratch buffer parameter and use
String8::appendFormat() instead.

Change-Id: Ib96c91617c8e7292de87433d15cf6232b7d591b0
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
33ceeb32582739dd74e404593d9ddf8adf5100bb 02-Apr-2013 Mathias Agopian <mathias@google.com> Fix include paths

Change-Id: If5350a3de995cc0cb1afea067e7ce168bc00d3f5
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
851cfe834295224cd64bdd499872b95b19c4de8c 20-Mar-2013 Jesse Hall <jessehall@google.com> Isolate knowledge that fb target == output buffer

HWComposer didn't allow the virtual display output buffer to be set
directly, instead it always used the framebuffer target buffer.
DisplayDevice was only providing the framebuffer release fence to
DisplaySurfaces after a commit.

This change fixes both of these, so both HWComposer and DisplayDevice
should continue to work if VirtualDisplaySurface changes to use
separate framebuffer and output buffers. It's also more correct since
VirtualDisplaySurface uses the correct release fence when queueing the
buffer to the sink.

Bug: 8384764
Change-Id: I95c71e8d4f67705e23f122259ec8dd5dbce70dcf
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
13f01cbdbd34779a234bc674df79e23672fd5c0b 20-Mar-2013 Jesse Hall <jessehall@google.com> Pass sp<Fence>s around instead of file descriptors

Change-Id: Iac70584a2207940730e8f803a543e4e9a4000c47
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
7414965606f82ac2bcace5d3e2c8a4810517bf1e 20-Mar-2013 Jesse Hall <jessehall@google.com> Release virtual display buffer immediately after HWC set

Previously we only queued a virtual display buffer to the sink when
the next frame was about to be displayed. This may delay the "last"
frame of an animation indefinitely. Now we queue the buffer as soon as
HWC set() returns and gives us the release fence.

Bug: 8384764
Change-Id: I3844a188e0f6ef6ff28f3e11477cfa063a924b1a
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
99c7dbb24994df2f3e175f7b25dd2c9dd92a72f0 14-Mar-2013 Jesse Hall <jessehall@google.com> Add DisplaySurface abstraction

DisplayDevice now has a DisplaySurface instead of using
FramebufferSurface directly. FramebufferSurface implements
DisplaySurface, and so does the new VirtualDisplaySurface class.
DisplayDevice now always has a surface, not just for virtual displays.

In this change VirtualDisplaySurface is just a stub; buffers still go
directly from GLES to the final consumer.

Bug: 8384764
Change-Id: I57cb668edbc6c37bfebda90b9222d435bf589f37
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
7adb0f8a9fdb961692ffd2f0c65cacb155143f64 07-Mar-2013 Jesse Hall <jessehall@google.com> Minor cleanups/fixes before virtual display refactoring

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
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
e3c697fb929c856b59fa56a8e05a2a7eba187c3d 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
392edd88cb63d71a21a86a02cf9c56ac97637128 30-Nov-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: Move GraphicBufferAlloc to libgui

This change moves the GraphicBufferAlloc class from SurfaceFlinger to libgui.

Change-Id: Idf31d2004efa2651b60590733f73c4a7b831e8a9
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
cdbaecb54152ce98789823420d426077d72aa1e7 12-Oct-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: make the num FBs a board config

Bug: 7283132
Change-Id: I38116f39fc18212f2daab94bbfc3daaf89439fc4
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
f5a33928349bebc8eebc9f466618997e98c24e68 20-Sep-2012 Mathias Agopian <mathias@google.com> we now correctly set-up connected screens during boot

Change-Id: Ie8b1a3b97ad1821cc970e43abe96c8cec7135b66
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492 21-Sep-2012 Mathias Agopian <mathias@google.com> GraphicBufferAlloc class was declared twice

this was confusing because the one in FramebufferSurface
wasn't in fact being used

Change-Id: Ied45aec20d804cfbe52440f9b2f2852a85c757cf
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
da27af9832a0170f1fc40ef3f21371c4d30d21b3 14-Sep-2012 Mathias Agopian <mathias@google.com> add support hwc 1.1

Bug: 7124069

Change-Id: I53d705105c4ad8954d3f50ee4f4c8b7ec936b871
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
db27621e22559a1b16414f890677ef04242fbc3b 07-Sep-2012 Jesse Hall <jessehall@google.com> Initialize new HWC 1.2 fields

Also rename resolution* to width/height.

Change-Id: Ia5f0c50d3f0a349160f314a3257c3b985e13ef1d
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
b0d1dd36f104c0b581674adc7f830cbf44b7db06 10-Sep-2012 Andy McFadden <fadden@android.com> Reshuffle FramebufferSurface

FramebufferSurface no longer speaks directly to the FB HAL. Now
everything goes through HWComposer (which may or may not be
connected to a hardware composer).

Added display index arg to some query methods.

Change-Id: Id3e157d2d4e3555d33afbb703e518b6e92e2d6d5
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
b27254154642575dfb4bbfa79fbedde7d7ee23dd 06-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: move fence handling into ConsumerBase

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
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
72f096fb1ad0a0deadbfac5f88627461905d38e8 28-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: use max acquired buffer count

This change makes BufferQueue derive the min undequeued buffer count from a max
acquired buffer count that is set by the consumer. This value may be set at
any time that a producer is not connected to the BufferQueue rather than at
BufferQueue construction time.

Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
31a353da225af5329735451c761b430d82dfda1b 25-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: clean up buffer counting

This change is a clean up of some of the handling of the maximum number of
buffers that are allowed at once. It mostly renames a few member variables and
methods, but it includes a couple small refactorings.

Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
8b736f138cfd9b239a2c7073347a13c489534ae1 14-Aug-2012 Mathias Agopian <mathias@google.com> xdpi / ydpi were reported as 0

Bug: 6975723
Change-Id: Ia7fa37ec11e2308804f5034959a37e508d292d31
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
1a4d883dcc1725892bfb5c28dec255a233186524 03-Aug-2012 Jamie Gennis <jgennis@google.com> surfaceflinger: refactor FrambufferSurface

This change refactors the FramebufferSurface class to inherit from the new
ConsumerBase class.

Bug: 6620200
Change-Id: I46ec942ddb019658e3c5e79465548b171b2261f2
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
a49126087b4494f4ef50873f3a3f6727265f6621 12-Jul-2012 Mathias Agopian <mathias@google.com> factor EGL/GL and surface creation out of DisplayHardware

Change-Id: Icd85a6a4caad06f056578008af3e21666fa8b1f4
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
b42b1ac1587aebda5e2f334d95b620271fafba4e 28-Jun-2012 Jesse Hall <jessehall@google.com> Return fence from acquireBuffer

Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
ef19414bd8b77a26f5751f3845be79025a8263fe 14-Jun-2012 Jesse Hall <jessehall@google.com> Transfer HWC release fences to BufferQueue

After a HWC set, each SurfaceFlinger Layer retrieves the release fence
HWC returned and gives it to the layer's SurfaceTexture. The
SurfaceTexture accumulates the fences into a merged fence until the
next updateTexImage, then passes the merged fence to the BufferQueue
in releaseBuffer.

In a follow-on change, BufferQueue will return the fence along with
the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the
fence to signal before returning.

The releaseFence default value for BufferQueue::releaseBuffer() is
temporary to avoid transient build breaks with a multi-project
checkin. It'll disappear in the next change.

Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
3e87601170141229d661df93e2f59e1ced73474b 08-Jun-2012 Mathias Agopian <mathias@google.com> Implement SurfaceFlinger's ANW on top of BufferQueue

SF now has its own implementation of ANW for the
framebuffer and it uses BufferQueue. FramebufferNativeWindow
is now only used by stand-alone apps.

Change-Id: Iddeb24087df62bd92b0f78e391dda9b97ddc859c
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp