History log of /frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
34beb7a0ff0494b0c5ad81104171f8a49e599163 28-Mar-2018 Peiyong Lin <lpy@google.com> [SurfaceFlinger] Replace android_dataspace with Dataspace.

This patch replaces all android_dataspace in SurfaceFlinger with Dataspace
V1.1. 3 commands in sequence are used to do the conversion:

find ./ -type f -exec sed -i -e 's/android_dataspace_t/Dataspace/g' {} \;
find ./ -type f -exec sed -i -e 's/android_dataspace/Dataspace/g' {} \;
find ./ -type f -exec sed -i -e 's/HAL_DATASPACE_/Dataspace::/g' {} \;

With some minor tweak because most of the APIs in frameworks/native are still
accepting android_dataspace/android_dataspace_t.

Next step is to convert the rest of android_dataspace usage to Dataspace in
frameworks/native as well as frameworks/base.

BUG: 77156734
Test: Build and flash
Change-Id: I2304c7014cb49a1c9f67c4563603fb55e8dbd679
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
1e04361db1b65d3998edbf820078ccfaed477cb6 01-Mar-2018 Chia-I Wu <olv@google.com> surfaceflinger: minor dumpsys improvements

In the order of importance,

- fix eglGetConfigAttrib calls
- mark Zs as relative in minidump
- dump DisplayDevice wide color states
- rename pixelformat to defaultPixelFormat in layer state
- better grouping and indentation for DisplayDevice dump

Bug: 76415976
Test: dumpsys
Change-Id: If9254ffe43cb1de82d562fcc27e828d54eba9387
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
2ae2b3bd5bfbacc3b52f222441bfbbeb9bd54dc7 15-Dec-2017 Lloyd Pique <lpique@google.com> Allow a primary display disconnect

This patch forwards the primary display disconnect event to the
Framework, and otherwise ensures that SurfaceFlinger does not crash
while there is no primary display.

Note that the Framework does not yet accept this change. In particular
the ActivityManager ActivityStackSupervisor code promptly asserts that
one cannot remove the primary display. With this assertion disabled, the
framework does not crash (surprisingly). And if the Framework
subsequently receives a primary display connect event, it does not seem
to do anything useful -- the display remains in a default off state, and
no layer stack/viewport/etc is set on it.

Bug: 38464421
Test: Works (with workarounds as noted) on a Chromebook
Test: Added Unit test passes on Pixel 1 XL

Change-Id: Ia11439030efdc53bc17474b71a0ffb3d3085bb49
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
1e24ccebeeb6798afce2730a120abcf9927960fa 10-Nov-2017 Chia-I Wu <olv@google.com> surfaceflinger: remove all direct use of EGL

SurfaceFlinger now uses EGL/GLES only indirectly through
RenderEngine and GLConsumer.

Test: SurfaceFlinger_test
Change-Id: I78418b00168b79594979212eb488f530e738498d
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
83ce7c162855742a2d9eeebc0cd70fe48d2cd125 20-Oct-2017 Chia-I Wu <olv@google.com> surfaceflinger: remove USE_HWC2

Remove USE_HWC2 and assume it to be true. Remove all !USE_HWC2
code.

This also fixes a compile error in tests/fakehwc, which never
defines USE_HWC2.

Test: boots taimen and hikey960
Change-Id: Ie6d2fcf884aa6fc715ab0ce19a1e0f7c8acf734c
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
6461806da8d8f0677ce337700153e5a972c36593 02-Aug-2017 Courtney Goeltzenleuchter <courtneygo@google.com> Fix build error from diamond merge

Somehow between various merges on master and oc-dr1-dev
master ended up in bad state.
CL's involved are:
cd939aa6622430 Fix build for non-HWC2 targets (master)
281e8113d0ce Communicate composition buffer dataspace to HWC (oc-dr1-dev)
79d272442ce13 Communicate composition buffer dataspace to HWC (master)
I think 281e got merged into master and re-introduced the change that
was fixed by cd93.
Test: make

