Commit Graph

3091 Commits

Author SHA1 Message Date
Byunghun Jeon 987034b563 SurfaceFlinger: Native changes to add blur effect
Native changes to add blur-behind and blur mask effect

Change-Id: I54faf82d750e8299de6d261f6a893ab26d08df84

SurfaceFlinger: Adding template for LayerBlur files

Change-Id: I444009113b7bdd6c5284863fd1f56358e67d9fe6

SurfaceFlinger: Featurize libuiblur module for OSS build

Change-Id: Ifdc176e699434125d17b111c044b8ba954cf717c
2015-11-08 01:07:13 -08:00
Ricardo Cerqueira 1cdd1b5ad2 Android 6.0.0 release 26
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlYxAgIACgkQ6K0/gZqxDnjCqACfbBT6VOiUFQvRn7w1SAa+4rjF
 1IwAn2rBUqWo0dOKVwF1DDfFmGZXc8SB
 =1BqV
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.0_r26' into HEAD

Android 6.0.0 release 26

Conflicts:
	include/android/input.h

Change-Id: Ifa374c6d3055be3b8a5d60967f8b4c0043da739b
2015-11-05 01:41:42 +00:00
Ricardo Cerqueira 60c26d1f27 Android 6.0.0 release 5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlYyZAgACgkQ6K0/gZqxDng/ZgCfUJK3qqr1BvYmWlGZsQ4+taVP
 6NEAnRLWjoF9kSyraCa/VG+w2tUrS80Y
 =xUfb
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.0_r5' into cm-13.0

Android 6.0.0 release 5
2015-11-03 23:27:50 +00:00
Christopher N. Hesse f3f3949b32 binder: MemoryHeapIon: fix unused parameters
Using the __attribute__((unused)) preprocessor directive

Change-Id: I29d27fd7eacb962ffa06ccd81ee48b48f3743243
(cherry picked from commit 047c69bb8e17eab6f3432fae200fe94f7e119755)
2015-11-02 17:30:14 +01:00
codeworkx af2d946f2d binder: Squashed commit of MemoryHeapBaseIon
Source:
http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/native/commit/?h=exynos-jb&id=dc4cd25cc41e4358debd0c7d1a2706d208a58df6

Change-Id: Ib06cc37a2a25c78a061ee2bad48eec2d01b07833

binder: update MemoryHeapIon

* Update from ODROID-XU 09232013 BSP release

Change-Id: I5245c8a9f783e8902bf91a0ee23e60ebeb335b27

binder: update MemoryHeapIon

* Update from ODROID-XU 04212014 BSP

Change-Id: Ifc2664bcde37a71d855e05e7c9e50288a4508892

binder: Fixed new CM SLSI build variant

Change-Id: Icfff592cf705af660c7318b08fce75dbbf42103c
(cherry picked from commit 014ad5eee0a7de70c4a9f66e8f5ce7b32f4ecb16)
2015-11-02 17:29:40 +01:00
Praveen Chavan c784dfc39f libgui: assign handle to NULL after free
to avoid use-after-free situations

Change-Id: If9c09f509bc55795856302e5ca34470df019c622
2015-10-31 03:19:42 -07:00
Adrian Roos 6bb3114246 Maintain Parcel ABI
Makes sure we don't change the memory layout of the Parcel class
to maintain binary compatibility with prebuilts linking against
libbinder.

Bug: 25004154
Change-Id: I656687497f08bb85cefda796aafa2341e601e30a
2015-10-22 17:48:16 -07:00
Adrian Roos cbf3726357 Revert "Revert "Track ashmem memory usage in Parcel""
This reverts commit 6880307e8e.

Bug: 25004154
Change-Id: I9b432d1ebc39f3bbcd7afdefc403f0fb6ced8158
2015-10-22 17:47:27 -07:00
Flanker a82ace99f7 add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am: 9964d83869 am: 90dc6dc825
am: 9830f11dc6

* commit '9830f11dc6b6aa4001c79147966fdb9eaa71c2f2':
  add number constraint for samples per MotionEvent
