Commit Graph

51723 Commits

Author SHA1 Message Date
Dan Stoza 8de71a2408 Merge "BufferQueue: Add NATIVE_WINDOW_BUFFER_AGE query" 2015-04-29 17:21:51 +00:00
Dan Stoza ca8c569598 Merge "libgui: Implement onTransact for sideband streams" 2015-04-29 17:17:52 +00:00
Nick Kralevich becd89d185 Merge "Parcel.cpp: use calloc instead of malloc" 2015-04-29 04:16:23 +00:00
Nick Kralevich 6329f0199e Parcel.cpp: use calloc instead of malloc
Bug: 20669363
Change-Id: Ia4c8d8ca9d8b4b87954d7267e8b1c94cf4e570e1
2015-04-28 16:21:30 -07:00
Dan Stoza 81cde67a55 BufferQueue: Add NATIVE_WINDOW_BUFFER_AGE query
Adds a NATIVE_WINDOW_BUFFER_AGE query, which returns the age of the
contents of the most recently dequeued buffer as the number of frames
that have elapsed since it was last queued.

Change-Id: Ib6fd62945cb62d1e60133a65beee510363218a23
2015-04-28 14:26:05 -07:00
Dan Stoza 17166698d9 libgui: Implement onTransact for sideband streams
Implements the GET_SIDEBAND_STREAM case of
IGraphicBufferConsumer::onTransact

Change-Id: I46138b87ce2d70dde48b3561dcd378ce5fd8f383
2015-04-28 13:23:18 -07:00
Dan Stoza b5c7ccfdc7 Merge "libgui: Change detachNextBuffer to return sp<GB>" 2015-04-28 17:36:54 +00:00
Dan Stoza 745ac038b9 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
2015-04-27 11:16:15 -07:00
Andreas Gampe bec3de4ac5 Merge "Installd: Add debug.gencfi to run_dex2oat" 2015-04-27 15:14:43 +00:00
Andreas Gampe 816243d470 Installd: Add debug.gencfi to run_dex2oat
Add the debug.gencfi system property that forces generation of
CFI data.

Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
2015-04-27 08:12:23 -07:00
Michael Wright 7ecc8952c4 Merge "Check orientation range has been initialized first" 2015-04-27 14:13:22 +00:00
Dan Stoza 958f501189 Merge "libgui: Allow an IGBProducer to disable allocation" 2015-04-24 15:50:10 +00:00
Dan Stoza fb6d43ff44 Merge "libgui: Change BufferQueue to use free lists" 2015-04-24 15:48:38 +00:00
Dan Stoza 56f1f16c7b Merge "libgui: Fix some bitrot/warnings in tests" 2015-04-23 22:56:37 +00:00
Dan Stoza 82e4d49b0e Merge "libui/libgui: Fix errors in parceling" 2015-04-23 22:51:01 +00:00
Dan Stoza 9de7293b0a libgui: Allow an IGBProducer to disable allocation
Adds a new method IGBP::allowAllocation, which controls whether
dequeueBuffer is permitted to allocate a new buffer. If allocation is
disallowed, dequeueBuffer will block or return an error as it
normally would (as controlled by *ControlledByApp).

If there are free buffers, but they are not of the correct dimensions,
format, or usage, they may be freed if a more suitable buffer is not
found first.

Bug: 19801715
Change-Id: I0d604958b78b2fd775c2547690301423f9a52165
2015-04-23 15:28:12 -07:00
Dan Stoza 0de7ea7529 libgui: Change BufferQueue to use free lists
BufferQueue used to choose free buffers by scanning through its array
of slots and picking one based on timestamp. This changes that
mechanism to use a pair of free lists: one with buffers attached and
one without. This makes it easier to choose either type of free slot
depending on the needs of the current operation.

Fixes an issue with the first version of this change, found in bugs
20482952, 20443314, and 20464549.

Bug: 13175420
Change-Id: I9b6e83cfe8f9b4329a976025cb8e291d51fb6d4a
2015-04-23 13:25:11 -07:00
Dan Stoza de5c15b8bd Merge "SF: Always perform sideband transactions" 2015-04-22 23:57:28 +00:00
Dan Stoza 9e9b044554 SF: Always perform sideband transactions
On normal Layers, we defer applying resize transactions until a buffer
of the correct size arrives. This breaks with sideband streams, because
buffers are not seen by SurfaceFlinger. This change applies
transactions immediately for Layers which have a sideband stream
attached to avoid that problem.