Change-Id: I087244348392098f516905eb1cebebf0362fcc20
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
d0bdfcb261c4c27cb048ea4abd9e0cd67454bbf5 02-Aug-2017 Courtney Goeltzenleuchter <courtneygo@google.com> Merge changes If4271719,I9c9b5de9,I46a26a67 into oc-dr1-dev am: ddd9c71272 am: e124f74dff
am: 346203f942

Change-Id: Ied0a2337150aaf982833dc99dacb7015ae0fa01e
281e8113d0ce20c702e847caf971663021eb65e3 14-Jul-2017 Courtney Goeltzenleuchter <courtneygo@google.com> Communicate composition buffer dataspace to HWC

Test: adb shell dumpsys SurfaceFlinger
look for dataspace info in DisplayDevice section
Bug: 63146977
Change-Id: If427171994fbc91faacf5bad9cc736ddfbd35ec3
(cherry picked from commit 79d272442ce13418c3ea81c95d7fea0159b4b481)
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
cd939aa6622430482d2c79bb9deefb67d3ee4611 25-Jul-2017 Courtney Goeltzenleuchter <courtneygo@google.com> Fix build for non-HWC2 targets

Fix build error introduced by ag/2528660
Test: lunch mini_x86-userdebug; make

Change-Id: I39b758c6456a6f334479ec4aed97db1659823a8b
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
79d272442ce13418c3ea81c95d7fea0159b4b481 14-Jul-2017 Courtney Goeltzenleuchter <courtneygo@google.com> Communicate composition buffer dataspace to HWC

Test: adb shell dumpsys SurfaceFlinger
look for dataspace info in DisplayDevice section
Bug: 63146977
Change-Id: If427171994fbc91faacf5bad9cc736ddfbd35ec3
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
19987a8cb2ca05e45876946b1eab66cc9d1f9a77 14-Jul-2017 Courtney Goeltzenleuchter <courtneygo@google.com> Dump FramebufferSurface dataspace

For debugging, dump the dataspace details for the
FramebufferSurface. Value will be 0 (UNKNOWN) if HWC is
doing composition.
Test: adb shell dumpsys SurfaceFlinger
Look for FramebufferSurface details.
Bug: 63146977

Change-Id: I9eb40739a616246bdac6e039270609d42eb56b59
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
0556d79eacbf0c9978080d87aa4075120533c7ef 22-Mar-2017 Mathias Agopian <mathias@google.com> get rid of IGraphicBufferAlloc

Buffers can now be allocated directly through
the graphic allocator HAL.

Test: marlin: run full camera cts
Test: angler: take screenshot, take photo w/ and w/o HDR, video, panorama, refocus, slo-mo
Bug: 36462585
Bug: 36333314
Change-Id: Ie5222c53c3b9462e0ac7a41568718aad131eb328
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
1971b63aa4d82db37794f19e0eb01feb1826e422 10-Mar-2017 Fabien Sanglard <sanglardf@google.com> Use max acquired buffer setting to configStore

Change-Id: I48454243bcac12f5a83d080cd9115686f9f728ca
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
f8b4ca51111cd2e566d1774ac464da859db78976 16-Mar-2017 Romain Guy <romainguy@google.com> Revert "Get rid of IGraphicBufferAlloc"

This reverts commit 78491c9f694cb0767996503c629776a8eda950d7.

Change-Id: I78d5c0a30ab80265f697f681387872b6763b2d1e
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
78491c9f694cb0767996503c629776a8eda950d7 15-Mar-2017 Mathias Agopian <mathias@google.com> Get rid of IGraphicBufferAlloc

This reverts commit 527747dce1ab4714bd424e5c1a25ebad3506c2cb.

selinux policy allowing this change fixed.