2015-10-22 22:28:01 +00:00
Ian Pedowitz 6880307e8e Revert "Track ashmem memory usage in Parcel"
This reverts commit e2f499fb73.

Bug: 25169267
Bug: 25191602
Bug: 25004154
Change-Id: I24bb0da4e8739ee5a0c251e4adac9904827144e0
2015-10-22 22:09:16 +00:00
Flanker 9830f11dc6 add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am: 9964d83869
am: 90dc6dc825

* commit '90dc6dc825ebd1f0f4c9474fad887cd7eac8e9bd':
  add number constraint for samples per MotionEvent
2015-10-22 02:15:13 +00:00
Flanker 90dc6dc825 add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01
am: 9964d83869

* commit '9964d83869565cf4dda432129cfe50f6ede19338':
  add number constraint for samples per MotionEvent
2015-10-22 02:10:12 +00:00
Flanker 9964d83869 add number constraint for samples per MotionEvent am: 5d17838ade
am: 72c8ca4a01

* commit '72c8ca4a0191827fd3265c0820b685a6cf420be1':
  add number constraint for samples per MotionEvent
2015-10-22 02:04:55 +00:00
Flanker 72c8ca4a01 add number constraint for samples per MotionEvent
am: 5d17838ade

* commit '5d17838adef13062717322e79d4db0b9bb6b2395':
  add number constraint for samples per MotionEvent
2015-10-22 02:02:46 +00:00
Adrian Roos e2f499fb73 Track ashmem memory usage in Parcel
Bug: 25004154
Change-Id: Id9d5656dd0605f1b50525596b75601309f67ebdc
2015-10-21 22:32:35 +00:00
Flanker 5d17838ade add number constraint for samples per MotionEvent
Bug:23905002

Signed-off-by: Adam Lesinski <adamlesinski@google.com>

(cherry picked from commit 552a8a5d8d)

Change-Id: I9b7ea859889b7697bee4165a2746602212120543
2015-10-20 12:28:15 -07:00
Ricardo Cerqueira f4fac7e93f Support forcing all screenshots into a CPU consumer
Looks like a full GPU path is less efficient on some GPU
drivers that we're still using, and CPU is reliably faster...
(there's probably a locking condition going on somewhere, this
needs to be looked into)

Change-Id: I8878796a117d65bf2324507cf8755cadce49f6dc
2015-10-16 14:45:55 -07:00
Pawit Pornkitprasan fd1fb639a1 Bring back support for glReadPixels screenshot path
Squashed commit of the following:

commit 012d3fe41d1d6cd38a0858b59145e9a4447641fa
Author: Hashcode <hashcode0f@gmail.com>
Date:   Sun Dec 8 19:36:50 2013 +0000

    sf: Always use opengles for screen capture

    Go back to the usage of GRALLOC_USAGE_HW_TEXTURE and GRALLOC_USAGE_HW_RENDERER
    in captureScreenImplLocked regardless of useReadPixels value

    This fixes the EGL_NO_IMAGE_KHR error returned from
    eglCreateImageKHR (blank images returned from screenshot path)

    Change-Id: I62fe90a081607b9e89c67f3dcfd34c84efc89d35

commit 4866ddf98ac98d8e22a1cd6a21894bb17f274588
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Oct 31 03:53:39 2013 +0000

    Revert "remove support for glReadPixels screenshot path"

    This reverts commit 3ca76f416b.

    Conflicts:
    	include/gui/ISurfaceComposer.h
    	libs/gui/ISurfaceComposer.cpp
    	libs/gui/SurfaceComposerClient.cpp
    	services/surfaceflinger/SurfaceFlinger.cpp
    	services/surfaceflinger/SurfaceFlinger.h

    Change-Id: I8c239e533757af770e418dbb198f5a86c736961f