Bug: 20428254
Change-Id: I379d8aaef460d467cdf8432764b4a504928fb65a
(cherry picked from commit c300b8b506536e1bf94ffd8a3b75d46e776923e0)
2015-04-22 16:53:15 -07:00
Dan Stoza 7637e35d17 Merge "Revert "libgui: Change BufferQueue to use free lists"" 2015-04-22 18:59:02 +00:00
Dan Stoza 1fc9cc25a4 Revert "libgui: Change BufferQueue to use free lists"
This reverts commit 8dddc99010.

Change-Id: I0b0fed9f1394c6f6ae812f6c562ead4473a8226e
2015-04-22 18:57:39 +00:00
Dan Stoza e647dddebb Merge "libgui: Fix CPU rendering on Surface" 2015-04-22 00:07:52 +00:00
Dan Stoza c62acbd127 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
2015-04-21 16:56:52 -07:00
Dan Stoza f8cebe5457 libgui: Fix some bitrot/warnings in tests
These tests hadn't been run in a while and had accumulated some rot.
This fixes most of the compile warnings and some tests which fail
incorrectly, but 2 failures remain on N6.

Change-Id: I7fee78cd058a32f4d7df40ec9f899ff767f68517
2015-04-20 13:17:23 -07:00
Dan Stoza eea6d682b8 libui/libgui: Fix errors in parceling
BufferItem and GraphicBuffer were not parceling correctly, which had
not been noticed because the libgui tests (specifically, one that
tests placing a BufferQueue in a separate process from the IGBP/C)
had not been run recently. This change fixes the errors found in
those classes.

Change-Id: Ie224361a534a79115a3481d83ff97f21d154d4f5
2015-04-20 13:17:22 -07:00
Dan Stoza ff5c1a6b67 Merge "libgui: Change BufferQueue to use free lists" 2015-04-20 20:14:14 +00:00
Dan Stoza 8dddc99010 libgui: Change BufferQueue to use free lists
BufferQueue used to choose free buffers by scanning through its array
of slots and picking one based on timestamp. This changes that
mechanism to use a pair of free lists: one with buffers attached and
one without. This makes it easier to choose either type of free slot
depending on the needs of the current operation.

Bug: 13175420
Change-Id: Ic8398e7511bd11a60a1c82e3ad2ee271c9822be1
2015-04-17 09:28:41 -07:00
Dan Stoza 2e398e64b3 Merge "SF: Permit changing DispSync offsets at runtime" 2015-04-15 21:37:19 +00:00
Dan Stoza db4ac3ce63 SF: Permit changing DispSync offsets at runtime
This modifies EventThread such that its phase offsets for both
Choreographer and SurfaceFlinger may be modified at runtime. It also
plumbs this functionality up to the SurfaceFlinger debug interface so
that it is possible to rapidly test different offsets without
restarting the framework.

Change-Id: I426873f8553f931250dfebc9a8a4a78e9f1f4309
2015-04-15 13:56:28 -07:00
Dan Stoza e7d20eb000 Merge "SurfaceFlinger: Pass surface damage to HWC" 2015-04-15 20:34:51 +00:00
Dan Stoza fd5f41bee9 Merge "libgui: Pass surface damage through BufferQueue" 2015-04-15 20:26:55 +00:00
Dan Stoza ee44edd0ac SurfaceFlinger: Pass surface damage to HWC
Passes the surface damage from the incoming SurfaceFlingerConsumer
BufferQueue down to the hardware composer HAL interface, if the
HWC version number is 1.5 or greater.

Bug: 11239309
Change-Id: Ic4305210593874a8d6deba3319055b2b8c57e926
2015-04-15 13:20:01 -07:00
Dan Stoza 5065a55291 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
2015-04-15 13:19:38 -07:00
Dan Stoza 4d769d8bdc Merge "libui: Clean up Fence and Region flattening" 2015-04-15 20:13:53 +00:00
Dan Stoza 22412a34c6 Merge "libEGL: Add wrappers for partial update functions" 2015-04-15 20:08:36 +00:00
Dan Stoza 6fbefbbd8e libui: Clean up Fence and Region flattening
Fence was flattening incorrectly, causing issues with any fields
flattened after it, and Region was relying on being the last object
flattened. This change addresses both.