Test: took a screenshot
Test: ran ImageReaderTest CTS
Bug: 36194109
Change-Id: I72ac17b6c252750aa2a66cd1d94bd8b4e21b5e9d
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
975e49a2ae848ef7d2b9d9ad8ea1afad656f037b 13-Mar-2017 Chia-I Wu <olv@google.com> Merge "Revert "get rid of IGraphicBufferAlloc""
527747dce1ab4714bd424e5c1a25ebad3506c2cb 13-Mar-2017 Chia-I Wu <olv@google.com> Revert "get rid of IGraphicBufferAlloc"

This reverts commit 1da94dfed674e94edc37cdc8ef68530520edf169.

Bug: 36176799
Bug: 36175706
Change-Id: I6dd5fe8df564f0efa4392a800fb316e27a05076e
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
aaff73f92a2fcadda8c765eb9b02f2849418a873 13-Feb-2017 Chia-I Wu <olv@google.com> surfaceflinger: simplify HWC buffer cache clean up

When a Layer is no longer connected, we destroy the associated HWC
layers on next call to SurfaceFlinger::rebuildLayerStacks or when
the Layer is destroyed. There is no need to listen to
onBuffersReleased. Besides, we need to perform the cleanup from the
main thread as we only talk to HWC process from the main thread.

While at it, move HWComposerBufferCache to its own files.

Bug: 35320590
Test: manual
Change-Id: Ifa32f24076b094c8fa9cda8572b03d5bfb8e0b93
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
1da94dfed674e94edc37cdc8ef68530520edf169 28-Feb-2017 Mathias Agopian <mathias@google.com> get rid of IGraphicBufferAlloc

buffers can now be allocated in-process.

Test: compile & run
Bug: cleanup
Change-Id: I3d4317a9bed20a6d8be2b7ac8fbb85738efb3657
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
a9347647eca3101c014be902b713772de3977d87 14-Feb-2017 Mathias Agopian <mathias@google.com> Break a dependency of libui on libandroid

This was only a header dependency, but it still
created a circular dependency, which will cause
problems in another CL.

We fix this by creating a libarect static library
containing only that header. both libui and
libandroid now depend on it and reexport the
header.

We also make sure rect.h ends-up in the right
place.

Test: built and booted device
Bug: 35164655

Change-Id: Iba25b8b801b26b26ec1401c00caf367a06f197ca
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
06d63de03cb2a551ca99608f5aa0c4f3e200b0fc 04-Jan-2017 Chia-I Wu <olv@google.com> surfaceflinger: cache HWC client targets and buffers

Remember HWC client targets and buffers, and make sure we send each
unique slot/handle pair only once. This allows the composer to
clone/register/retain each buffer only once.

Test: builds and boots
Change-Id: Ib485189043a9c132031e82d4d7380ace3bf9453d
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
e0ea99cc4ba89452b9b6b1baa33bddcb11f3351a 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of a2c2d11f9 to master

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I84d0ffa430df3beca0dcc6ed205ce220d7be1f87
7823e124e00576e20e47ec717cbe8bc89f0f2bf2 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if possible
- add system includes that are assumed as side effects
- define LOG_TAG first

Test: compile
Bug: 31289077
Bug: 30465923
Change-Id: I8d99b24c333578c9b5aa9f2a01324bd0bba268dd
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
c03d283e8b3f830d76dd94822b2a13872c05c730 28-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 525a5f2 to master

Test: build
Change-Id: Id1c6d3d9dd158fb086b0d8ab74f7838ef0a51af1
a5e161b1207ef447a51e99856097d69d4a6111e1 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if required
- add system includes that are assumed as side effects of log.h
- modules that use SLOG should use SLOG for all logging (installd)
- define LOG_TAG first
- remove logging infrastructure if not used

Test: build
Bug: 31289077
Change-Id: Iea147a0104c7ab7f12451304131d6500f42141e7
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
11d0fc38ad8d2e5bb5bc0a282336cabe28dbf9d6 02-Dec-2016 Fabien Sanglard <sanglardf@google.com> Rename "retire" to "present" for consistency