Change-Id: I8c239e533757af770e418dbb198f5a86c736961f
2015-10-16 14:45:10 -07:00
Ricardo Cerqueira e3fc10fbb7 exynos4: getphys implementation on buffermanager for samsung omx
Change-Id: I73d9633e1a7b3316ede28dd1369f8f069609cbb0
2015-10-15 11:35:09 -07:00
Aravind Akella 2ac7405bda Merge "Set DATA_INJECTION mode flag for sensors." into mnc-dr-dev 2015-10-14 21:03:07 +00:00
Adam Lesinski 16b0ae105e Merge "add number constraint for samples per MotionEvent" into mnc-dr-dev 2015-10-12 22:15:50 +00:00
Flanker 552a8a5d8d add number constraint for samples per MotionEvent
Bug:23905002
Change-Id: Ifd24802977c3dcdd1dbc5120a78aac41beae4603

Signed-off-by: Adam Lesinski <adamlesinski@google.com>
2015-10-12 11:22:37 -07:00
Puneet Kumar 2f3c3eb4e4 Merge "Allow defining replacement key events in keymap" into mnc-dr-dev 2015-10-08 08:16:31 +00:00
Baldev Sahu a1288c979d libgui: Copyback all region except dirty region for newly allocated buffer
Inside Surface::lock if new buffer is allocated
and DirtyRegion does not cover complete buffer
bounds then copyback may not cover all remaining area
as it copyback only area covered by dirty regions
from other buffers. This will lead to left out
black area which may cause flicker.

Change-Id: I4a3f7a56fc5fbaf4af926584919577d8d34bed57
2015-10-06 03:22:27 -06:00
Omprakash Dhyade 8760f1673e fix copy back dirty region
Copyback dirty region logic does copyback,
even when its not necessary causing 2ms delay.
Fix the logic to copy back only what is necessary

CRs-fixed: 562334
Change-Id: I52de68258ac9f87d704ee5401f93417805fa6773
2015-10-06 03:22:27 -06:00
Andrew de los Reyes de18f6c32a InputResampling: Don't extrapolate for very low frame rates.
In very low framerate situations, extrapolation is generally going to
either cause no benefit or make a mistake. We can safely turn it off
with no user-visible negative impact.

BUG=https://buganizer.corp.google.com/u/0/issues/24550942
TEST=Scrolled very slowly and saw mispredictions on Angler. With change,
saw the log message that the mispredictions were suppressed.

Change-Id: Ic9747d3ff098d7918047ada2ed1c2d21282c65b0
2015-10-01 15:57:25 -07:00
Dmitry Torokhov 115f93eeeb Allow defining replacement key events in keymap
Currently keyboard maps allow to assign character sequences to key
events and allow specifying a so-called "fallback" key events that are
re-injected into input stream if target application indicates that it
was not able to handle the original key event. Unfortunately there is no
way to perform substitution before handing the event to applicationis.

This change adds a new keymap keyword "replace" that allows users query
"replacement" actions for key (if any), with the intent that such
replacement happens early in the event handling process.

Bug: 24504154

Change-Id: I3e6a2476c856524171df00ad22ff56f2018c1278
2015-09-29 13:26:30 -07:00
Naveen Leekha 846d747274 Initialize local variables to avoid data leak
The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Partial manual merge of master change
 12ba0f57d028a9c8f4eb3afddc326b70677d1e0c. Rest
 to automerge from klp-dev)

For b/23696300

Change-Id: I704c9fab327b3545c58e8a9a96ac542eb7469c2a
2015-09-28 17:08:24 -07:00
Naveen Leekha b0127aadaf am 69412a51: am c4bd7211: resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
* commit '69412a51f58fa9450f1cb077c8d4b6410128d993':
  resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
2015-09-24 23:35:41 +00:00
Naveen Leekha 69412a51f5 am c4bd7211: resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
* commit 'c4bd7211373cf5b745c7d4f849f43f7a2d2b1141':
  resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