Change-Id: If49de061de6e2f11f4d846b4d8c18627dfb7e109
2015-04-15 13:04:15 -07:00
Dan Stoza a894d082cf libEGL: Add wrappers for partial update functions
This adds EGL wrapper functions for the following EGL extensions:
    EGL_EXT_buffer_age
    EGL_KHR_partial_update
    EGL_KHR_swap_buffers_with_damage

Change-Id: I407acda1e0310f7f01a5efe9c915721a941138a4
2015-04-15 13:02:27 -07:00
Dan Stoza a3f8c2aaf1 Merge "Fix a memory corruption issue when vector resize" 2015-04-14 17:50:39 +00:00
baik.han 18a81488f9 Check orientation range has been initialized first
To avoid nan or infinity when orientation value is used for
calculation without being initialized, check mOrientedRanges.haveOrientation
value before using mOrientedRanges.orientation.min or .max value.

Change-Id: I68ed9ab36819c5faa6422e9f061e1275aeed11e3
Signed-off-by: Baik Han <baik.han@lge.com>
2015-04-14 19:49:28 +09:00
Jeff Sharkey dfc30ae393 Merge "Command to move private app data between volumes." 2015-04-10 21:00:51 +00:00
Jeff Sharkey e363724230 Command to move private app data between volumes.
New "mvuserdata" command will move all private app data from one
volume UUID to another.  It leverages the existing "cp" toybox
command to do the heavy lifting for all known users, preserving
details like timestamps and permissions.  It invokes restorecon()
to correctly label the new location when the copy is finished.

Changes installd to no longer drop capabilities, so we run as root
again.  This also allows us to exec "cp" with CAP_DAC_OVERRIDE and
CAP_FOWNER still in effect.

Bug: 19993667
Change-Id: I1f407a7c4a1af97ca5afc27b04eb16b4936cbdef
2015-04-10 00:21:35 -07:00
ywen aef0445c6f Fix a memory corruption issue when vector resize
There is memory corruption in below code

const Rect* prev = &dst[prevIndex];
dst.add(Rect(prev->right, top, right, bottom));

prev points to a memory of vector dst, when dst resize in add()
call, the memory that prev points to will be copy to the new
allocated vector memory and the old memory will become undefined

Avoid pointer in this case, use a local copy instead

Change-Id: I4d95ceedd00c8fb615ac153082ade1b1ce0d0fa8
2015-04-10 11:59:52 +05:30
Jeff Sharkey 44a38d9337 Merge "Start accepting volume UUIDs from framework." 2015-04-09 21:41:15 +00:00
Jeff Sharkey 6fe28a0601 Start accepting volume UUIDs from framework.
We're now parsing and passing through volume UUIDs sent across the
command socket.  The "!" argument value is treated as null, which
means internal storage.

Bug: 19993667
Change-Id: I17729a769ce687a2e94e85991a6338c77ded0b66
2015-04-09 14:15:55 -07:00
Jeff Sharkey 066fadb983 Merge "More volume UUID awareness." 2015-04-09 19:45:04 +00:00
Jeff Sharkey 41ea424413 More volume UUID awareness.
Teach free_cache() and restorecon_data() about building per-volume
paths.  Also clean up restorecon_data() by using std::string when
building paths.

Clearer names for path building utility methods, and tests to verify.

Bug: 19993667
Change-Id: Iacfbcdaa5b901cc2490bc8eba366dfdeb44f1d93
2015-04-09 11:44:06 -07:00
Andreas Gampe f9ab2ad2d5 Merge "Installd: Fix Clang build" 2015-04-09 16:55:48 +00:00
Andreas Gampe 0ad7a11003 Installd: Fix Clang build
Remove some unused parameters and variables.

Change-Id: I507ae48fe1744b800ceb29192d463fd26c2ccda7
2015-04-09 09:54:35 -07:00
Jeff Sharkey d107c305f7 Merge "Plumb through volume UUID when building paths." 2015-04-09 16:27:19 +00:00
Richard Uhler ab91d03b0d Merge "installd: Add support for SELF_PATCHOAT_NEEDED." 2015-04-09 14:13:27 +00:00