The HWC2 model has no concept of retire fence beyond HWC2to1Adapter
All references to "retire" fence should be called "present"

Change-Id: I26540aad9e65f138a4df60a34eaee030f1c17567
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
9d96de49673cb6c916bfb797aad4f4e024ea73ca 11-Oct-2016 Fabien Sanglard <sanglardf@google.com> Revert "Delete HWC1"

This reverts commit 90f923493fa053655a203c34ea491086aeb07602.

Change-Id: If9da49e3bc85f8ff21ac1bd22a6bab97e9aa3103
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
90f923493fa053655a203c34ea491086aeb07602 03-Oct-2016 Fabien Sanglard <sanglardf@google.com> Delete HWC1

After 10 years of good service, HWC1 is not needed anymore since HWC2
is now mandatory.

Change-Id: I5768b50c89854688ba31032f01ea231699393e5b
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
5fa1223322175356e6ac943cb06d8b1e1cfc39d9 27-Sep-2016 Colin Cross <ccross@android.com> Rename dump methods to dumpState

The dump methods shadow the IBinder dump method. The warnings were being
hidden by the use of -isystem to include frameworks/native/include.

Bug: 31752268
Test: m -j
Merged-in: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
Change-Id: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
3d1d280fa3cbc30700f728a4b13e5308315433d3 27-Sep-2016 Colin Cross <ccross@android.com> Rename dump methods to dumpState

The dump methods shadow the IBinder dump method. The warnings were being
hidden by the use of -isystem to include frameworks/native/include.

Bug: 31752268
Test: m -j
Change-Id: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
40845df1285b387bcbf8f43ac72228eee2606d80 26-Jan-2016 Pablo Ceballos <pceballos@google.com> SF: Add FenceTracker

FenceTracker tracks all fences in SurfaceFlinger. These timestamps
could be used for debugging, profiling, or be exposed to the
application.

Change-Id: I4297a661c0a7530e744168ac7a2a66c4bca92fd5
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
9e56aa0fdb5f7121b9b975c6c16db103ea4d2fe9 02-Nov-2015 Dan Stoza <stoza@google.com> Switch SurfaceFlinger to HWC 2.0

Enables SurfaceFlinger to speak to version 2.0 of the Hardware Composer
HAL instead of version 1.x (also removing support for the framebuffer
HAL). By default, however, this functionality is disabled. In order to
enable it, USE_HWC2 must be set to true in Android.mk.

Change-Id: I4589e02ac2165236b10ff2f7cb772f87e0d3daab
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
ff12cba77b5b88f3978070bb970d7721225271ee 16-Sep-2015 Pablo Ceballos <pceballos@google.com> Merge "BQ: Modify consumer buffer count interfaces"
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/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
47650f4f66a49e1815ad08ca4fb12a661d133abc 05-Aug-2015 Pablo Ceballos <pceballos@google.com> native: Rename mBuf to mSlot

Remove the union in BufferItem.

Bug: 19769719
Change-Id: I4e496b5aafce0fc5206dc7551a741f9c262c2cd0
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
84493cd420d3d53a16ae7c745ed38afffb4e67f5 12-Mar-2015 Dan Stoza <stoza@google.com> SurfaceFlinger: Stop using IGBC::BufferItem

Switches all uses of IGraphicBufferConsumer::BufferItem (and
BufferQueue::BufferItem) to the BufferItem in libgui. Depends on
frameworks/native I699ed0a6837076867ca756b28d1ffb2238f7a0d9.

Change-Id: I187b3a7d05196b6289596afac8fb9a9d4aebff76
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
f10c46ef855b6410b20ebd8b1351d4d78d8eca8e 11-Nov-2014 Dan Stoza <stoza@google.com> Enable clang for libui/libgui/surfaceflinger

Enables clang and C++11 for libui/libgui/surfaceflinger, and
eliminates all compile-time warnings.

Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f
/frameworks/native/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
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