2015-09-24 23:27:31 +00:00
Naveen Leekha c4bd721137 resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
Change-Id: I543df164076b44578b14d41031800bb62b81586d
2015-09-24 15:55:21 -07:00
Naveen Leekha 83e60e4257 am 571e27e2: am e889592e: am 73887c08: am b414255f: Initialize local variables to avoid data leak
* commit '571e27e20e30560985d7c3a3ba8885693695b0fc':
  Initialize local variables to avoid data leak
2015-09-24 22:26:22 +00:00
Naveen Leekha 571e27e20e am e889592e: am 73887c08: am b414255f: Initialize local variables to avoid data leak
* commit 'e889592e33891c9b88ff6ba655426118f8ef12ee':
  Initialize local variables to avoid data leak
2015-09-24 22:20:59 +00:00
Naveen Leekha 7534e4e63a am 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak
* commit '18165848e86feab8656bfdac3173bccf45a9a6df':
  Initialize local variables to avoid data leak
2015-09-24 22:20:05 +00:00
Naveen Leekha e889592e33 am 73887c08: am b414255f: Initialize local variables to avoid data leak
* commit '73887c0864c9a928db6f66bd48c5aea4d31d9a8b':
  Initialize local variables to avoid data leak
2015-09-24 22:13:06 +00:00
Naveen Leekha 18165848e8 am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak
* commit 'e2c4f4fb8b34e36a4f2760f3812c942604cabfb6':
  Initialize local variables to avoid data leak
2015-09-24 22:04:48 +00:00
Naveen Leekha 73887c0864 am b414255f: Initialize local variables to avoid data leak
* commit 'b414255f53b560a06e642251535b019327ba0d7b':
  Initialize local variables to avoid data leak
2015-09-24 22:00:33 +00:00
Naveen Leekha e2c4f4fb8b am c1e6fbb5: Initialize local variables to avoid data leak
* commit 'c1e6fbb52c3f85cc7610d1d07d12be38f70b4ed4':
  Initialize local variables to avoid data leak
2015-09-24 22:00:13 +00:00
Naveen Leekha b414255f53 Initialize local variables to avoid data leak
The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Partial manual merge of master change
 12ba0f57d028a9c8f4eb3afddc326b70677d1e0c. Rest
 to automerge from klp-dev)

For b/23696300

Change-Id: I704c9fab327b3545c58e8a9a96ac542eb7469c2a
2015-09-22 18:04:44 -07:00
Naveen Leekha c1e6fbb52c Initialize local variables to avoid data leak
The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Manual merge of master change
 12ba0f57d028a9c8f4eb3afddc326b70677d1e0c )

For b/23696300

Change-Id: I665212d10da56f0803b5bb772d14c77e632ba2ab
2015-09-22 17:58:21 -07:00
Aravind Akella f9b7f8548e Set DATA_INJECTION mode flag for sensors.
Bug: 24001171
Change-Id: I70133546c68fb478b2c2062f05a4164a36cd9e4b
2015-09-11 11:33:49 -07:00
Prashant Malani e8293118b9 Add body sensors app op for custom sensors
If the custom sensor requires the BODY SENSOR permission, we should add
the body sensors app op for the custom sensor

Bug: 23396558
Change-Id: I132917d1bca12c76c8a9fb146e00951cba3e6d7a
2015-09-03 10:44:24 -07:00
Prashant Malani 13c638255f am e35c7d65: Add body sensors app op for custom sensors
* commit 'e35c7d65bb3c226fe3c5fc5e3933f64f0963eaeb':
  Add body sensors app op for custom sensors
2015-09-03 17:26:13 +00:00
Prashant Malani e35c7d65bb Add body sensors app op for custom sensors
If the custom sensor requires the BODY SENSOR permission, we should add
the body sensors app op for the custom sensor

Bug: 23396558
Change-Id: I132917d1bca12c76c8a9fb146e00951cba3e6d7a
2015-09-03 04:03:25 +00:00
Aravind Akella 8f35ca9730 SensorManager fixes.
i) Use pingBinder() to check the status of sensorservice everytime an
   event_queue is created. Retry to establish the binder connection if
   SensorService has recovered from a runtime restart.
ii) LOG_ALWAYS_FATAL_IF getService(SensorService) returns NULL or malloc
    returns NULL.

Bug: 22634472
Change-Id: I4e3912839b6f4114be1a124510878774dbd576a4
2015-08-25 11:24:02 -07:00
Aravind Akella e2806cb445 Bug fix in SensorManager.
If SensorService hasn't started when SensorManager instance is requested, keep retrying for a
longer duration.

Bug: 22529981
Change-Id: I3c506d962b61347085fc80b2c5832289539d6853
2015-07-30 19:05:21 +00:00
Narayan Kamath 8034fc63a0 Revert "Bug fix in SensorManager."
This reverts commit 869eb2089e.

Change-Id: I4fb865e3b18bbb011fa4e4b4732336930c3a45ae
2015-07-29 09:36:05 +00:00
Aravind Akella 869eb2089e Bug fix in SensorManager.
If SensorService hasn't started when SensorManager instance is requested, keep retrying for a
longer duration.

Bug: 22529981
Change-Id: I4ba6b760608e34d79273aeb39568f0fa72fbaf9d
2015-07-26 11:48:06 -07:00
Lajos Molnar 5f920c1a2c BufferQueueConsumer: signal onFrameReleased on dropped frames
Bug: 22552826
Change-Id: I9bdfeb8c68f403301af90d4b494f0ae7166a767c
2015-07-17 08:37:47 -07:00
Christopher Tate 134fd91bcc am 708b42e0: am eba7afcc: am 2f340be3: Disregard alleged binder entities beyond parcel bounds
* commit '708b42e0ee5ad97b8426a6245f73131ddfc59a33':
  Disregard alleged binder entities beyond parcel bounds
2015-07-02 01:55:43 +00:00
Christopher Tate dc3d6af97d am bb686c25: Disregard alleged binder entities beyond parcel bounds
* commit 'bb686c25b214edadd1830abd056db2d570d716ff':
  Disregard alleged binder entities beyond parcel bounds
2015-07-02 01:31:09 +00:00
Christopher Tate eba7afcc14 am 2f340be3: Disregard alleged binder entities beyond parcel bounds
* commit '2f340be345612d9fc2ecb1ea2a4c9e147610a593':
  Disregard alleged binder entities beyond parcel bounds
2015-07-02 01:28:56 +00:00
Amith Dsouza bbd4f23247 Merge "Revert "Revert "Modify EGL to disconnect the window when the surface gets destroyed.""" into mnc-dev 2015-07-01 17:45:05 +00:00
Aravind Akella 8719e3b631 Merge "Enable sensor data injection mode through adb." into mnc-dev 2015-07-01 17:40:08 +00:00
Amith Dsouza 4f21a4cc22 Revert "Revert "Modify EGL to disconnect the window when the surface gets destroyed.""
This reverts commit 6e1a2fea67.

Driver level issues fixed by an updated graphics driver.

Bug: 21266976
Change-Id: I93339fb6c6bab988f3550adb49ef8e70cda6473e
2015-07-01 10:22:22 -07:00
Aravind Akella 841a5926fc Enable sensor data injection mode through adb.
Change-Id: I415cf8ff0871fa74babaf9b879c68f210298b472
2015-06-30 14:59:58 -07:00
Chad Brubaker e59cb43eda Fix writeByteArray/writeInt32Array size on x64
writeByteArray writes the size using sizeof(size_t), however it is always
read using readInt32(). On devices where sizeof(size_t) != 4 this causes
extra bytes to be written.

BUG: 22204736
Change-Id: I8d4507b6b616857ef5827f1fe9da0907d09abf0e
2015-06-30 14:50:09 -07:00
Dan Stoza db4850c01f libgui: Fix handling of rotated surface damage
Incoming surface damage was not aware that the EGL implementation was
rotating buffers in response to SurfaceFlinger's transform hint. This
didn't affect all cases because the effect was to apply a 90 degree
rotation instead of a 270 degree rotation. For full-screen updates,
things more or less worked, but in other cases this caused corruption.

This fixes that by correctly undoing the effect of rotated buffers on
the incoming surface damage, and then passing that damage down
untouched to HWC.

Bug: 22068334
Change-Id: I226ecfc7a91fe2e16edd2aa6d9149f0d26b529d6
2015-06-25 16:10:18 -07:00
Christopher Tate bb686c25b2 Disregard alleged binder entities beyond parcel bounds
When appending one parcel's contents to another, ignore binder
objects within the source Parcel that appear to lie beyond the
formal bounds of that Parcel's data buffer.

Bug 17312693

Change-Id: If592a260f3fcd9a56fc160e7feb2c8b44c73f514
(cherry picked from commit 27182be9f2)
2015-06-24 20:46:58 +00:00
Christopher Tate 2f340be345 Disregard alleged binder entities beyond parcel bounds
When appending one parcel's contents to another, ignore binder
objects within the source Parcel that appear to lie beyond the
formal bounds of that Parcel's data buffer.

Bug 17312693

Change-Id: If592a260f3fcd9a56fc160e7feb2c8b44c73f514
(cherry picked from commit 27182be9f2)
2015-06-24 20:46:38 +00:00
Christopher Tate 1b8a2f82fe Disregard alleged binder entities beyond parcel bounds
When appending one parcel's contents to another, ignore binder
objects within the source Parcel that appear to lie beyond the
formal bounds of that Parcel's data buffer.

Bug 17312693

Change-Id: If592a260f3fcd9a56fc160e7feb2c8b44c73f514
(cherry picked from commit 27182be9f2)
2015-06-24 20:46:05 +00:00
Dan Stoza 2311608667 libgui/SF: Propagate SECURE Layer flag changes
This allows changes to the SECURE flag to propagate down to
Layers in SurfaceFlinger so that WindowManager can change it on the fly
in response to device policy updates.

Bug: 20934462
Change-Id: I558f6d22c6273be373f1f480365e42536af18a33
2015-06-18 15:11:20 -07:00
Dan Stoza 6cd8771c9c Merge "GLConsumer: Fix crop math" into mnc-dev 2015-06-11 17:12:49 +00:00
Dan Stoza ec4cb38750 GLConsumer: Fix crop math
When we have excess pixels that need to be removed from (for example)
the left and right sides, we currently do something like:

  left += excess / 2;
  right -= excess / 2;

If excess is odd, however, this removes 1 too few pixels since the odd
pixel gets rounded down twice. This changes the math to effectively:

  left += excess / 2;
  right -= (excess - excess / 2);

Which removes the correct total number of pixels.

Bug: 19611086
Change-Id: I8d1ad9fe7ba67c149794c148663d12acbccccef0
2015-06-10 10:24:51 -07:00
Christopher Tate ed7a50cc7d Prevent integer overflow when calculating buffer resizes
Make sure that we don't go haywire if an exponential buffer growth
operation winds up wrapping integer range.  Along the way, fix a
bookkeeping bug in BufferedTextOutput that would cause it to keep
spuriously realloc()ing on every append().

Bug 20674694

Change-Id: Ia845b7de36b90672a151a918ffc26c7da68e20a2
2015-06-08 14:49:09 -07:00
Christopher Tate 98e67d352b Don't corrupt parcel when writeFileDescriptor() fails
We now check for fd-legality before committing binder objects to
the flattened data buffer rather than after.  Previously we would
wind up corrupting the parcel and incurring driver-level errors,
as well as potentially leaking FDs.

Bug 21428802

Change-Id: Ice0d641b3dcc41fb1b8c68ce2e2ebd744c2863a1
2015-06-08 13:13:19 -07:00
Dan Stoza c6f30bdee1 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
2015-06-08 09:40:49 -07:00
Dan Stoza 5b36ea44c5 Merge "Revert "libgui: Add getConsumerName"" into mnc-dev 2015-06-08 16:30:15 +00:00
Dan Stoza a2ca9bf0a9 Revert "libgui: Add getConsumerName"
This reverts commit 107fbe5599.

Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
2015-06-08 16:30:08 +00:00
Dan Stoza 5b23b5bf45 Merge "libgui: Add getConsumerName" into mnc-dev 2015-06-08 16:21:03 +00:00
Jeff Brown 13b1604018 Enable more flexible usage of blobs in parcels.
Add functions to allow a client to take over the ashmem region
that was transferred so that it can claim it for its own and
reuse it.

Add support for mutable ashmem regions too.

Bug: 21428802
Change-Id: I16eca338cdb99b07d81fc43573d53ce86dbc60c8
2015-06-05 17:40:59 -07:00
Dan Stoza 107fbe5599 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
2015-06-05 15:01:58 -07:00
Dan Stoza 9d2c5a7c67 Merge "libgui: Add generation numbers to BufferQueue" into mnc-dev 2015-06-05 15:38:35 +00:00
Tim Kilbourn 9e6d2ee030 DO NOT MERGE Remove unused ParcelFileDescriptor methods in parcel.
Attempts to replicate Java parceling in native code is fraught with
peril.

Change-Id: I4359036c5dddd1b886d886beef1d060523e53e5f
(cherry picked from commit f47a381001)
2015-06-04 21:36:21 +00:00
Dan Stoza 812ed0644f 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
2015-06-03 11:09:33 -07:00
Ruben Brunk 7e5bb3701a Merge "Track camera and flashlight usage in battery stats." into mnc-dev 2015-06-02 01:48:25 +00:00
Christopher Tate 5a31f1abf6 Merge "Disregard alleged binder entities beyond parcel bounds" into mnc-dev 2015-06-02 01:05:47 +00:00
Ruben Brunk d47da60836 Track camera and flashlight usage in battery stats.
Bug: 15986092

Change-Id: I272ec070113a0bfc41c637c45a6e1a2ab346e87b
2015-06-01 16:55:07 -07:00
Dan Stoza 6a04e5fcf6 libgui: Propagate error by clearing sp<GB>
Clears the sp<GraphicBuffer> returned by createGraphicBuffer when there
is an error during unflattening.

Bug: 21498231
Change-Id: I886da4474fc06853cc59188d62044b7d7549126b
2015-06-01 13:59:15 -07:00
Dan Stoza da5a3f40a7 Merge "libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc" into mnc-dev 2015-06-01 16:30:35 +00:00
Michael Lentine 04b00cea67 Fix libgui crop matrix test.
On devices that have the crop image extension the crop is not applied to the
transform matrix so we have to expect different results in this case.

Change-Id: If62dec1111fb77c9fa2c4332d121665960ce0216
2015-05-29 16:26:36 -07:00
Dan Stoza b8efdc4003 libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc
Applies GRALLOC_USAGE_ALLOC_MASK to the incoming usage bits before
calling alloc on the gralloc module. This filters out the new flag
GRALLOC_USAGE_FOREIGN_BUFFERS, which is used to send a hint to the
producer, but which does not affect the allocation of buffers.

Bug: 19801661
Change-Id: Ia37a3eddba2e97598e50ac3e10877430adfa9247
2015-05-29 19:52:43 +00:00
Michael Lentine 6e1a2fea67 Revert "Modify EGL to disconnect the window when the surface gets destroyed."
This reverts commit 00699fa641.
2015-05-28 16:48:08 -07:00
Adam Lesinski d2fb7a6e49 am 8728c390: am 2c4f5fde: am 861c3f56: am 9004e7f5: am 4ff0cb44: Verify that the native handle was created
* commit '8728c390476110857dd6b290dac3bfdf13b33e81':
  Verify that the native handle was created
2015-05-28 22:30:05 +00:00
Adam Lesinski 8728c39047 am 2c4f5fde: am 861c3f56: am 9004e7f5: am 4ff0cb44: Verify that the native handle was created
* commit '2c4f5fdeca8e7a6f672bbcb8c25e6b81bf4eaa5b':
  Verify that the native handle was created
2015-05-28 21:44:36 +00:00
Adam Lesinski 2c4f5fdeca am 861c3f56: am 9004e7f5: am 4ff0cb44: Verify that the native handle was created
* commit '861c3f56157813627467054f488ecff7d339f2b0':
  Verify that the native handle was created
2015-05-28 21:11:44 +00:00
Adam Lesinski 861c3f5615 am 9004e7f5: am 4ff0cb44: Verify that the native handle was created
* commit '9004e7f5516c5b4a1b4178fa6a8bb4b3ca4ddcd0':
  Verify that the native handle was created
2015-05-28 20:40:46 +00:00
Adam Lesinski 9004e7f551 am 4ff0cb44: Verify that the native handle was created
* commit '4ff0cb4404db31576cd8a81ca5ef3b044d492904':
  Verify that the native handle was created
2015-05-28 20:26:02 +00:00
Christopher Tate 27182be9f2 Disregard alleged binder entities beyond parcel bounds
When appending one parcel's contents to another, ignore binder
objects within the source Parcel that appear to lie beyond the
formal bounds of that Parcel's data buffer.

Bug 17312693

Change-Id: If592a260f3fcd9a56fc160e7feb2c8b44c73f514
2015-05-27 19:20:15 -07:00
Dan Stoza 0e65e6c283 libgui: Fix surface damage on rotated buffers
Flips the width and height when the buffer comes in with a 90 degree
rotation so that performing the Y-flip from GL works correctly.

Bug: 20761426
Change-Id: I41c9edc8549c6cbdb534277b996ff20c59034582
2015-05-26 13:22:27 -07:00
Michael Lentine 01f9e920b0 Merge "Fix libgui tests." into mnc-dev 2015-05-22 20:16:01 +00:00
Michael Lentine d8ead0ccd4 Fix libgui tests.
Update IGraphicsBufferProducerTest to the new maximum enum value which is now
NATIVE_WINDOW_BUFFER_AGE. Update SurfaceTextureGLToGL_test to use the correct
counts for GraphicsBuffer refs.

Buf: 18138368

Change-Id: Ie2f7e00b414d63100b16944e3ab36b1ffceecd57
2015-05-22 13:14:57 -07:00
Chong Zhang 041b945e07 Merge "fix BufferItem flatten/unflatten alignment" into mnc-dev 2015-05-22 19:04:05 +00:00
Chong Zhang 47f674dfec fix BufferItem flatten/unflatten alignment
bug: 21370100
Change-Id: Ia3991dc591c176bdbd1d78d1804aa22777525b62
2015-05-22 10:54:25 -07:00
Michael Lentine 699a32bcdf Merge "Refactor ConsumerBase and it's derived classes." into mnc-dev 2015-05-18 21:29:39 +00:00
Michael Lentine 847f11e215 Refactor ConsumerBase and it's derived classes.
Move setDefaultBufferSize, setDefaultBufferFormat, and
setDefaultBufferDataSpace into ConsumerBase and remove them from
CpuConsumer and BufferItemConsumer.

Bug: 19977701

Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b
2015-05-18 14:29:18 -07:00
John Reck 3db36803b2 Merge "Add ConsumerBase::isAbandoned" into mnc-dev 2015-05-14 23:27:46 +00:00
John Reck e478305181 Add ConsumerBase::isAbandoned
Bug: 20105644
Change-Id: I21526b5397ea51a15500c44a99daa9d75fc4ea67
2015-05-14 15:55:11 -07:00
Michael Lentine 51c8c502f6 Merge "Modify EGL to disconnect the window when the surface gets destroyed." into mnc-dev 2015-05-14 16:39:28 +00:00
Michael Wright 7c000280a5 Merge changes from topic 'button_actions' into mnc-dev
* changes:
  Fix input tests to work with new MotionEvent member
  Revert "Revert "Add new MotionEvent actions for button press and release.""
2015-05-14 15:31:21 +00:00