Commit Graph

2122 Commits

Author SHA1 Message Date
Jinsuk Kim bc4e396d17 New keycode definitions for HDMI-CEC
Following keys are added to be mapped to HDMI-CEC standard keys:

KEYCODE_MEDIA_TOP_MENU
KEYCODE_11
KEYCODE_12
KEYCODE_LAST_CHANNEL
KEYCODE_TV_DATA_SERVICE

Change-Id: Ie73cf4cd8355ced4753eb5bba0ea130b087dfc36
2014-05-20 07:51:18 +09:00
Tim Kilbourn 6b4e02f1cb Add KEYCODE_PAIRING.
Used for initiating a peripheral pairing mode.

Change-Id: I7e8439d27491ccc72d045cabf5751a35b9113aa7
2014-05-16 15:36:11 -07:00
Narayan Kamath f8c66b4bee am cfba3bf1: am c9fcaf37: Merge "Change InputMessage.motion.pointerSize to a uint32_t."
* commit 'cfba3bf1606dfdb1daf1be1c19176180660ae19d':
  Change InputMessage.motion.pointerSize to a uint32_t.
2014-05-16 12:10:21 +00:00
Narayan Kamath cfba3bf160 am c9fcaf37: Merge "Change InputMessage.motion.pointerSize to a uint32_t."
* commit 'c9fcaf3751af078ad730913304431197e4d1ae80':
  Change InputMessage.motion.pointerSize to a uint32_t.
2014-05-16 12:08:06 +00:00
Narayan Kamath ed5fd384b7 Change InputMessage.motion.pointerSize to a uint32_t.
This ensures it's the same size in both 32 and 64 bit
processes and also brings it in line with struct
MotionEntry.

(cherry-picked from bc6001b026)

Change-Id: I28e87050478920a54132efbbb8138076ebad1409
2014-05-16 12:53:16 +01:00
Todd Poynor a186e65368 BatteryProperty: Add property ENERGY_COUNTER and 64-bit integer properties
Also fixup comments to match recent changes in BatteryManager.

Change-Id: I6f40924f9e66d564ad1175f9650e2bfd2ad39a3a
2014-05-16 03:05:11 +00:00
Andy Hung 574b641173 Merge "Allow OMX pointer types to be forced to 32 bits" 2014-05-15 03:21:01 +00:00
Greg Hackmann f974bffb36 am 38c9e132: am c1ffd351: am bd20e551: Merge "Use asynchronous lock/unlock API"
* commit '38c9e1327a5b24267c3dab5293bc9d7ada6e9fc9':
  Use asynchronous lock/unlock API
2014-05-12 18:18:47 +00:00
Greg Hackmann 38c9e1327a am c1ffd351: am bd20e551: Merge "Use asynchronous lock/unlock API"
* commit 'c1ffd351bc44483369271c11dd4c6391bba8c64c':
  Use asynchronous lock/unlock API
2014-05-12 18:12:34 +00:00
Greg Hackmann c1ffd351bc am bd20e551: Merge "Use asynchronous lock/unlock API"
* commit 'bd20e551f64234142e1146f9fa4b2dcebbd72122':
  Use asynchronous lock/unlock API
2014-05-12 18:08:13 +00:00
Francis Hart 8f3960179c Use asynchronous lock/unlock API
The gralloc API now provides a way for using lock/unlock with the Android
explicit synchronisation concept. This changes updates the GraphicBuffer class
to also expose this functionality, and updates the Surface class to make use of
in line with the dequeueBuffer/queueBuffer mechanism.

This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local
gralloc module does not support this then the existing synchronous lock/unlock
mechanism will be used.

Change-Id: I8c3fd9592e0c5400ac9be84450f55a77cc0bbdc5
2014-05-12 09:13:03 -07:00
Greg Hackmann 2f3dca149a am 9493d492: am 9eb142e3: am a9d49f99: Merge "Revert "Use asynchronous lock/unlock API""
* commit '9493d4924a59f14b698389386337a9c07a7ea3c4':
  Revert "Use asynchronous lock/unlock API"
2014-05-09 22:00:04 +00:00
Greg Hackmann 02528cf6aa am 4b46776f: am 8a6cd189: am f60564a1: Merge "Use asynchronous lock/unlock API"
* commit '4b46776ff88c5a365700b88e8b2b04e1b2c77e6e':
  Use asynchronous lock/unlock API
2014-05-09 21:54:48 +00:00
Greg Hackmann 9493d4924a am 9eb142e3: am a9d49f99: Merge "Revert "Use asynchronous lock/unlock API""
* commit '9eb142e34a5bc11508c0bd6f60ad3933c60aa530':
  Revert "Use asynchronous lock/unlock API"
2014-05-09 21:51:51 +00:00
Greg Hackmann 9eb142e34a am a9d49f99: Merge "Revert "Use asynchronous lock/unlock API""
* commit 'a9d49f99e69d8fc0e60b492b131322c96f47a232':
  Revert "Use asynchronous lock/unlock API"
2014-05-09 21:46:44 +00:00
Greg Hackmann 53ec72523a Revert "Use asynchronous lock/unlock API"
This reverts commit 378ef07760.

Change-Id: I1de5ab973b5383633e75924fe90ac3ca8216c36a
2014-05-09 21:36:48 +00:00
Greg Hackmann 4b46776ff8 am 8a6cd189: am f60564a1: Merge "Use asynchronous lock/unlock API"
* commit '8a6cd189034ec4709a66e581b41deba56c028291':
  Use asynchronous lock/unlock API
2014-05-09 21:13:16 +00:00
Greg Hackmann 8a6cd18903 am f60564a1: Merge "Use asynchronous lock/unlock API"
* commit 'f60564a13e917877c76c99294194a621d872076b':
  Use asynchronous lock/unlock API
2014-05-09 21:08:39 +00:00
Andy Hung abec6ad341 Allow OMX pointer types to be forced to 32 bits
Enabled by #define.  Is used for 64 bit compilation to
force structs to use 32 bit pointer values for eventual
IPC to 32 bit OMX codecs.

May change later if we support 64 bit OMX codecs.

Change-Id: I0d12f86774f6f7ce9c39c8abea5d51988a7eef11
Signed-off-by: Andy Hung <hunga@google.com>
2014-05-07 11:12:34 -07:00
Dan Stoza dd02391756 Merge "Enable changing display configuration" 2014-05-06 21:08:16 +00:00
Narayan Kamath 4522f5749d Merge "Change InputMessage.motion.pointerSize to a uint32_t." 2014-05-06 10:00:57 +00:00
Rachad 6900656b2d Merge "HEVC Support Added HEVC enums and structures to OMX header files" 2014-05-06 00:39:10 +00:00
Dan Stoza 7f7da32569 Enable changing display configuration
This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.

Bug: 14320401
Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
2014-05-05 16:45:26 -07:00
Rachad 184077dee4 HEVC Support
Added HEVC enums and structures to OMX header files

Change-Id: If4135c6df86df51098fc7a979543975ed70b0641
2014-05-05 12:03:54 -07:00
Francis Hart 378ef07760 Use asynchronous lock/unlock API
The gralloc API now provides a way for using lock/unlock with the Android
explicit synchronisation concept. This changes updates the GraphicBuffer class
to also expose this functionality, and updates the Surface class to make use of
in line with the dequeueBuffer/queueBuffer mechanism.

This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local
gralloc module does not support this then the existing synchronous lock/unlock
mechanism will be used.

Change-Id: I77daa1beb197b63b1c2f281b8414ac4ae4b5b03c
2014-05-02 13:28:14 -07:00
Narayan Kamath bc6001b026 Change InputMessage.motion.pointerSize to a uint32_t.
This ensures it's the same size in both 32 and 64 bit
processes and also brings it in line with struct
MotionEntry.

Change-Id: I66bb8b8d8664763e7dcbd489686051f563d5e1dc
2014-05-02 17:58:43 +01:00
Michael Wright 32ccf558ce Merge "Move key attribute information out of native." 2014-04-29 22:31:18 +00:00
Bill Yi e4f00b2aae Merge commit '6d05ef2310bdc84811d5b0385b009ad11447a749' into HEAD 2014-04-29 11:34:19 -07:00
Alex Glaznev c215abe8e8 Merge "Add VP8 encoder extra parameters structure to support configuring encoder key frame interval, number of temporal layers, type of temporal layer pattern and minimum and maximum quantization parameters." 2014-04-24 21:53:30 +00:00
Aravind Akella 943de2f71b Merge "Enable wakeup sensors." 2014-04-24 00:41:08 +00:00
Alex Glaznev 5b155b84a2 Add VP8 encoder extra parameters structure to support
configuring encoder key frame interval, number of
temporal layers, type of temporal layer pattern
and minimum and maximum quantization parameters.

Bug: 11969958
Change-Id: I561e03148a7c5d928b5bf350ad3631ae69871065
2014-04-23 17:15:18 -07:00
Aravind Akella 9a844cf78f Enable wakeup sensors.
SensorService should hold a wakelock till the app reads events from a wakeup sensor. Currently drivers hold a wakelock with a
timeout while delivering events from a wake up sensor like Significant Motion. This hack can be removed now.

Bug: 9774884
Change-Id: If3b5acb99c9cf0cd29012fcfa9d6b04c74133d01
2014-04-23 14:38:56 -07:00
Michael Wright 872db4f11e Move key attribute information out of native.
Native doesn't ever actually care about the attributes of keys, so
move all of it up into the managed layer and move all of the key
names down so they're defined once.

Change-Id: Ic8ded13ce050b2b98744735ff50d11e8d882d7d5
2014-04-22 16:55:36 -07:00
Dan Stoza e0d5862ad8 Remove deprecated BufferQueue constructor
Finally remove the BufferQueue constructor itself. From now on, all
BufferQueues must be created through the createBufferQueue method.

Bug: 13415624
Change-Id: I192bf9430265bab761dcd59db1f02c9d0ac4feed
2014-04-22 14:12:55 -07:00
Dan Stoza fb39827ebc Merge "BufferQueue: Increase max slots from 32 to 64" 2014-04-21 16:11:22 +00:00
Dan Stoza febd4f4f46 BufferQueue: Increase max slots from 32 to 64
Increases NUM_BUFFER_SLOTS from 32 to 64 and changes the mask
returned by IGBC::getReleasedBuffers from 32 to 64 bits.

Bug: 13174352
Change-Id: Ie8ef0853916cfb91f83881c7241886bb1950f01a
2014-04-18 11:40:14 -07:00
Dan Stoza 99b18b447d BufferQueue: Add StreamSplitter
Adds a StreamSplitter class, that takes one IGraphicBufferConsumer
interface and multiple IGraphicBufferProducer interfaces and
implements a one-to-many broadcast of GraphicBuffers (while managing
fences correctly).

Change-Id: I38ecdf3e311ac521bc781c30dde0cc382a4376a3
2014-04-15 10:34:10 -07:00
Dan Stoza d9822a3843 BufferQueueProducer: add detachNextBuffer
Adds a new method, IGBP::detachNextBuffer, that effectively does
dequeue + request + detach in a single call, but does not need to
know anything about the dequeued buffer, and will not block on
dequeue. This is mostly for the upcoming StreamSplitter to use in
its onBufferReleased callback.

Change-Id: Ie88a69de109003acebaa486a5b44c8a455726550
2014-04-15 10:27:25 -07:00
Aravind Akella 93b84e39e6 am ef89f763: am cf818ebb: Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev
* commit 'ef89f7638c43ce5f73e32d487bf65c3375995e3b':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-11 19:40:33 +00:00
Aravind Akella ef89f7638c am cf818ebb: Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev
* commit 'cf818ebbf07c6a20ef48d71bf82f8d4bdf3a398c':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-11 19:34:53 +00:00
Aravind Akella cf818ebbf0 Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev 2014-04-11 19:32:28 +00:00
Dan Stoza 21f18e6935 Merge "Add unique ID to GraphicBuffer" 2014-04-11 18:56:04 +00:00
Dan Stoza fd34b65f71 Merge "BufferQueue: Add producer buffer-released callback" 2014-04-11 17:57:12 +00:00
Jeff Brown 88a34b2f43 am 974279d9: am db19e463: Remove unnecessary policy flags.
* commit '974279d98917c589181b70ea1c377842e7717643':
  Remove unnecessary policy flags.
2014-04-11 08:46:03 +00:00
Jeff Brown 974279d989 am db19e463: Remove unnecessary policy flags.
* commit 'db19e463fe5a4e00a0214c564527ba67f31e1afb':
  Remove unnecessary policy flags.
2014-04-11 03:53:32 +00:00
Aravind Akella 700180487f Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
This reverts commit 4369a4ebd5.

Change-Id: Ifa8619cc6873470a07a987763d818d78d4232610
2014-04-11 00:06:06 +00:00
Svetoslav cf8684b206 Merge "Adding render stats APIs to UiAutomation (framework native)." 2014-04-10 19:32:44 +00:00
Svetoslav d85084b2b6 Adding render stats APIs to UiAutomation (framework native).
bug:12927198

Change-Id: Ibb1c07f7d89e11281e5c1f27f412a29ac6f9c4ab
2014-04-10 12:32:19 -07:00
Jeff Brown db19e463fe Remove unnecessary policy flags.
Bug: 13133142
Change-Id: Ib6c63ebad25d84f78623b4a46ccf83953d235fe7
2014-04-09 17:04:44 -07:00
Dan Stoza b3d0bdf0db BufferQueue: Remove Bn version of create*
It turns out that there's no reason to have both I* and Bn* versions
of the createBufferQueue method, so I removed the Bn* version.

Change-Id: I66aeb09e10458ae540ddf1f38d2d0154ea8f315b
2014-04-07 17:00:26 -07:00
Etienne Le Grand 75b332037f am 4369a4eb: Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
* commit '4369a4ebd5ae7567e7075bc82830b83178099ed5':
  Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
2014-04-05 09:06:00 +00:00
Etienne Le Grand 30d6fd6b28 Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
This reverts commit c57a019e11.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
(cherry picked from commit 4369a4ebd5)
2014-04-05 06:13:41 +00:00
Etienne Le Grand 4369a4ebd5 Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
This reverts commit c57a019e11.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
2014-04-05 05:02:22 +00:00
Etienne Le Grand 33458f72e1 am 00f4dde1: am c57a019e: Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit '00f4dde1aa88576811bca79bc8242e1fc1edb333':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-05 03:53:51 +00:00
Etienne Le Grand 00f4dde1aa am c57a019e: Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit 'c57a019e117117c5a76c772970b26cd0f5db8c6a':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-05 01:52:28 +00:00
Etienne Le Grand c57a019e11 Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
Change-Id: If0f3dbdb5d2e9378e1fed4614baee4e750d0c850
2014-04-04 16:31:09 -07:00
John Spurlock 9ae71b0060 am 17251cd4: am ad98ad04: Add ACONFIGURATION_UI_MODE_TYPE_WATCH to configuation enum.
* commit '17251cd445cf80cfb6085a1b0b317cd85ad5be00':
  Add ACONFIGURATION_UI_MODE_TYPE_WATCH to configuation enum.
2014-04-04 19:34:07 +00:00
John Spurlock 17251cd445 am ad98ad04: Add ACONFIGURATION_UI_MODE_TYPE_WATCH to configuation enum.
* commit 'ad98ad0493625578f19c727576d02725b82f927c':
  Add ACONFIGURATION_UI_MODE_TYPE_WATCH to configuation enum.
2014-04-04 19:28:07 +00:00
Greg Hackmann 786e26a886 am 3b1cb037: am 27f8840f: Merge "make struct Event layout consistent on 32/64-bit"
* commit '3b1cb037eea56dba0d134c6858f8ddc0f9743ff8':
  make struct Event layout consistent on 32/64-bit
2014-04-04 01:53:51 +00:00
Greg Hackmann 3b1cb037ee am 27f8840f: Merge "make struct Event layout consistent on 32/64-bit"
* commit '27f8840f228abfe5e2458a261ce5403871495a54':
  make struct Event layout consistent on 32/64-bit
2014-04-04 00:08:11 +00:00
John Spurlock ad98ad0493 Add ACONFIGURATION_UI_MODE_TYPE_WATCH to configuation enum.
Bug:13395758
Change-Id: Iecdae299bfd030f86145d02fa7860374b5a40a74
2014-04-03 16:39:17 -04:00
Glenn Kasten 18b94aa848 am fb3bbd1d: am d2f76332: Merge "AArch64: Correction to OMX_U32 and OMX_S32"
* commit 'fb3bbd1df323c24dc10c095f29ee8010fc3d1df0':
  AArch64: Correction to OMX_U32 and OMX_S32
2014-04-03 17:22:56 +00:00
Glenn Kasten fb3bbd1df3 am d2f76332: Merge "AArch64: Correction to OMX_U32 and OMX_S32"
* commit 'd2f7633277dd13ac269adb51c4e7a85746e6c599':
  AArch64: Correction to OMX_U32 and OMX_S32
2014-04-03 17:14:50 +00:00
Greg Hackmann 27f8840f22 Merge "make struct Event layout consistent on 32/64-bit" 2014-04-03 17:07:09 +00:00
Glenn Kasten d2f7633277 Merge "AArch64: Correction to OMX_U32 and OMX_S32" 2014-04-03 17:00:59 +00:00
Narayan Kamath 7f4fe6e586 am d09b2acd: am 033bdd72: Merge "Remove global variables from ProcessState."
* commit 'd09b2acdc8ca706c65984956e61c0bb333cee992':
  Remove global variables from ProcessState.
2014-04-03 16:56:29 +00:00
Narayan Kamath d09b2acdc8 am 033bdd72: Merge "Remove global variables from ProcessState."
* commit '033bdd72f9f32f4bd3d282750bdc0dcfbb469959':
  Remove global variables from ProcessState.
2014-04-03 14:11:31 +00:00
Narayan Kamath 162ea0e9e8 Remove global variables from ProcessState.
These weren't really being used and they make it
very hard to reason about who looks at command line
arguments.

Processes started via app_process (this includes all
zygote forks and the system_server) can get information
about command line arguments from the AndroidRuntime
class, which is available via a call to
AndroidRuntime::getRuntime.

bug: 13647418

Change-Id: I6f92680c3619a68c6d4b0995db4cdc9adc788e36
2014-04-03 12:29:44 +00:00
Ruchi Kandoi ca13fa7dd4 PowerManager: add powerHint binder method
Change-Id: Ide1d50bb1580698b25296fbfc1cc63c3b21a00bc
2014-04-02 21:24:01 +00:00
Marcus Oakland 849de60c1e AArch64: Correction to OMX_U32 and OMX_S32
The types of OMX_U32 and OMX_S32 were appropriate to a 32-bit system
but were not appropriate to a 64-bit system. They have been changed to
make them portable between the two systems. With this change and a
change to frameworks/av/media/libstagefright/foundation/AString.cpp,
the android.media.cts.DecoderTest#testFlush CTS test passes.

Change-Id: I8e16c7169f54599c23fea71585b531e48541c78a
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2014-04-02 11:20:01 -07:00
Jeff Tinker 60a6337de0 am b2f414fb: am 98e5bf2c: Merge "Support CAST V2 Authentication in MediaDrm" into klp-modular-dev
* commit 'b2f414fbd6e3be45bbea28d84db3ce9712ddcd5b':
  Support CAST V2 Authentication in MediaDrm
2014-04-01 22:23:23 +00:00
Jeff Tinker b2f414fbd6 am 98e5bf2c: Merge "Support CAST V2 Authentication in MediaDrm" into klp-modular-dev
* commit '98e5bf2cc0931fc4e4d88b3f64069bd200690be0':
  Support CAST V2 Authentication in MediaDrm
2014-04-01 22:00:44 +00:00
Jeff Tinker 98e5bf2cc0 Merge "Support CAST V2 Authentication in MediaDrm" into klp-modular-dev 2014-04-01 21:54:35 +00:00
Dan Stoza b1363d37fc Add unique ID to GraphicBuffer
Adds a globally-unique ID (PID + sequence number) to every
GraphicBuffer, which will remain the same while crossing Binder,
even if the underlying handles change.

Change-Id: Ib11330a4c5e99621b82204e0adb31b9a88658426
2014-03-31 14:10:07 -07:00
Dan Stoza f0eaf25e92 BufferQueue: Add producer buffer-released callback
Add a callback to the producer side, onBufferReleased, which will be
called every time the consumer releases a buffer back to the
BufferQueue. This will enable a buffer stream splitter to work
autonomously without having to block on dequeueBuffer.

The binder object used for the callback replaces the generic IBinder
token that was passed into IGraphicBufferProducer::connect to detect
the death of the producer. If a producer does not wish to listen for
buffer release events, it can pass in an instance of the
DummyProducerListener class defined in IProducerListener.h, if it even
cares about death events (BufferQueue doesn't enforce the token being
non-NULL, though perhaps we should).

Change-Id: I23935760673524abeafea2b58dccc3583b368710
2014-03-31 14:10:07 -07:00
Jeff Tinker c2f10f20ec Support CAST V2 Authentication in MediaDrm
Update frameworks to enable support for CAST
V2 Authentication in the DRM Plugin.

Change-Id: Ic38f0e1484b1388dd87f4591c74984cb724d50e2
related-to-bug: 12702350
2014-03-29 08:41:39 -07:00
Michael Wright 6c4e2d816b am 773585e6: Merge "Generate ACTION_CANCEL on joystick disconnect. DO NOT MERGE" into klp-modular-dev
* commit '773585e60c2e6c3e39f9f56d0d3b05eeae6dff04':
  Generate ACTION_CANCEL on joystick disconnect. DO NOT MERGE
2014-03-28 19:37:39 +00:00
Glenn Kasten 80a2f03051 Merge "Allow creation of heaps that are read-only to partner" 2014-03-27 22:28:11 +00:00
Michael Wright d0bd391146 Generate ACTION_CANCEL on joystick disconnect. DO NOT MERGE
Bug: 11480300
Change-Id: I5a4096970c9e588d134f05dd0eb3a9c91c836b2f
2014-03-24 17:26:52 -07:00
Paul Lawrence 151d24899f Merge "batteryservice: Add battery capacity" 2014-03-20 18:11:10 +00:00
Fengwei Yin 0c7c81f5a6 make struct Event layout consistent on 32/64-bit
To make struct Event have consistent memory layout between x86
and x86_64, force nsecs_t timestamp align to 64bit because it's
not true for x86.

Change-Id: I49eaddd89e10d595cf6a5130f9762b5388c96625
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
2014-03-20 16:49:06 +08:00
Michael Wright 38dcdff308 Generate ACTION_CANCEL on joystick disconnect.
Bug: 11480300
Change-Id: I46706838eec0711c6bf345301e7b4ccbad83b063
2014-03-20 01:54:00 +00:00
Paul Lawrence d8e1f65273 batteryservice: Add battery capacity
Change-Id: I6879ec9ec931cbea82aa550b3b227e744255bfd4
2014-03-19 21:56:47 +00:00
Glenn Kasten 6546f2e458 Allow creation of heaps that are read-only to partner
Change-Id: I3c2b3d9b1671da4b9d9c58dce27e291d30703b03
2014-03-18 15:07:43 -07:00
Dan Stoza 75555b2eaf Merge "BufferItemConsumer: Use IGBC instead of BQ" 2014-03-18 17:55:06 +00:00
Dan Stoza 14226716f2 Merge "Remove deprecated BufferQueue constructor" 2014-03-18 16:56:15 +00:00
Wonsik Kim 8bf3b1a496 Merge "Revert "Implement video plane layer"" 2014-03-18 01:00:44 +00:00
Wonsik Kim 29fa9590ad Revert "Implement video plane layer"
This reverts commit f837c93a1b.

Change-Id: I6a1aa9ad0aca023267dc53d19c950b1535123ca7
2014-03-17 11:17:28 +00:00
Marco Nelissen ce9f107c9d am 793be12c: am b730a452: am f0190bff: Add support for writing byte arrays to parcels
* commit '793be12c0f5a7878d1085e94e58a9c36c84f0911':
  Add support for writing byte arrays to parcels
2014-03-15 00:30:46 +00:00
Marco Nelissen 793be12c0f am b730a452: am f0190bff: Add support for writing byte arrays to parcels
* commit 'b730a45216991cf22c39451c47393b4bccae111b':
  Add support for writing byte arrays to parcels
2014-03-14 23:33:08 +00:00
Marco Nelissen 446ef4bae2 am f0190bff: Add support for writing byte arrays to parcels
* commit 'f0190bff38b6c29abbfc4a877442f71fc3d7dad8':
  Add support for writing byte arrays to parcels
2014-03-14 23:32:45 +00:00
Marco Nelissen b730a45216 am f0190bff: Add support for writing byte arrays to parcels
* commit 'f0190bff38b6c29abbfc4a877442f71fc3d7dad8':
  Add support for writing byte arrays to parcels
2014-03-14 22:55:54 +00:00
Marco Nelissen f0190bff38 Add support for writing byte arrays to parcels
b/13418320

Change-Id: I2285df9e9d3dc8a6a54055b13b352b81660bf45d
2014-03-13 14:17:40 -07:00
Jesse Hall 73ed82f809 Merge "Add sideband streams to BufferQueue and related classes" 2014-03-13 20:28:17 +00:00
Dan Stoza 6d5a7bb970 Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: I52f58a4d22296d9fc3cdbd4ad53eb10a785db3ce
2014-03-13 11:39:09 -07:00
Dan Stoza fe50d2a0a1 BufferItemConsumer: Use IGBC instead of BQ
Change-Id: Id1756ac62954ba412f2c23c5fa6e5d760c299347
2014-03-13 11:12:04 -07:00
RoboErik ffd353a73e am d9e113f0: b/12068020 add nonce to InputDeviceDescriptor. Do not merge
* commit 'd9e113f0e0feac1a801f8339d2f907302bd432c5':
  b/12068020 add nonce to InputDeviceDescriptor. Do not merge
2014-03-12 21:12:28 +00:00
RoboErik d9e113f0e0 b/12068020 add nonce to InputDeviceDescriptor. Do not merge
This is a cherry-pick of https://googleplex-android-review.git.corp.google.com/#/c/401795/

Adds a nonce field to allow generation of unique descriptors for
input devices.

Change-Id: Ie82bfb728bea95792b3b138dd3974f8b0aff63e0
2014-03-12 12:51:54 -07:00
Dan Stoza f522af7eb6 BufferQueue: Allow returning interfaces as I*/Bn*
This adds a second createBufferQueue method that returns
sp<IGraphicBuffer*> interfaces instead of sp<BnGraphicBuffer*>, since
most clients don't actually need the Binderized versions (but some
might).

Change-Id: Iaf4f719c96ddb6f704afc75cf52be22588173e32
2014-03-12 10:17:20 -07:00
Michael Wright d0f7ce457c am 9b04f860: Add MAX_CONTROLLER_LEDS constant. DO NOT MERGE
* commit '9b04f860f23481d39c3b45379a324d3630966825':
  Add MAX_CONTROLLER_LEDS constant. DO NOT MERGE
2014-03-11 23:22:00 +00:00
Michael Wright 9b04f860f2 Add MAX_CONTROLLER_LEDS constant. DO NOT MERGE
Change-Id: Ie6dbce926280c748f39e3c54d2ed4accbdcf9e59
2014-03-11 14:19:33 -07:00
Jesse Hall 399184a4cd 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
2014-03-11 12:23:14 -07:00
Dan Stoza 9f3053de78 BufferQueue: Allow detaching/reattaching buffers
Adds detachBuffer and attachBuffer calls to both the producer and
consumer sides of BufferQueue. Buffers may be detached while dequeued
by the producer or acquired by the consumer, and when attached, enter
the dequeued and acquired states, respectively.

Bug: 13173343
Change-Id: Ic152692b0a94d99e0135b9bfa62747dab2a54220
2014-03-10 16:45:38 -07:00
Jeff Brown 59326cbb5c am d711ef1d: am 37bf0789: Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
* commit 'd711ef1d78581a598e23be9730246cfa8ca75bb2':
  Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
2014-03-08 05:44:49 +00:00
Jeff Brown d711ef1d78 am 37bf0789: Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
* commit '37bf0789f5c1167f6f7f5667b09cad70e0bb27d4':
  Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
2014-03-07 23:43:18 +00:00
Jeff Brown 37bf0789f5 Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
Bug: 12938999
Change-Id: I544661b3887332998d703b7b2df9e56c23ab48c4
2014-03-07 13:57:59 -08:00
Andy McFadden c0c6a0cd4c Merge "FramebufferNativeWindow.h is obsolete" 2014-03-06 15:31:39 +00:00
Andy McFadden 2e336496c3 FramebufferNativeWindow.h is obsolete
This adds a deprecation #warning to the header.

Change-Id: Ia32f16e491cb01d435ec8846dda3d9a7d1a9cfc5
2014-03-05 15:42:53 -08:00
Dan Stoza c1ef3efecb Merge "Change BufferQueue into producer/consumer wrapper" 2014-03-05 18:55:13 +00:00
Michael Wright f8da9623f3 am 1298c7e5: Merge "Parse LED mappings in keylayout files. DO NOT MERGE" into klp-modular-dev
* commit '1298c7e527fd242a39f9c0d53aa4f35d1c9decab':
  Parse LED mappings in keylayout files. DO NOT MERGE
2014-03-05 00:54:24 +00:00
Dan Stoza 3e96f1982f Change BufferQueue into producer/consumer wrapper
Now that BufferQueue has been split into core + producer + consumer,
rewrite BufferQueue to be a thin layer over a producer and consumer
interface. Eventually, this layer will be deprecated in favor of
only using either the producer or consumer interface, as applicable.

Change-Id: I340ae5f5b633b244fb594615ff52ba50b9e2f7e4
2014-03-04 15:58:03 -08:00
Dan Stoza 4a07dc8d21 Merge "Split BufferQueue into core + producer + consumer" 2014-03-04 20:03:59 +00:00
Dan Stoza 289ade165e Split BufferQueue into core + producer + consumer
Change-Id: Idc39f1e511d68ce4f02202d35425a419bc0bcd92
2014-03-04 09:33:14 -08:00
Michael Wright 962a108856 Parse LED mappings in keylayout files. DO NOT MERGE
Change-Id: I2b34939cc0df256e6b872502ea93f2884b4c8334
2014-03-03 13:59:35 -08:00
Lajos Molnar c26c0bee1d Merge "Adding Opus related struct definitions to OMX_Index" 2014-03-03 21:03:34 +00:00
Vignesh Venkatasubramanian 1a8b0ed985 Adding Opus related struct definitions to OMX_Index
Adding Opus related structure and constant definitions to
OMX_Index.h

Change-Id: Iae0394c86900f0db322893ffce695f854624833a
2014-03-03 12:01:33 -08:00
Wonsik Kim f837c93a1b Implement video plane layer
Binding with video source will follow.

Change-Id: Ic14e9757f5b61f4055cbeda47c1bafae0a621abb
2014-02-27 00:08:22 +00:00
Andy McFadden 22a5c8b2e3 am 44c35ec4: Allow "opaque" flag to be updated. DO NOT MERGE
* commit '44c35ec4a94eb33f7ee0df085c5d2d56d99962cf':
  Allow "opaque" flag to be updated. DO NOT MERGE
2014-02-18 23:59:43 +00:00
Andy McFadden 44c35ec4a9 Allow "opaque" flag to be updated. DO NOT MERGE
Moves the "opaque layer" from Layer to Layer::State.  This allows
it to be updated as part of a transaction.

Bug 12387406

Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
2014-02-18 15:55:42 -08:00
Dan Stoza c701401f8c Allow disabling layer rotation during screenshots
Add the ability to ignore layers' transformation matrices during
screenshot capture, which will allow the window manager to capture
unrotated images for recents during the device rotation animation.

Bug: 11805195
Change-Id: I854d87bc84ca06ef9a054a454af1c080ee66fbb8
2014-02-14 23:10:42 +00:00
Jeff Brown eac45b8a53 am ed4d28dd: Add method to apply offset to PointerCoords. (DO NOT MERGE)
* commit 'ed4d28dd70448b13eb74a3166ec8d1c1a530e2d4':
  Add method to apply offset to PointerCoords.  (DO NOT MERGE)
2014-02-12 00:26:19 +00:00
Jeff Brown f086ddbb97 Add support for injecting events into ActivityContainers.
Enhanced the input system to support concurrent dispatch of touch
events on multiple displays which is required for this to work.

Add method to apply offset to PointerCoords.

Change-Id: I55fe4a9a8785ae5a2d3341d214fa3c5107f3963a
2014-02-11 14:51:24 -08:00
Jeff Brown ed4d28dd70 Add method to apply offset to PointerCoords. (DO NOT MERGE)
Change-Id: I3dc2ba22b026e5b8e1c3d90f7366ec09a59ce6b6
2014-02-11 14:43:19 -08:00
Michael Wright d02c5b6aac Move inputservice over to frameworks/native
Add all of the underlying input system pieces, minux PointerController and
SpriteController, to inputflinger. This is in preparation for moving input to
its own process and the addition of the input HAL.

Try 2.

Change-Id: I5f571fe86eb570885ae994e1f0552fb558930346
2014-02-11 10:47:14 -08:00
Michael Wright 1c284a9431 Add contains point method to Region
Change-Id: I553433ff7ac39f14ffca8278960d2abc95b4dd63
2014-02-10 13:00:14 -08:00
Andrew Hsieh 532cbb0fdc am bdab63e0: am 055dac1b: Merge "Fixed apparent copy/paste mistake Bug: 11634373"
* commit 'bdab63e06b6bacb60991420891cb06fe3dc5654f':
  Fixed apparent copy/paste mistake Bug: 11634373
2014-02-05 08:06:22 +00:00
Andrew Hsieh bdab63e06b am 055dac1b: Merge "Fixed apparent copy/paste mistake Bug: 11634373"
* commit '055dac1b54af46a0608b32e83fcae45e75a4a8f0':
  Fixed apparent copy/paste mistake Bug: 11634373
2014-02-05 07:58:00 +00:00
David Friedman 8769436bba Fixed apparent copy/paste mistake
Bug: 11634373

Change-Id: I9b0ac4d3b4a9a2999b2013abd39465a062ec51ea
2014-02-05 11:19:04 +08:00
Changwan Ryu dc425805b2 am e636692a: [DO NOT MERGE] Extend OpenMAX IL definitions to support AC3
* commit 'e636692a2eecead363f06297e7b5b379079331da':
  [DO NOT MERGE] Extend OpenMAX IL definitions to support AC3
2014-02-04 07:31:42 +00:00
Arve Hjønnevåg 88f6ad18de am c93865de: am 58242fc2: Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...
* commit 'c93865de80a16d3638936890fb42eb175284044b':
  ServiceManager: Implement PING_TRANSACTION
  ServiceManager: Use 32/64 bit types from new binder header
  Binder: Use 64 bit pointers in 32 processes if selected by the target
  Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
  Binder: Make binder portable
  ServiceManager: Fix the binder interface
  ServiceManager: Store handles in uint32_t instead of void *
  ServiceManager: Generic Fixes
  ServiceManager: Add extra error handling
  ServiceManager: Fix Android.mk
  ServiceManager: Make use of kernel exported structures
2014-02-03 22:11:16 +00:00
Changwan Ryu e636692a2e [DO NOT MERGE] Extend OpenMAX IL definitions to support AC3
OpenMAX IL does not have generic support for AC3, but IL 1.1.2 and above
supports component extension APIs, which enable us to add our own constants
and definitions.

Change-Id: Iecee4f8bb3112b0720ceae9192017e12d3fe97e3
2014-02-03 14:10:18 +09:00
Arve Hjønnevåg 84e625ac1e Binder: Use 64 bit pointers in 32 processes if selected by the target
Uses new kernel header where void * has been replaced by binder_uintptr_t

Change-Id: Icfc67c2a279269f700343bd9246fd7cb94efe2c1
2014-01-31 15:51:06 -08:00
Serban Constantinescu f683e0163a Binder: Make binder portable
Changes include
- Binder attempts to cast pointers to a int datatype
  which is not sufficient on a 64-bit platform.

- This patch introduces new read/write functions into
  Parcel that allow pointers to be written using the
  uintptr_t datatype for compile-time data type size
  selection.

-  Change access specifier for the methods above.

-  Binder uses the 64bit android_atomic_release_cas64
   (aka cmpxchg)

Change-Id: I595280541e0ba1d19c94b2ca2127bf9d96efabf1
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-31 10:49:40 +00:00
Andy McFadden d592f32df9 Merge "Allow "opaque" flag to be updated" 2014-01-30 21:42:02 +00:00
Andy McFadden 4125a4ffaf Allow "opaque" flag to be updated
Moves the "opaque layer" from Layer to Layer::State.  This allows
it to be updated as part of a transaction.

Bug 12387406

Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
2014-01-29 17:36:49 -08:00
Adam Lesinski 809af3aa03 Moved androidfw back to frameworks/base
Change-Id: Idd57bbbc86c936cbfd60e02f8ac8d4f8fbc94592
2014-01-27 10:29:16 -08:00
Narayan Kamath a9d5701b03 AssetManager cookies should be int32_t and not void*.
Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.

Change-Id: I319f271bd4f102dee7cb9f00df4c75ea697456f5
2014-01-27 11:11:50 +00:00
Dan Stoza 6a5d35dd5c libgui: Add a test for SRGB surfaces
Add SRGBTest.RenderToSRGBSurface, which validates that passing the
SRGB colorspace attributes to eglCreateWindowSurface actually
results in an SRGB surface by comparing the output values to those
of a standard RGB surface.

Change-Id: I3d5fef8070ed8fa2357ddd1c5fcc849ae3fbd12a
2014-01-07 16:43:39 -08:00
RoboErik 95c6675db1 Merge "b/12068020 add nonce to InputDeviceDescriptor" 2013-12-19 21:15:05 +00:00
RoboErik ec2a15a26f b/12068020 add nonce to InputDeviceDescriptor
Adds a nonce field to allow generation of unique descriptors for
input devices.

Change-Id: I978b6c5e9edc9e0a6aa60f85cd8d4efc42ac2999
2013-12-19 11:54:29 -08:00
Brian Carlstrom 494600a755 am 285bfefb: am c1bf6fa9: am 7fea2361: Merge "Track Looper decoupling from ALooper"
* commit '285bfefb01f24e98348628c115eb6c524417ea82':
  Track Looper decoupling from ALooper
2013-12-19 07:58:30 +00:00
Christopher Tate 6fce2d2280 Fix MCC/MNC typo
Manual merge of https://android-review.googlesource.com/70831 across
the header refactoring.

Change-Id: I28b6a61e89b68d914124122882976a9d2f81a609
2013-12-16 15:04:10 -08:00
Brian Carlstrom fe761ab6c7 Track Looper decoupling from ALooper
Change-Id: I612f0de7002e24948a4cbbea7b416b4fbb3929aa
2013-12-12 23:54:43 -08:00
Narayan Kamath aae73e748c Reimplement ZipFileRO in terms of libziparchive.
This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).

This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.

One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).

bug: 10193060

(cherry picked from commit afd31e08299008fdc5c2813f21b2573f29dc53df)

Change-Id: Iae67e62f1dc6dfc3f43e29bc38e3ffd1cb14d191
2013-12-09 16:34:30 +00:00
Igor Murashkin 7ea777f097 gui: Add tests for IGraphicBufferProducer
* Basic tests only. Needs more complicated queue/dequeue tests.
* Also needs consumer-side tests to really be thorough.

Change-Id: I1099dd56d65b6e9dfa15377726d6054ce657c0ca
2013-11-21 14:06:13 -08:00
Igor Murashkin 4be18a3566 gui: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS
Change-Id: I7c0cc36046dbbdb9c0e85acfe5027293d1131275
2013-11-18 12:36:15 -08:00
Igor Murashkin 7d2d160cdc gui: Update header docs for IGraphicBufferConsumer/Producer/BufferQueue
Also fix compiler warnings for libgui

Change-Id: I0ee38d9ad5eaa82d55bf812d291da8c433581cef
2013-11-13 17:34:03 -08:00
Changwan Ryu c9a8a34e40 Extend OpenMAX IL definitions to support AC3
OpenMAX IL does not have generic support for AC3, but IL 1.1.2 and above
supports component extension APIs, which enable us to add our own constants
and definitions.

Change-Id: Iecee4f8bb3112b0720ceae9192017e12d3fe97e3
2013-11-06 09:26:33 +09:00
Marco Nelissen 708cc794f6 Native counterpart of new power manager method
Cherrypicked from master.

b/9464621

Change-Id: I54c0ed50a57ac870da91db8589a73a2c792dbd8d
2013-10-25 12:50:04 -07:00
Todd Poynor 6f948c3960 batteryservice: remove now unused struct BatteryExtraProperties
Change-Id: Ibbb1eba95a800d2198e7524149ce38beb13dd7c9
2013-10-22 18:30:50 -07:00
Todd Poynor 7014fbd700 batteryservice: remove BatteryProperties fields not sent to BatteryService
Change-Id: I1116ebf0e21117fd37df7bfc41cb8ebaf9361faa
2013-10-22 23:18:36 +00:00
Michael Wright 60f19de1ed Merge "Add MAX_CONTROLLER_LEDS constant" 2013-10-22 00:26:57 +00:00
Michael Wright 0247e2213e Add MAX_CONTROLLER_LEDS constant
Change-Id: I5ec972338c50647049bb5a8279847d54a84d9f70
2013-10-21 11:58:41 -07:00
Michael Wright 6f467daf05 Merge "Parse LED mappings in keylayout files" 2013-10-18 20:02:59 +00:00
Michael Wright 74bdd2e7ce Parse LED mappings in keylayout files
Change-Id: I6bc3760341868015f054d9866e2616a312da94e0
2013-10-18 12:39:31 -07:00
Marco Nelissen 5c0106e134 Native counterpart of new power manager method
Change-Id: I54c0ed50a57ac870da91db8589a73a2c792dbd8d
2013-10-16 12:57:32 -07:00
Aravind Akella 4a1e00fb3a am 1f1e5768: am 5d6aa951: Merge "Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection." into klp-dev
* commit '1f1e576840d5b36a091368abb6fe6610384b6449':
  Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.
2013-10-10 19:26:34 -07:00
Aravind Akella 701166d9f6 Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.
Change-Id: I4ef2bec80406c517903ab9782dc9eaf3fa8b7f36
2013-10-09 17:26:01 -07:00
Marco Nelissen 0e6e912b54 am e71575be: am 48d3741b: Merge "Allow blaming a single uid for work done" into klp-dev
* commit 'e71575bed44fbbd61b6a369d42e200c0141953be':
  Allow blaming a single uid for work done
2013-10-04 11:09:01 -07:00
Lajos Molnar 86f76208f0 am 04e6ab6e: am b1f94ef3: Merge "media/hardware/HardwareAPI.h: Added PrepareForAdaptivePlaybackParams" into klp-dev
* commit '04e6ab6e27c39604a7029467161a90af78ecdf07':
  media/hardware/HardwareAPI.h: Added PrepareForAdaptivePlaybackParams
2013-10-04 11:09:01 -07:00
Mike Lockwood f99ad113b9 Move libandroidfw from frameworks/base
Change-Id: I8228c9a796e68e920c6a7dfc154c4b70ba66b082
2013-10-03 10:29:39 -07:00
Marco Nelissen 48d3741ba5 Merge "Allow blaming a single uid for work done" into klp-dev 2013-10-03 16:34:51 +00:00
Lajos Molnar b1f94ef3f9 Merge "media/hardware/HardwareAPI.h: Added PrepareForAdaptivePlaybackParams" into klp-dev 2013-10-03 16:10:25 +00:00
Marco Nelissen 9a7706bb17 Allow blaming a single uid for work done
This lets audioflinger assign blame for wakelocks to a single uid.
Currently this is only used for recording wakelocks.
b/10985160

Change-Id: Idc9adb22c29030010ac690d4cb95e7e7ea6b91e6
2013-10-03 08:49:07 -07:00
Jamie Gennis 4e8fd6f30d am 886b1521: am a9c47f32: Merge "GLConsumer: start using EGL_ANDROID_image_crop" into klp-dev
* commit '886b152111cc13dcfe1b47724f5e496f12ccc420':
  GLConsumer: start using EGL_ANDROID_image_crop
2013-10-02 10:44:44 -07:00
Jamie Gennis dbe9245e2e GLConsumer: start using EGL_ANDROID_image_crop
This change makes GLConsumer use the EGL_ANDROID_image_crop extension when
available on a device.  The crop rectangle is passed to the EGL driver when
creating EGLImages, allowing the crop to be performed by the driver rather than
using the texture transform matrix.

Bug: 10897141
Change-Id: I63e9a5d5c85067376abc420e3639154468346311
2013-10-02 17:34:35 +00:00
Todd Poynor 1fbc0266ad batteryservice: Add BatteryExtraProperties
Change-Id: I050a4da14dd723a1d563b25a9e997db769fece3e
2013-09-30 15:37:30 -07:00
Mike Lockwood 63ff1c644f Cleanup Binder interface between sensorservice and BatteryStats
Change-Id: Ia507160a2534059afe93849c8efc8407a046b50e
2013-09-25 09:28:41 -07:00
Eino-Ville Talvala 3473e814a4 am 1160e89d: am d171da97: GLConsumer: Add query for current frame number.
* commit '1160e89d31810f2ba66f8ab502281579115b39b0':
  GLConsumer: Add query for current frame number.
2013-09-20 11:19:41 -07:00
Eino-Ville Talvala d171da973d GLConsumer: Add query for current frame number.
Surface the underlying frame number of the current texture.

Bug: 10830400
Change-Id: Ide3a7da12ea0aac54588beb6bf00dbfe2cd37653
2013-09-19 13:36:07 -07:00
Mathias Agopian 0f0e845113 am a7e1660b: am c1c05de4: fix camera API 2.0 orientation
* commit 'a7e1660b257326f99261e7c9b2d58c9d2e68d0b0':
  fix camera API 2.0 orientation
2013-09-18 15:36:00 -07:00
Mathias Agopian c1c05de415 fix camera API 2.0 orientation
we add a flag to ANativeWindow::setBufferTransform that means
"apply the inverse rotation of the display this buffer is displayed
onto to".

Bug: 10804238
Change-Id: Id2447676271950463e8dbcef1b95935c5c3f32b2
2013-09-17 23:45:22 -07:00
Mathias Agopian 7229e98229 am 3f342c11: am 02b62df7: Merge "Make sure do disconnect from a BQ when its client dies." into klp-dev
* commit '3f342c113360eacc1e9c1ff481cb03f700a50117':
  Make sure do disconnect from a BQ when its client dies.
2013-09-17 14:35:29 -07:00
Mathias Agopian 365857df8b Make sure do disconnect from a BQ when its client dies.
Bug: 5679534

Change-Id: If447e8673df83fe0b1d6210641e0a48522501a53
2013-09-16 16:15:21 -07:00
Mathias Agopian 24695a1cff am 7c4f2365: am 90ed3e8d: fix a few problems with BitTube
* commit '7c4f236532692b847b9b103df6490549656ae993':
  fix a few problems with BitTube
2013-09-11 17:24:11 -07:00
Mathias Agopian 90ed3e8d78 fix a few problems with BitTube
BitTube used to send objects one at a time and didn't
handle errors properly.

We now send all the objects in one call, which means they
have to be read as a single batch as well. This changes the
BitTube API.

Update SensorService to the new API.

Also added an API to set the size of the send buffer.

Bug: 10641596
Change-Id: I77c70d35e351fdba0416fae4b7ca3b1d56272251
2013-09-10 21:10:53 -07:00
Chong Zhang cf1eb71a8d Merge "HDCP: add getCaps to query HDCP module capabilities" 2013-09-10 16:50:10 +00:00
Chong Zhang b344adf089 HDCP: add getCaps to query HDCP module capabilities
This is used now to query whether HDCP module supports encryption
from a native buffer output from the encoder.

Bug: 10609422

Change-Id: Ib7fa14e7f4de1da90b46eaa174a7a05ec9dacbdc
2013-09-07 23:33:50 -07:00
Mike Lockwood cbe36fe1ec Add support for sending and receiving ParcelFileDescriptors from native Binder code
Change-Id: I7f308e28ebac0755628e19c9b4d0d7399341b435
2013-09-05 08:43:22 -07:00
Marco Nelissen 31344a6d4d Merge "Remove obsolete comment" 2013-09-05 03:48:25 +00:00
Todd Poynor c150900793 libbatteryservice: Add average current property
Change-Id: I519c2fb9f7cec21d9f87e73fa96b2f58a7ab27a5
2013-09-04 17:41:56 -07:00
Chong Zhang edfc478196 am 9f74ea29: am e6772914: Merge "HDCP: add enums for HDCP module capabilities" into klp-dev
* commit '9f74ea29b8c4fa9635548b99d0a1e0d0c6c00bea':
  HDCP: add enums for HDCP module capabilities
2013-09-04 15:14:26 -07:00
Chong Zhang e67729144a Merge "HDCP: add enums for HDCP module capabilities" into klp-dev 2013-09-04 22:07:46 +00:00
Marco Nelissen 56e01384c7 Remove obsolete comment
Change-Id: I8b040e4b2e968fd0754e15dcf9f899fbfe210b6e
2013-09-04 19:51:16 +00:00
Chong Zhang a3a918557d HDCP: add enums for HDCP module capabilities
This change adds the enums for HDCP caps. An interface getCaps()
will be added later for querying whether HDCP module supports
encryption from a native buffer output from the encoder.

Bug: 10609422

Change-Id: Ib7fa14e7f4de1da90b46eaa174a7a05ec9dacbdc
2013-09-04 11:38:43 -07:00
Aravind Akella 91e0ff5739 am e29df8b9: am a5552de9: Merge "Sensor batching. Changes to the native code." into klp-dev
* commit 'e29df8b929128621c8ef90091696d414eb235276':
  Sensor batching. Changes to the native code.
2013-09-03 17:45:18 -07:00
Aravind Akella a5552de96f Merge "Sensor batching. Changes to the native code." into klp-dev 2013-09-04 00:41:41 +00:00
Aravind Akella 724d91d778 Sensor batching. Changes to the native code.
Bug: 10109508
Change-Id: I7333f3aac76125a8226a4c99c901fb904588df04
2013-09-03 17:04:36 -07:00
Mathias Agopian 68ca2640a7 am 4de85b49: am 1d4d8f94: improve mat44 implementation
* commit '4de85b49b3c1ae6c27351a0e6fd8d6490fe4f0cc':
  improve mat44 implementation
2013-09-03 16:53:47 -07:00
Mathias Agopian 1d4d8f94e2 improve mat44 implementation
this will make it easier to create matrices of different sizes

Change-Id: I2c1771ba0823c42d737762e2dfc2cd47eb302767
2013-09-03 16:38:49 -07:00
Mathias Agopian 9b7176b428 am d213910a: am 9b5534b0: Merge changes I8283a989,I64add89a into klp-dev
* commit 'd213910ab0acc956ee66bd3a0079a6393e7c695c':
  switch to use mat4
  vector and matrix classes for graphics use
2013-08-30 18:33:08 -07:00
Mathias Agopian 595ea77f6b vector and matrix classes for graphics use
- this implements vec2, vec3, vec4, which are float vectors
of size 2, 3 and 4 respectively.

the code allows easy instantiation of vectors of a different
type via the tvec{2|3|4}<T> template classes.

- this also implements mat4 which is a float 4x4 matrix. the
tmat44<T> template class allows easy instantiation of a
4x4 matrix of a different value_type.

The vector types have some minimal support for the
glsl style swizzled access; for instance:

  vec4 u;
  vec3 v = u.xyz;

only .x, .xy, .xyz and their .stpq / .rgba equivalent are
supported.

most operators are supported on both vector and matrices:
arithmetic, unary, compound assignment and comparison
(bit-wise operators NOT supported).

- operations available on vectors include:
dot, length, distance, normalize and cross

- operations available on matrices include:
transpose, inverse, trace

- and a few utilities to create matrices:
ortho, frustum, lookAt

Change-Id: I64add89ae90fa78d3f2f59985b63495575378635
2013-08-26 20:41:13 -07:00
Jeff Brown 464febc449 Remove input flinger stubs. (DO NOT MERGE)
Bug: 10446930
Change-Id: I4dd46f539cd2a2e324dfc83b45ba2787f7404a4a
2013-08-22 18:40:07 -07:00
Jeff Tinker be0b32a132 am 052f9b2f: am 39bfc698: Merge "Add ability to test supported content types to MediaDrm" into klp-dev
* commit '052f9b2fadcb0585aab688e9ff1015534fbbb6a7':
  Add ability to test supported content types to MediaDrm
2013-08-22 16:17:13 -07:00
Jeff Tinker 39bfc69892 Merge "Add ability to test supported content types to MediaDrm" into klp-dev 2013-08-22 23:08:09 +00:00
Todd Poynor cf80873586 libbatteryservice: add interface to read individual battery properties
Change-Id: I089eb6348053a8a9c8bca59e57ed97b4af14825a
2013-08-22 01:57:19 +00:00
Jeff Tinker 611d3d4816 Add ability to test supported content types to MediaDrm
bug: 10244066
Change-Id: I6666d0dbfdc6e791deb9a82c918255af4fa19816
2013-08-21 16:00:06 -07:00
Andy McFadden 3c25621ad7 Re-enable frame dropping for non-auto timestamps
This change adds an entire field to note whether the timestamp was
auto-generated by Surface or supplied by the application.

The value is used when deciding whether or not to drop frames based
on buffer presentation timestamps.  If a desired presentation time
was set explicitly, BufferQueue will use that value to decide if a
frame should be dropped.  If the timestamp was generated by Surface
at the time the buffer was queued, the timestamp is ignored.

Bug 10151804

Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
2013-08-16 15:15:16 -07:00
Igor Murashkin a5b7513711 gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired
- Return NOT_ENOUGH_DATA instead of INVALID_OPERATION when too many
  buffers have already been locked.
- INVALID_OPERATION is nominally used when something irrecoverable happens,
  but in this case the client just needs to call unlockBuffer to go back into a
  good state.

Bug: 10333400
Change-Id: I3a034d77de85741429f832a90eedd670afa1dc94
2013-08-14 20:17:17 -07:00
Mathias Agopian 3f84483382 SurfaceFlinger now uses GLES 2.x when available
Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
2013-08-13 16:07:45 -07:00
Mathias Agopian 45155969dc make sure GLConsumer::releaseTexImage() works after detachFromContext()
Change-Id: I27e0bc57e927d47b2b98113ee37b5396bcc72019
2013-08-12 23:45:28 -07:00
Lajos Molnar dde86f7b18 media/hardware/HardwareAPI.h: Added PrepareForAdaptivePlaybackParams
This is the param struct used by stagefright to notify codec that
the playback may include resolution changes, so that it can prepare
accordingly to avoid port reconfiguration.

Change-Id: I64e53b7ebf74c4f9d07cc9fe0cd65be55f666afe
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
2013-08-12 12:56:08 -07:00
Mathias Agopian 9870c9b66c make GLConsumer's debug texture static
this is so that we don't burn a gralloc handle and a bit
of memory per GLConsumer.

Change-Id: I30c3e7ec45d7f1b5426aca8e06c7716870877706
2013-08-08 17:46:48 -07:00
Jesse Hall 6c913be9ca Add ISurfaceComposer::destroyDisplay
Bug: 10191053
Change-Id: Ia89286f95421344a60ffedaaca5825c4e3cd7f9e
2013-08-08 13:12:29 -07:00
Todd Poynor b98240cc6c batteryservice: add battery current now and charge counter data
Change-Id: I4b3ea25342d4a03a8e38bfee2ef3b1ce54f82582
2013-08-07 18:30:13 +00:00
Mathias Agopian 3ca76f416b remove support for glReadPixels screenshot path
this was only needed on some chipset we're not
supporting in KLP.

Change-Id: I2e8fc07f135030bd61d2e241a8e426f1a4316425
2013-08-06 16:07:33 -07:00
Mathias Agopian db89edc94b 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
2013-08-06 20:05:36 +00:00
Mathias Agopian a4e19521ac Binderize the consumer side of BufferQueue
While currently untested, this should allow to move the
BuffereQueue in the consumer process and have everything
work as usual.

Bug: 9265647

Change-Id: I9ca8f099f7c65b9a27b7e7a3643b46d1b58eacfc
2013-08-01 17:20:08 -07:00
Mathias Agopian 87f9b87796 remove unused code form GraphicBuffer
Change-Id: I0dd67f1f93f654331e8f17b55730931dbc695ca7
2013-07-31 20:10:10 -07:00
Alex Ray b304edb0b1 remove libutils
libutils is being moved from frameworks/native/ to system/core/ in order
to facilitate native C++ platform (non-frameworks) code.

Change-Id: I44089fb960591a40b8a9c30faabb10459d107d71
2013-07-31 13:48:57 -07:00
Mathias Agopian e142428a9c Make Flattenable not virtual
Fallout from the Flattenable change, update all its uses.

Additionnaly, fix/tighten size checks when (un)flatten()ing
things.

Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)

The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).

Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
2013-07-30 21:19:13 -07:00
Mathias Agopian 1d76781b7a Make Flattenable not virtual (libutils)
Making an object Flattenable doesn't force it to
become virtual anymore. For instance, Fence and GraphicBuffer
are now non-virtual classes.

Also change Flatennable protocol a bit so that it updates
its parameters (pointers, sizes) to make it easier
to implement a flattenable in terms of other flattenables.

Change-Id: Ie81dc7637180b3c2cfcbaf644f8987ca804eb891
2013-07-30 21:19:02 -07:00
Wink Saville f97b6e218a am 9f476fd0: Merge "Add a symbol to represent MNC=0"
* commit '9f476fd08079701d1ad0f7c591667b6e673ed38e':
  Add a symbol to represent MNC=0
2013-07-30 12:28:02 -07:00
Mathias Agopian ad678e18b6 single buffer mode for BufferQueue
Bug: 9891035
Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
2013-07-26 18:45:02 -07:00
Mathias Agopian c2414bb098 get rid of HAL pixelformats 5551 and 4444
Change-Id: I39409103144c1ba09078c4ddc323a58987fb09ea
2013-07-26 15:43:33 -07:00
Johan Redestig 8df483c1fd Add a symbol to represent MNC=0
Bug: 7170488
Change-Id: Icfd39fd0c739216e89446252ea0e7ceba6f002c6
2013-07-26 18:39:09 +00:00
Mathias Agopian 5773d3f5b2 get rid of PixelFormatInfo and simplify things
Change-Id: I025a362cc12d5b9b794fac14be500e25aab65396
2013-07-25 19:24:31 -07:00
Mathias Agopian 1fe854f678 get rid of PIXEL_FORMAT_A_8
Change-Id: I4e409a69c01b95b48f20112084dd927e2d043407
2013-07-25 17:25:05 -07:00
Todd Poynor 87bf0d97be add libbatteryservice
IBatteryPropertiesListener is used by clients such as BatteryService to
receive notifications of changed battery/power status (from healthd).

IBatteryPropertiesRegistrar manages registrations of
IBatteryPropertiesListener clients.

Add BatteryService native header with defines from BatteryManager, and
class BatteryProperties to pass battery/power status around.

Change-Id: I44e2736e503b586794097b7b9d31d07fefd9b15a
2013-07-25 01:57:32 +00:00
Alex Ray 194bc4ff7b libutils: give BasicHashtableImpl a virtual destructor
Change-Id: I4ec590b060d732af5fe525670becbe778684247b
2013-07-24 00:21:57 -07:00
Alex Ray ea3d82cfef utils: move thread enums to system/core
Change-Id: Ia97963cc9acf8661d01355786f5e7e7bf54581c2
2013-07-23 17:23:36 -07:00
Colin Cross 4ee6cbebfe Merge "libbinder: include sys/uio.h instead of cutils/uio.h" 2013-07-23 23:35:48 +00:00
Colin Cross f5f8fa0bbd libbinder: include sys/uio.h instead of cutils/uio.h
libbinder is only built for the target, where bionic will provide
uio, so it does not need to include the libcutils wrapper around
uio for windows.

Change-Id: Ifc2dd353bf7ed51bf08ec0ae91c43b12830f94ba
2013-07-23 14:52:34 -07:00
Michael Wright 0415d63b1a Add controller numbers for gamepads / joysticks
Change-Id: I5294aabbadb836a6a4c7ce76a670abcf50c1f885
2013-07-22 16:37:28 -07:00
Mathias Agopian bdce817047 Merge changes Ic45929f3,Ic63f4f96,I1e703d36,I691f9507
* changes:
  make sure to reset the framenumber when a buffer is marked FREE
  Make ANW.setSwapInterval(0) work again
  BuffferQueue disconnect is now always asynchrnous
  BufferQueue improvements and APIs changes
2013-07-20 01:02:47 +00:00
Mathias Agopian 7cdd786fa8 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
2013-07-19 17:38:01 -07:00
Michael Wright e5bb2a45e0 Merge "Add input device property for buttons under touchpads" 2013-07-19 22:45:38 +00:00
Mathias Agopian a3fbda3cef BuffferQueue disconnect is now always asynchrnous
we tag queued buffers with the "bufferqueue cannot block" flag
and use that bit to discard a buffer in the queue by new ones
comming in. this allows us to remove the buffer queue drain in
disconnect while maintaining the right behaviour if it gets
connected again (since each buffer remembers how it was enqueued).

Change-Id: I1e703d363a687b70b19ba49cef32213116e8bd3f
2013-07-18 22:28:18 -07:00
Mathias Agopian 595264f1af 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
2013-07-18 22:28:18 -07:00
Dianne Hackborn 1962f65137 Merge "Follow framework change to track started ops by proc." 2013-07-18 18:13:14 +00:00
Dianne Hackborn 913b63d235 Follow framework change to track started ops by proc.
Change-Id: Ibbce3bf6556f45751c74bab045b46377e56bff9b
2013-07-17 17:26:15 -07:00
Lajos Molnar 3ec92e1ad7 Merge "Clarify some android-specific OMX extensions for native buffers." 2013-07-17 22:30:28 +00:00
Lajos Molnar 5f39f6043d Clarify some android-specific OMX extensions for native buffers.
Clarify the use of enableAndroidNativeBuffers and
storeMetaDataInBuffers extensions.

Change-Id: Ia1ca4a262525de74f133619f92ef6ba8271a6f72
Signed-off-by: Lajos Molnar <lajos@google.com>
2013-07-17 15:12:27 -07:00
Jean-Baptiste Queru b6a0ca7276 Tweaks for forward compatibility
Change-Id: Id6a96521b3fd5bd2a034fe89cfa4d3a179a66328
2013-07-16 09:38:03 -07:00
Mathias Agopian 7f069d79e7 Merge "always pass the BufferQueue explicitely to consumers" 2013-07-16 02:17:58 +00:00
Jeff Brown 7556c37b1c Merge "Completely remove skia dependency from libinput." 2013-07-16 01:49:55 +00:00
Jeff Brown 313eff7bb7 Completely remove skia dependency from libinput.
Including the tests...

Change-Id: I6ec8f1a5ae7e7514831d7e3b430b3b37b0841b92
2013-07-15 18:49:00 -07:00
michaelwr 174c26045c Merge "Add a keycode to switch audio tracks (2/2)" 2013-07-16 01:38:36 +00:00
Jeff Brown 5a2f68e5a5 Fix PDK build.
Quick hack to remove Skia dependency from libinput.

Change-Id: Ibaf2e312236f5e3f7251fa903ce381456a77467c
2013-07-15 17:31:13 -07:00
Jeff Brown 40c9e0a398 Add skeleton of input flinger.
Change-Id: I7f25080e446d4d3d9de9b18fe432a09bc751e0d9
2013-07-15 16:03:14 -07:00
Jeff Brown ada11c5e67 Make getCallingUid/Pid const.
Change-Id: I1853b21eaa45d85274189dfd72f73fec48d0d6b7
2013-07-15 15:08:39 -07:00
Mathias Agopian 8f938a5338 always pass the BufferQueue explicitely to consumers
Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
2013-07-12 22:06:26 -07:00
Jaekyun Seok 8d06dcf9c6 Add a keycode to switch audio tracks (2/2)
A key to switch audio tracks is general on media devices like blu-ray.

Bug: 9728155
Change-Id: I13ebbc64321f3cf10370f9a605f3d94ea0d16d6d
2013-07-12 17:23:45 +09:00
Michael Wright 931fd6dee7 Add input device property for buttons under touchpads
Bug: 8990644
Change-Id: I6df5fb9e11199173d62523928082db428af55394
2013-07-11 15:24:09 -07:00
Andy McFadden c33f9a76b5 Merge "Pay attention to buffer timestamps" 2013-07-11 14:40:45 +00:00
Andy McFadden 1585c4d9fb 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
2013-07-10 15:38:40 -07:00
Mathias Agopian ba02cd2f6c improve sensorservice's dumpsys
it now displays the reported trigger mode properly, as well as
the number and type of the last received data

Change-Id: I2ff64b32ab71f1332bc2e09671c8c02bb9550490
2013-07-08 15:44:41 -07:00
Mathias Agopian cf90bad477 Merge "simplify some unnecessary complex code" 2013-07-08 22:34:55 +00:00
Mathias Agopian 7438fd1a01 simplify some unnecessary complex code
getSensorType() ran in O(n) instead of O(1). fix that.

Change-Id: Idcf29e46fc34db32604a0d8e5a9156486783b74f
2013-07-08 12:50:39 -07:00
Glenn Kasten 06b6aed2f1 Merge "mv libcpustats from frameworks/native to frameworks/av" 2013-07-08 15:40:51 +00:00
Todd Poynor 8d96cab8bf binder: add polling / single-threaded operation
This is currently safe to do only for processes that disallow any binder
threads to be created: setThreadPoolMaxThreadCount(0).

Change-Id: I8a27f3cf26f4d51edb7f222af487ac256cbcab65
2013-07-04 00:19:09 +00:00
Jean-Baptiste Queru f4f2bd21d5 Tweak for forward compatibility
Change-Id: I6be78b607789c469f4ffad849a493d78e2539450
2013-07-02 11:33:43 -07:00
Jeff Brown 5912f95d26 Move input library code from frameworks/base.
Change-Id: I4983db61b53e28479fc90d9211fafff68f7f49a6
2013-07-01 20:11:26 -07:00
Lajos Molnar bfc41519ce Merge "Add video extension OMX_VIDEO_CodingVP9 to support VP9 decoder." 2013-06-25 22:07:39 +00:00
Andreas Huber 00e595f10f Fix includes in HardwareAPI.h to be absolute and not relative
(but using system header syntax)

Change-Id: I504c5c5330ddd1e3b3d2fb4760b0235a4fda84d8
2013-06-25 10:08:42 -07:00
hkuang 5195e0808b Add video extension OMX_VIDEO_CodingVP9 to support VP9 decoder.
Change OMX_Video_CodingVPX to OMX_VIDEO_CodingVP8 in order
to be consistant with official OMX_VideoExt.h and avoid the
confusion with new extension OMX_VIDEO_CodingVP9.

This change needs to be merged with changes in frameworks/av to
avoid build break due to header change.

Change-Id: Iaa2dbafa76dc24ad3cf52a9bf3dee312e3c64bfa
2013-06-24 13:45:15 -07:00
Lajos Molnar 0077db94d5 Merge "media/hardware/HardwareAPI.h: Added metadata struct used by video decoder" 2013-06-24 17:47:16 +00:00
Lajos Molnar 07d93d197a media/hardware/HardwareAPI.h: Added metadata struct used by video decoder
This is the metadata layout when used by the video decoder.

Change-Id: I3497305ad23b3fc4e1e8eaaea7b0890bc1ffd5ad
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 7093648
2013-06-21 12:05:39 -07:00
Glenn Kasten abd070ee43 mv libcpustats from frameworks/native to frameworks/av
OK to lose history

Change-Id: I18bfd988f19d037e480c27134eea21c8edcbfbf3
2013-06-18 09:38:41 -07:00
Zhijun He b4b63704c0 CpuConsumer: Add set buffer size and format functions.
Add setDefaultBufferSize() and setDefaultBufferFormat(). ImageReader JNI need
them.

Bug: 9254294
Change-Id: I7d2464d43b0ca73fbb834ed22cecbfbb30eef60c
2013-06-10 13:34:01 -07:00
Zhijun He ae772278fe CpuConsumer: Remove CpuConsumer JNI ID.
Not used anywhere, and it is pretty confusing to have it here.

Bug: 9254294
Change-Id: I12b761532918b546a0f56c74ccf81b2c119ccd66
2013-06-03 10:42:05 -07:00
Michael Wright ae4d9dd0da Merge "Added bitwise-or and bitwise-and to BitSet" 2013-05-31 03:31:49 +00:00
Michael Wright 24beb02a7a Added bitwise-or and bitwise-and to BitSet
Change-Id: I9bbf41f9d2d4a2593b0e6d7d8be7e283f985bade
2013-05-30 18:40:04 -07:00
Jeff Sharkey 05431a94d4 Merge "Bring back overloading to print String8/16." 2013-05-30 21:33:36 +00:00
Andrew Hsieh fa7d40331c am 75765d3a: am 1c45dc66: Merge "Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event"
* commit '75765d3af58ad7ed97c0d646c936294ba861848f':
  Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event
2013-05-30 14:23:56 -07:00
Jeff Sharkey 8cb8925921 Bring back overloading to print String8/16.
Change-Id: Iecab20db2b8574d5f1e6fdefdc2c8d4ce6c37121
2013-05-30 14:04:28 -07:00
Andrew Hsieh 75765d3af5 am 1c45dc66: Merge "Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event"
* commit '1c45dc66c77f0ddb246a55d780206a183740ff7f':
  Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event
2013-05-29 18:33:33 -07:00
Andrew Hsieh 1c45dc66c7 Merge "Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event" 2013-05-30 01:30:48 +00:00
Jeff Brown ad8ce82396 am 31ab96fc: am 135e4dbd: Merge "utils: Allow non android namespaces to use ALOGD_IF_SLOW"
* commit '31ab96fcc1810e044f8bdb35d3bfbbba2fa6bafd':
  utils: Allow non android namespaces to use ALOGD_IF_SLOW
2013-05-28 15:52:26 -07:00
Jeff Brown 31ab96fcc1 am 135e4dbd: Merge "utils: Allow non android namespaces to use ALOGD_IF_SLOW"
* commit '135e4dbd65d49730fbd6f830de7b303e01d20d5f':
  utils: Allow non android namespaces to use ALOGD_IF_SLOW
2013-05-28 15:46:03 -07:00
Jeff Brown 135e4dbd65 Merge "utils: Allow non android namespaces to use ALOGD_IF_SLOW" 2013-05-28 20:20:15 +00:00
Andrew Hsieh 26c2416281 Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event
See b.android.com/55873

Change-Id: I92c549e1a595662d4df8fa0e47675ccb2b8814fd
2013-05-27 12:26:04 +08:00
Lajos Molnar 9e3cb55b8f BufferQueue: remove freeAllBuffersExceptHeadLocked()
Now that we are having separate buffer-instances for the buffer-
queue, we can free all buffers; we don't have to keep the head
alive.

Change-Id: I023e9161a2501d99333f8868ce438afa914ec50f
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
2013-05-23 22:21:13 +00:00
Lajos Molnar c5d7b7d323 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
2013-05-23 22:17:54 +00:00
Tim Murray d837969640 Make trace macros slightly more robust
Change-Id: I9544eb7b27fc1a971cabadd8d5b4b4b80678febf
2013-05-23 13:44:08 -07:00
Dianne Hackborn 80d7fd86e0 Power manager now takes calling package name arg.
Change-Id: Iae57b8eb7abe4e66f0d2645db8cdf57acf7dcd3e
2013-05-20 16:50:10 -07:00
Chong Zhang cb5368356e Merge "wifi-display: add support for metadata mode on encoder output" 2013-05-18 00:02:10 +00:00
Mathias Agopian 2381033ad0 am e6eef6c1: am ea74d3b7: make the warning timout of Fence::waitForever() implicit and longer
* commit 'e6eef6c136b007f3a7e1e19884875b855c0c5f95':
  make the warning timout of Fence::waitForever() implicit and longer
2013-05-17 10:18:45 -07:00
Mathias Agopian ea74d3b78d make the warning timout of Fence::waitForever() implicit and longer
- timeout is now 3 seconds instead of 1
- simplifies the API a bit
- allows us to change/tweak this timeout globaly

Bug: 8988871

Change-Id: I8d3c6ec43a372f602fb3f29856710339f86c0ec9
2013-05-16 18:15:57 -07:00
Chong Zhang 685e68130b wifi-display: add support for metadata mode on encoder output
Bug: 8968123

Change-Id: I3d2b567d4908f5f49c0694589920babe1f6752cd
2013-05-16 15:58:31 -07:00
Mathias Agopian f3e85d4327 take the "transparent region" into account for blending
until now it was only used to discard a layer entirely.
we're now reducing the size of the layer if it is still
visible, if possible.

this works for instance when a surfaceView is used and
only the menu bar is displayed over it.

Change-Id: I3f5527c5cd1e69ecc968272c8948f1513ada8c55
2013-05-10 18:35:43 -07:00
Mathias Agopian 6c7f25afb7 reformat Rect.{cpp|h}
Change-Id: I45b1f6646541a1abacce1e70df00a770e47b820e
2013-05-10 18:03:31 -07:00
Mathias Agopian b6df7d0e4c make all libsurfaceflinger and libsensorservice symbols's visibility hidden
we only export the main entry-point.
this saves about 150KB.

Change-Id: I55eb2b6705386fdfa43860deb62f9cdd2a0982aa
2013-05-09 16:51:37 -07:00
Mathias Agopian 5d85d72a17 remove unused declarations and reformat
Change-Id: I4e168fb62c275e02621c4b6e0c6000d0f006c327
2013-05-09 14:57:05 -07:00
Mathias Agopian a6cb0397da remove reserved virtual slots
these consume small amount of space (plt) in every library that
links against libutils.

Change-Id: I1b6b3dd9098aa5a051243f7a5dbf91cd7dcb8b2c
2013-05-09 14:57:05 -07:00
Eino-Ville Talvala d487ca1ab3 am 87ab83d9: am f743e3db: Merge "Add support for HAL_PIXEL_FORMAT_YCbCr_420_888" into jb-mr2-dev
* commit '87ab83d96b9d826e94a7169a6205bcf9c2ee633a':
  Add support for HAL_PIXEL_FORMAT_YCbCr_420_888
2013-05-09 10:19:01 -07:00
Eino-Ville Talvala f743e3db27 Merge "Add support for HAL_PIXEL_FORMAT_YCbCr_420_888" into jb-mr2-dev 2013-05-09 17:13:22 +00:00
Mathias Agopian 57e5144a31 Merge "new String8, String16 ctors to initialize empty static strings with static linkage" 2013-05-09 01:13:51 +00:00
Mathias Agopian 8050299f5b new String8, String16 ctors to initialize empty static strings with static linkage
when libutils is statically linked, the ordering of the static
initializer is not guaranteed and therefore it's unsafe to use
empty static strings: e.g.:

static String8 sThisStaticStringIsNotSafe;

instead, this new constructor can be used:

static String8 sThisStaticStringIsSafe(kEmptyString);

Change-Id: Ia3daf1cab1c97d021c0ee9c2b394b5e27e8d6c0d
2013-05-08 18:13:07 -07:00
Jeff Tinker dc1b01141f am 2c228354: am b84d1cad: Correct native API documentation related to MediaDrm offline use case
* commit '2c2283549c72184145c9f030bbfe6124ee75d169':
  Correct native API documentation related to MediaDrm offline use case
2013-05-08 15:03:40 -07:00
Mathias Agopian 002e1e58df libutils clean-up
Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
2013-05-07 18:28:11 -07:00
Jeff Tinker b84d1cad1d Correct native API documentation related to MediaDrm offline use case
These doc updates were made previously to the java API but some
did not make it into the native API.

Change-Id: I9b7bfcd77bc593685254baca1c148deb7e1f91c7
related-to-bug: 8621588
2013-05-07 15:16:40 -07:00
Dianne Hackborn ffad7d1fdc Add new Looper API to check whether the looper is idle.
This is just to support the watchdog to give it a faster
way to determine if a thread is deadlocked without having
to post a message to it.

Change-Id: I068dc8b9387caf94fe5811fb4aeb0f9b57b1a080
2013-05-07 15:05:34 -07:00
Eino-Ville Talvala c43946b931 Add support for HAL_PIXEL_FORMAT_YCbCr_420_888
- Add fields to CpuConsumer::LockedBuffer for new information
- New lock methods for GraphicBuffer and GraphicBufferMapper for
  the format

Bug: 8734880
Change-Id: If31f82c62d64b6942cf4cc6e5715585c03273f12
2013-05-06 17:24:05 -07:00
Mathias Agopian bdcf1fe2ba Merge changes I0d9f18d1,Ib96c9161
* changes:
  Add a --color option to dumpsys SurfaceFlinger
  clean-up/simplify all dump() APIs
2013-04-24 10:25:34 +00:00
Mathias Agopian 6bbd8e30b5 am 3cf76aff: am e692ab9a: fix uninitialized variables in GLConsumer
* commit '3cf76affd3ef28759789622e9e0134bdb045418b':
  fix uninitialized variables in GLConsumer
2013-04-23 11:16:44 -07:00
Mathias Agopian 74d211ae26 clean-up/simplify all dump() APIs
remove the scratch buffer parameter and use
String8::appendFormat() instead.

Change-Id: Ib96c91617c8e7292de87433d15cf6232b7d591b0
2013-04-22 21:51:28 +02:00
Mathias Agopian e692ab9a6b fix uninitialized variables in GLConsumer
mDefaultWidth, mDefaultHeight and mCurrentScallingMode are now
initialized to the same default value that BufferQueue uses.

Change-Id: I0d4da2022b06419d12745716d8ddbd48c8869953
2013-04-22 11:24:02 +02:00
Igor Murashkin 6ca04ca755 am f3d93d43: am 187edf93: Merge "BufferItemConsumer: add functions to set default buffer format/size" into jb-mr2-dev
* commit 'f3d93d436373dcc39ff0b7f4aac938f4619421a2':
  BufferItemConsumer: add functions to set default buffer format/size
2013-04-17 12:48:23 -07:00
Igor Murashkin 187edf93c6 Merge "BufferItemConsumer: add functions to set default buffer format/size" into jb-mr2-dev 2013-04-17 19:39:53 +00:00
Igor Murashkin 87d1e3427b BufferItemConsumer: add functions to set default buffer format/size
Bug: 8629088
Change-Id: I06f2e26a70d6dbcfcd70b08b4461e8e401f6e83f
2013-04-16 11:24:40 -07:00
Rom Lemarchand 1bc7e2f6dd Add support for OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m color format
Change-Id: I9392eb961ec92d4d778573b7a142344e552c80d6
2013-04-11 10:30:27 -07:00
Andy McFadden 53dc9044bf Merge "Updated comments" into jb-mr2-dev 2013-04-11 17:15:52 +00:00
Jamie Gennis 8758a3e394 Merge changes I82e361a6,I83694682 into jb-mr2-dev
* changes:
  libgui_test: increase the tolerance for a YUV test
  libgui: fix an EGLImage leak
2013-04-09 21:43:20 +00:00
Jamie Gennis ad669b04f4 libgui: fix an EGLImage leak
This moves the call to ConsumerBase::abandon from the ConsumerBase dtor to
ConsumerBase::onLastStrongRef.  The abandon call relies on virtual methods to
perform the clean-up, so calling it from the ConsumerBase dtor after the
derived classes dtors ran was skipping some of the clean-up.  The
onLastStrongRef method should get called just before the most derived class's
dtor gets called.

Bug: 8349135
Change-Id: I836946826927cc1ed69c049049f525f92b17a269
2013-04-08 14:42:22 -07:00
Andy McFadden 753e3415cd Updated comments
Updated many comments.  Added one minor error check.

Change-Id: Ib935dd99d417bada91d2e198008a50dd94269316
2013-04-05 10:44:23 -07:00
Jeff Tinker 18bd1d6d55 Merge "Implement async event callout from drm plugin to Java app" into jb-mr2-dev 2013-04-05 01:16:21 +00:00
Jeff Tinker 7eafcae5ff Implement async event callout from drm plugin to Java app
Change-Id: I83a7757a7b83676ce1a9ffa6ff0a8e495e31b859
2013-04-03 12:02:59 -07:00
Mathias Agopian 2ca79399b9 latch transparent region hint only when we get a new frame
since the transparent region hint really depends on the
content of the window containing the SurfaceView
(it's calculated by the view hierarchy based on
overlapping views), it makes sense to latch it only when
the content of the window (the app) changes.

This should help fixing drawing artifacts when changing the
layout of a window containing a SurfaceView.

Bug: 8511430
Change-Id: Ic3aa668495293cb4d82a2cd7dcf3b6a337287678
2013-04-02 18:30:32 -07:00
Jeff Tinker 263e8cb29c Merge "MediaDrm API update" into jb-mr2-dev 2013-04-02 22:49:23 +00:00
Jeff Tinker bcbd78bd24 MediaDrm API update
Clarify offline usage of sessions and keys and implement
implement CryptoSession to support additional crypto use
cases.

Change-Id: I418ffbb37e3036a2b5eea5a86ac88a5af1a9da07
2013-04-01 22:01:10 -07:00
Mathias Agopian ca08833d5e don't use compile-time configuration of libgui as much as possible
We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There  is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).

- added a backdoor to get the vendor's EGL strings

the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
  by the compile-time option
- use KHR_wait_sync if available and either of the above is
  enabled

Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
2013-03-29 15:33:47 -07:00
Mathias Agopian 8000d0694b make sure to unlock the screenshot's buffer on destruction
this fixes a memory leak on various devices

Bug: 8475134
Change-Id: I25924674c803a0cb22371a95c60664c36acb0340
2013-03-26 18:15:35 -07:00
Jesse Hall 13f01cbdbd Pass sp<Fence>s around instead of file descriptors
Change-Id: Iac70584a2207940730e8f803a543e4e9a4000c47
2013-03-22 09:56:58 -07:00
Mathias Agopian 7133f8638e Merge "improved CallStack a bit" into jb-mr2-dev 2013-03-22 04:15:33 +00:00
Mathias Agopian cab25d680e improved CallStack a bit
- added a ctor that updates and dumps the stack immediately
- added a "logtag" parameter to dump()

Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
2013-03-21 17:12:40 -07:00
Eino-Ville Talvala aaebffd52f Merge "CpuConsumer: Properly track acquired buffers" into jb-mr2-dev 2013-03-21 16:39:14 +00:00
Ramanan Rajeswaran ac006439bb Merge "Revert "Revert "Change SurfaceControl setPosition to take floats""" into jb-mr2-dev 2013-03-21 15:52:49 +00:00
Ramanan Rajeswaran d6480c020b Revert "Revert "Change SurfaceControl setPosition to take floats""
This reverts commit bbb57f3331

Change-Id: Ib8f039f530d6b8175b5205c6c0008b135d4001a2
2013-03-21 15:49:59 +00:00
Mathias Agopian ff7c2342e2 Merge "rework how we take screenshots for a CPU consumer" into jb-mr2-dev 2013-03-20 22:14:56 +00:00
Jeff Tinker 30041bd3a4 Merge "Updated MediaDrm API based on review input." into jb-mr2-dev 2013-03-20 16:47:34 +00:00
Mathias Agopian abe815dd69 rework how we take screenshots for a CPU consumer
We're not using IMemoryHeap as a transport anymore,
instead we're providing a CpuConsumer and use the
IGraphicBufferProducer version of the screenshot API.

However, some GPU drivers don't support properly
a GPU to CPU path, to work around this, we use a
temporary BufferQueue on the server side for the
GL rendering, and we use glReadPixels into the
CpuConsumer (we're now using a CPU to CPU path
which is always supported).

Currently this "wrapping" is always performed,
but it can be bypassed on devices that support
the GPU to CPU path.

This also addresses a DoS attack vector on
SurfaceFlinger, where an application could
consume all of SF's filedescriptors by creating
a lot of screenshots in a row.

Bug: 8390553

Change-Id: I9e81514c2a7711b9bb393f74305be7d2abe08f1c
2013-03-19 22:22:21 -07:00
Mathias Agopian 4e37ddff43 Fix a crasher with RefBase debugging and vectors of wp<>
background:
we have some code to fix-up the IDs of references when
using RefBase's DEBUG_REFS when those refs are managed by
arrays wp<> or sp<> (this is because wp<> / sp<> don't have
a trivial ctor when DEBUG_REFS is enabled, and Vector
treats them as trivial for obvious performance reasons)

this is complicated by the fact that we don't want to have
to recompile everything when enabling DEBUG_REFs (i.e.: the
Vector code cannot know wheter it's enabled or not for its
template stuff).

problem:
there was a bug in the fix-up code for wp<> which was trying
to access the weakref_impl from the RefBase* however, this was
moronic since RefBase could have been destroyed if there wasn't
any more strong refs -- and this happned. Instead we need to get
the weakref_impl directly from the wp<>

Change-Id: Ie16e334204205fdbff142acb9faff8479a78450b
2013-03-19 16:41:56 -07:00
Jesse Hall fae23b8757 Merge changes I61ae54f3,I57cb668e,I7a3f1e1a,Id28a2f9b into jb-mr2-dev
* changes:
  Add BufferQueueInterposer and use it for virtual displays
  Add DisplaySurface abstraction
  Fix argument types in IGraphicBufferProducer methods
  Minor cleanups/fixes before virtual display refactoring
2013-03-19 17:45:29 +00:00
Jesse Hall 4c00cc1114 Fix argument types in IGraphicBufferProducer methods
Bug: 8384764
Change-Id: I7a3f1e1a0584a70af04f9eafef900505389d2202
2013-03-18 14:16:02 -07:00
Jesse Hall 7adb0f8a9f 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
2013-03-18 14:16:02 -07:00
Jesse Hall ce7e278151 Merge "Add Vector::resize()" into jb-mr2-dev 2013-03-16 03:23:13 +00:00
Mathias Agopian 041a075262 don't allow screenshots without the READ_FRAMEBUFFER permission
the recent screenshot rework allowed the older screenshot
interface to work without that permission

Change-Id: I6c4743f4591c81106e3b823d55a055f7b4907de1
2013-03-15 18:39:16 -07:00
Jesse Hall e81421e1cb Add Vector::resize()
Bug: 8384764
Change-Id: Icee83d389f3e555eba7d419b64c8d52a9aa21b8b
2013-03-15 12:40:39 -07:00
Elliott Hughes c47f0988a3 Revert "Add a compatibility symbol for the MemoryBase constructor."
Cherry pick from AOSP to fix the build.
See https://android-review.googlesource.com/#/c/53690/

This reverts commit 7f974ff2f3

Change-Id: I1b123f446d0ff41e11ff81d4ef5f1472b59cac93
2013-03-14 10:51:17 +00:00
Elliott Hughes 5ca39ea57a am 9b57ad73: am 8facd1b2: Merge "Add a compatibility symbol for the MemoryBase constructor."
* commit '9b57ad737bceba9f8d4f5be303c70fa72be00eaf':
  Add a compatibility symbol for the MemoryBase constructor.
2013-03-13 23:11:00 -07:00
Elliott Hughes 6dbf07d7d5 Revert "Add a compatibility symbol for the MemoryBase constructor."
This reverts commit 7f974ff2f3

Change-Id: I28ebfc5ac88bd025471b613aa7958d23749e6991
2013-03-14 02:56:34 +00:00
Elliott Hughes 7f974ff2f3 Add a compatibility symbol for the MemoryBase constructor.
Third-party libraries are currently trying to use the
MemoryBase constructor but failing because we fixed the
definition of ssize_t. This is a stop-gap for users of
this private API until we can get them fixed.

Bug: 8253769
Change-Id: I8a19770f3252d88ee87023fde625cc6289924b0d
2013-03-13 18:19:20 -07:00
Jeff Tinker 56c78c47d8 Updated MediaDrm API based on review input.
Change-Id: I06716d2616bbe7efaea6cbf9ba7bf303dfae1650
2013-03-13 13:35:36 -07:00
Mathias Agopian 35ffa6a868 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
2013-03-12 18:45:09 -07:00
Mathias Agopian 4d9b822e2c get rid of ISurface
ISurface was only used to get the IGraphicBufferProducer from
a Layer. It's now replaced by a BBinder subclass / IBinder and
is only used as a handle to the surface, to both refer to it
and manage its life-time.

Also cleaned-up a bit the ISurfaceComposer interface and
"create layer" code path.

Change-Id: I68d0e02d57b862cffb31d5168c3bc10cea0906eb
2013-03-12 17:11:48 -07:00
Michael Wright 2aee1b01b7 Merge "Add TOUCH_NAVIGATION input source" into jb-mr2-dev 2013-03-12 01:15:48 +00:00
Romain Guy dbca4a0ee5 Merge "Add Thread::isRunning and Condition::signal(WakeUpType)" into jb-mr2-dev 2013-03-11 21:38:26 +00:00
Romain Guy 9447be65c3 Add Thread::isRunning and Condition::signal(WakeUpType)
The signal() method is useful to choose whether to wake up one or
all threads.

Change-Id: I062ab6d3ddd306a9fb735549ea140e2a76eed75a
2013-03-11 14:34:56 -07:00
Michael Wright aadaca7169 Add TOUCH_NAVIGATION input source
Change-Id: Id76e2e85246269ba7b16bb9635e41593b45cac1c
2013-03-11 14:20:14 -07:00
Mathias Agopian e3e43b384e rename binder services main thread to Binder_*
When a binder service's main thread joins the thread pool
it retains its name (whatever the exec name was), which is
very confusing in systrace.

we now rename that thread just like its friends in the
thread pool.

Change-Id: Ibb3b6ff07304b247cfc6fb1694e72350c579513e
2013-03-07 15:34:28 -08:00
Mathias Agopian e041716ba1 Make GraphicBuffer a RefBase
- this gives us access to RefBase's refcounting debugging
- it doesn't cost much because GraphicBuffer already has a vtable

Change-Id: I7f696e421fea14b14bfaeb83880689b83e96af4d
2013-03-06 18:50:52 -08:00
Jean-Baptiste Queru d82bea798e Tweaks for forward compatibility
Change-Id: I136fcbbc14072ee5f5281d09445f28d083ed3ce1
2013-03-06 15:26:54 -08:00
Mathias Agopian 089a15298e Remove support for ScreenshotLayer
Change-Id: I5b571a4cf3faa77d2c4aca916fa4bd00a1065bb9
2013-03-05 19:52:29 -08:00
Eino-Ville Talvala 042ecee2ab CpuConsumer: Properly track acquired buffers
CpuConsumer cannot simply assume a slot's buffer is the same buffer
between acquire and release, and therefore it could be possible for
the same slot to get used for a second acquired buffer, if there's a
producer disconnect in between. This would cause a problem when the
first buffer is released by the consumer.

Instead, use an independent list of acquired buffers to properly track
their state.

Bug: 8291751
Change-Id: I0241ad8704e53d47318c7179b13daed8181b1fab
2013-03-05 15:25:06 -08:00
Mathias Agopian 306f18c5fb Merge "rework screenshot API and implementation" into jb-mr2-dev 2013-03-05 02:30:13 +00:00
Mathias Agopian 2a9fc493df rework screenshot API and implementation
- SurfaceFlinger now supports to take a screenshot
  directly into an IGraphicBufferProducer

- reimplement the IMemoryHeap screenshot on top
  of the above

- reimplement LayerScreenshot such that its
  BufferQueue is directly used as the destination
  of the screenshot. LayerScreenshot is now a thin
  wrapper around Layer

Bug: 6940974

Change-Id: I69a2096b44b91acbb99eba16f83a9c78d94e0d10
2013-03-01 22:53:39 -08:00
Dave Burke bbb57f3331 Revert "Change SurfaceControl setPosition to take floats"
Temporary, to fix weekend build, until we get Nvidia code drop.

This reverts commit 9a867a8798

DO NOT MERGE

Change-Id: I7b5dbc4db46ef3d97dc8598057d5487d6971178b
2013-03-01 16:06:48 -08:00
Eino-Ville Talvala eb0d12963d CpuConsumer: Add optional asynchronous mode
Bug: 8290146
Bug: 8291751

Change-Id: I9c8ac4bff38b0411e987a204e540d018dba6d0b4
2013-02-28 15:51:24 -08:00
Eino-Ville Talvala 64d8b1903e CpuConsumer: Don't unlock buffers on producer disconnect
Bug: 8291751

Change-Id: I062a3d34b41183d07fb6b9109cdb6bf0c0c75672
2013-02-28 14:20:28 -08:00
Chris Craik 3e010f3138 Add createTJunctionFreeRegion
T-junction free regions are useful for rendering regions with various
geometric transformations, and the Region's span-ordered, sorted rect
list supports T-junction free storage without modification.

This approach creates a T-junction free region by splitting each
rectangle that is part of a vertical T-junction. This approach is two
pass (up and down) so that divisions can trickle up/down to other
adjacent spans.

Change-Id: Ifcf5e6fe0034c96b00ef09a4433b2b0fce8f4300
2013-02-27 11:13:03 -08:00
Igor Murashkin 89592bbede GraphicBuffer.h: Remove redundant friend class declaration causing warnings
Change-Id: I8a4b0e0b4d0a1cf472de820553c31f2d42044543
2013-02-26 14:23:11 -08:00
Michael Wright 9a867a8798 Change SurfaceControl setPosition to take floats
Bug: 8153162
Change-Id: If3c4b7a3e124ace25999eb9a569dc9a806a1fbc2
2013-02-21 22:42:07 -08:00
Mathias Agopian a7121cf44b Merge "get rid of Surface::getISurfaceTexture()" 2013-02-21 23:23:21 +00:00
Mathias Agopian cf0b8c85fb get rid of Surface::getISurfaceTexture()
this was there just for legacy reasons.

Change-Id: I0a48d6e04d7efa65033f9f10c91bba557f16ae8b
2013-02-19 18:24:40 -08:00
Eino-Ville Talvala e88a85e0d0 Fixes to native app ops services
Bug: 8181262
Change-Id: I3d3f20453f6c6f2756c988363c5b5453ef309cb6
2013-02-19 18:10:05 -08:00
Mathias Agopian c4905eb49d fix build: SurfaceTextureClient to Surface rename
Change-Id: I0041e6f49bc637bc52161c83f0bd44101246f480
2013-02-15 16:34:04 -08:00
Mathias Agopian f25c5086cf fix build: SurfaceTextureClient to Surface rename
Change-Id: I54d68241f1080eef640aefe71f33912ad79345ef
2013-02-15 14:59:09 -08:00
Naseer Ahmed 30717e043a utils: Allow non android namespaces to use ALOGD_IF_SLOW
Change-Id: I9207b64954fae2f56cc5f6aa5796a2e737400623
2013-02-15 12:30:24 -05:00
Mathias Agopian e3c697fb92 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
2013-02-14 19:19:05 -08:00
Mathias Agopian 6d9b9dfd55 remove access ANDROID_VIEW_SURFACE_JNI_ID
Change-Id: I0ef474ed9be2cd26fa520ef871ffcf21a25e4994
2013-02-13 15:27:08 -08:00
Mathias Agopian ac9fa427d4 get rid of Surface identity and token
we use the IBinder instead.

Change-Id: I4aa0b58869ba43f19980013620051e5a261b062d
2013-02-13 15:27:08 -08:00
Dianne Hackborn c8a1e10fd2 Merge "Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!" 2013-02-12 23:54:28 +00:00
Dianne Hackborn 6303d06ece Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!
Change-Id: I1bb630c58d0d41446b726de1b9d2c3875fcbbceb
2013-02-12 15:36:31 -08:00
Dianne Hackborn 5da5ca520c App ops: new native access API.
This is to help implementation of bug #8181262 and maybe
bug #8181261

Note the current code has not yet been tested; it is only
known to compile at this point.

Change-Id: I489674c96d0d3fc0ddacc92611931a19a9ee5230
2013-02-12 15:13:37 -08:00
Kunter Gultekin 203f89a75a Adds some OpenMAX 1.1.2 IL extension headers.
Includes index and video extension headers
in order to support vpx specific parameters
and enable vpx encoder.

Note that existing (seemingly modified) version
of OMX_Video.h semantically conflicts with
official OMX_VideoExt.h because former includes
OMX_Video_CodingVPX as OMX_VIDEO_CODINGTYPE
whereas official extension headers denote
it as OMX_VIDEO_CodingVP8 within
OMX_VIDEO_CODINGEXTTYPE.

Change-Id: Ibab9663fcbc9c406a2cfb4bf79fe21e3b01a6e66
Signed-off-by: Kunter Gultekin <kuntergultekin@google.com>
2013-02-07 12:16:05 -08:00
Michael Wright cf89c76ee0 Merge "Add keycodes for brightness up/down" 2013-02-01 22:36:07 +00:00
Michael Wright e85650d603 Add keycodes for brightness up/down
Change-Id: I8ed56b510c46f372df0fc71e1735c72058efc677
2013-01-31 15:14:54 -08:00
Andreas Huber 0dcde5213b Extend the HDCP API to also allow for a _decryption_ module, the counterpart
to what we previously defined exclusively.

Change-Id: I774d3cd7146da77675dcb90e33c9552cb7b10ac6
2013-01-30 10:40:28 -08:00
Marco Nelissen 62b40b3535 Add new format constant
Change-Id: I8a53c69c9e44450b7ee3d32750965d53265812bf
2013-01-17 09:18:29 -08:00
Andy McFadden 882e3a39ed Add some comments.
Also, minor tweak to SurfaceTextureLayer.

Change-Id: If616d5ee4e8226dd0e16c5dbb0e0f80db553110e
2013-01-11 10:16:10 -08:00
Andy McFadden 466a192d20 Minor tweaks.
Change-Id: I9f82f574112141b6aa074c42303056cd52d5c478
2013-01-08 11:25:51 -08:00
Jeff Tinker 8ab80a2d71 Add DRM Client API header files for DASH support
Change-Id: Ia4cdcbe193d087d33e2ee91e6f5364cbcc237554
2012-12-19 16:34:37 -08:00
Andy McFadden 2adaf04fab 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
2012-12-18 13:10:48 -08:00
Andy McFadden 0273adbf0b 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
2012-12-17 12:40:50 -08:00
Andrew Hsieh 44615b8818 am 8d9f0118: am fdd8551f: Merge "Fix build"
* commit '8d9f0118926d54b5a5fc1508a7c43aa661839f1f':
  Fix build
2012-12-16 16:36:43 -08:00
Andrew Hsieh 8d9f011892 am fdd8551f: Merge "Fix build"
* commit 'fdd8551fe83754846cb91e2d7325ef90d2e0fb28':
  Fix build
2012-12-16 16:35:31 -08:00
Andrew Hsieh 370980c528 Fix build
Change-Id: Ie011cbf74a08f760ccd93ca37fa2b437b7063462
2012-12-17 08:01:36 +08:00
Andrew Hsieh b41ad7ec0c am d8f2daad: am acfcd62a: Merge "Revert "Fix typo""
* commit 'd8f2daada3a828c5d9e6dfa29f53ab054618e129':
  Revert "Fix typo"
2012-12-15 21:24:37 -08:00
Andrew Hsieh d8f2daada3 am acfcd62a: Merge "Revert "Fix typo""
* commit 'acfcd62aa9300087d3e8cca79e59b0abdcaaee35':
  Revert "Fix typo"
2012-12-15 21:23:12 -08:00
Andrew Hsieh 4bb20303d9 am 670c570e: Merge "Fix typo"
* commit '670c570e75e399432e96c9fd1dfa3fb92869f10c':
  Fix typo
2012-12-15 21:23:12 -08:00
Andrew Hsieh c7d5fa98b5 Revert "Fix typo"
This reverts commit c118edfc1a

Need to go together with https://android-review.googlesource.com/#/c/48117/

Change-Id: Ib413be1035cfb1d18cc9cf4099694a308dadf8f5
2012-12-15 20:31:56 -08:00
Andrew Hsieh c118edfc1a Fix typo
Changed ANDROID_BITMAP_RESUT_SUCCESS -> ANDROID_BITMAP_RESULT_SUCCESS

Change-Id: I4e15e946107ea6f3d0955f72e97894512743c6ca
2012-12-16 11:20:34 +08:00
Andrew Hsieh 1aa652807b Merge "Fix typo" 2012-12-13 19:37:46 -08:00
Igor Murashkin 0859b78db2 Merge "utils: fix warnings for unused parameters" 2012-12-12 12:47:29 -08:00
Jamie Gennis 3c1ada9822 Merge "SurfaceTextureClient: remove a deprecated ctor" 2012-12-12 12:16:21 -08:00
Jamie Gennis 4def860030 SurfaceTextureClient: remove a deprecated ctor
Change-Id: Ibf2746fdca26851677cd90199c60eab80f6d0c73
2012-12-12 12:13:54 -08:00
Jamie Gennis c6f04666c2 Merge "SurfaceFlinger: Move GraphicBufferAlloc to libgui" 2012-12-12 10:56:42 -08:00
Andrew Hsieh 31e575b4a9 Fix typo
Changed ANDROID_BITMAP_RESUT_SUCCESS -> ANDROID_BITMAP_RESULT_SUCCESS

Change-Id: I4e15e946107ea6f3d0955f72e97894512743c6ca
2012-12-12 11:27:12 +08:00
Jamie Gennis 392edd88cb SurfaceFlinger: Move GraphicBufferAlloc to libgui
This change moves the GraphicBufferAlloc class from SurfaceFlinger to libgui.

Change-Id: Idf31d2004efa2651b60590733f73c4a7b831e8a9
2012-12-11 17:54:29 -08:00
Andy McFadden 97eba8904c Avoid unnecessary texture bind
In SurfaceFlingerConsumer, check to see if native fence sync is
enabled.  If so, defer the texture binding step to Layer::onDraw.

Change-Id: I7d4034a31c0143207eea2509dfa13ef3820f9b8c
2012-12-11 16:26:51 -08:00
Andy McFadden bf974abe92 Refactor SurfaceTexture a bit.
Rearranges updateTexImage() so that the SurfaceFlinger-specific
behavior is in a new SurfaceFlingerConsumer subclass.

SurfaceTexture behavior should not be altered.  Instead of
acquire-bind-release we now do acquire-release-bind, but since
it's all done with the lock held there shouldn't be any
externally-visible change.

Change-Id: Ia566e4727945e2cfb9359fc6d2a8f8af64d7b7b7
2012-12-11 09:42:51 -08:00
Jamie Gennis 7df16644c4 am 2d659286: am 2e59d2c3: DO NOT MERGE GraphicBufferAllocator: make frees async
* commit '2d659286b59dc7ff7378fe967f1c425e92155995':
  DO NOT MERGE GraphicBufferAllocator: make frees async
2012-12-07 10:59:29 -08:00
Jamie Gennis 2d659286b5 am 2e59d2c3: DO NOT MERGE GraphicBufferAllocator: make frees async
* commit '2e59d2c3fdc0bcfedbe9c5d04d7acadc3eff8887':
  DO NOT MERGE GraphicBufferAllocator: make frees async
2012-12-07 10:58:22 -08:00
Jamie Gennis 2e59d2c3fd DO NOT MERGE GraphicBufferAllocator: make frees async
This change makes GraphicBufferAllocator::free queue a job to another thread to
perform the actual free operation.  This prevents potentially slow free
operations from blocking rendering.

Bug: 7675940
Change-Id: Id61099d66bb4c3949d04184e0d7f192ac18076b4
2012-12-07 10:32:13 -08:00
Chris Craik 0a73f822b1 Add LinearAllocator
Moving from external/webkit/Source/WebCore/platform/graphics/android/utils/

Change-Id: If91830aa9b207dbc8692b2ca7c4a0b76778addd5
2012-12-05 17:34:54 -08:00
Igor Murashkin 6dbe6d4d0f utils: fix warnings for unused parameters
Change-Id: Ibfb755a30ba2923669060fe0aed019beecbe38a1
2012-12-05 16:10:26 -08:00
Alex Ray 653078f652 utils: clarify scoped tracing functionality
ScopedTrace objects were being used in place of ATRACE_NAME because of a
misunderstanding of it's function.  Cleared up documentation for usage.

Also explicitly use global namespace for sysprop callback.

Change-Id: I7c248b486b614ccdb841659ca0dcfc644fda670a
2012-11-30 19:54:00 -08:00
Alex Ray 72f320195c Merge "utils: Use cutils tracing functionality." 2012-11-29 13:36:26 -08:00
Alex Ray b7e06477f0 utils: Use cutils tracing functionality.
Tracing functionality has moved to cutils.

Change-Id: Ie78ccc1d59dd5178f5058fbc3858a37f9adce552
2012-11-29 13:33:14 -08:00
Romain Guy f1951df8a1 Add LruCache::Iterator
Required by libhwui

Change-Id: I164b9a4a82d89d132da01a56535c0df084de86f7
2012-11-28 18:26:54 -08:00
Romain Guy e402f1fde2 Add another ifndef and a couple of methods to LruCache
The new methods on LruCache are needed by libhwui to manage
the cache of paths.

Change-Id: If54fa325c54e2b04e7fe5dfe6dad66066c40127c
2012-11-28 17:37:03 -08:00
Romain Guy 98fc88d3ce Add #ifndef to prevent multiple definitions
Change-Id: Ib861eee0f333fe29290437b7e67623622d8dabd0
2012-11-28 12:59:40 -08:00
Jamie Gennis 82dbc7429f SurfaceFlinger: refactor frame time tracking
This change moves the frame time history tracking code out of Layer and into a
new class called FrameTracker.  It also changes the tracking to use signal
timestamps from fences when available for more accurate results.

Change-Id: I323c5f075c58bf86ce363b52af885ad0f6365f2b
2012-11-19 17:45:09 -08:00
Andy McFadden 2bdd8fd65a am 41f7736a: am 434e21bf: am 3fdeb48e: Reduce emulator logspam
* commit '41f7736ad1e72df8796416a82ce3cede6193d1eb':
  Reduce emulator logspam
2012-11-09 22:49:18 -08:00
Andy McFadden 41f7736ad1 am 434e21bf: am 3fdeb48e: Reduce emulator logspam
* commit '434e21bfd6b14f8d99b9bcdb829e7252edd574f3':
  Reduce emulator logspam
2012-11-09 22:45:13 -08:00
Andy McFadden 434e21bfd6 am 3fdeb48e: Reduce emulator logspam
* commit '3fdeb48e3c89be15fe3b539a26ec9a3cf28c898c':
  Reduce emulator logspam
2012-11-09 22:41:48 -08:00
Andy McFadden 3fdeb48e3c Reduce emulator logspam
The emulator doesn't support systrace, but we should point that out
at most once per process.

Bug 7436352

Change-Id: I06b2c1ea0df6c02c11cd2496423c337f8d7c62a1
2012-11-08 16:40:11 -08:00
Igor Murashkin a4a3149a36 Change ConsumerBase's FrameAvailableListener to be a weak pointer
This prevents strong reference cycles when the listener implementation also
holds a strong pointer to the ConsumerBase

Bug: 7425644
Change-Id: I1514b13a32b18d421c902dddebec0765a989c55c
2012-11-05 13:39:02 -08:00
Raph Levien 3bc7b27571 Merge "Add an LRU cache plus hashing primitives" 2012-10-29 08:59:54 -07:00
Raph Levien 8185e47822 Add an LRU cache plus hashing primitives
This patch adds a hashtable-based LRU cache. This should be
significantly higher performance than the GenerationCache it is intended
to replace. It is a large part of the fix for bug 7271109
TextLayoutCache low-level performance issues.

We added a new method to BasicHashtable to detect when rehashing is
needed, because the internal linked list pointers would get invalidated
by that rehashing.

Also, the hash_type specialized to pointers had a small flaw.

Change-Id: I950c2083f96519777b851dbe157100e0a334caec
2012-10-26 16:09:22 -07:00
Jason Simmons 7e4eb72ad8 am 40cd4515: am 78b4977e: Merge "Ensure that Vector::erase() returns a valid iterator" into jb-mr1-aah-dev
* commit '40cd45151513ecc02c95e0cc1b40480dd816cdd4':
  Ensure that Vector::erase() returns a valid iterator
2012-10-25 18:08:03 -07:00
Jason Simmons 40cd451515 am 78b4977e: Merge "Ensure that Vector::erase() returns a valid iterator" into jb-mr1-aah-dev
* commit '78b4977efd365d2ad7c9227c3a89e65ab60c3260':
  Ensure that Vector::erase() returns a valid iterator
2012-10-25 18:06:06 -07:00
Jason Simmons 78b4977efd Merge "Ensure that Vector::erase() returns a valid iterator" into jb-mr1-aah-dev 2012-10-25 18:03:50 -07:00
Jason Simmons 689925caf4 Ensure that Vector::erase() returns a valid iterator
Vector::erase may reallocate the Vector's storage while removing an element.
However, erase() calls begin() before calling removeItemsAt(), thus caching
a pointer the the Vector's old storage.  If the storage is reallocated,
the iterator returned by erase() will be based on the old storage pointer
and will thus be invalid.

Change-Id: I2450c55fd418e6b1c558a4ca7c024573abbaa098
2012-10-25 15:58:43 -07:00
Dave Burke 0491524f83 am 296cd1cb: am 04075569: Revert "Revert "put back the unused virtuals in Vector<>""
* commit '296cd1cb9ac7b7ea201662860347755d0349a7de':
  Revert "Revert "put back the unused virtuals in Vector<>""
2012-10-25 11:48:40 -07:00
Dave Burke 296cd1cb9a am 04075569: Revert "Revert "put back the unused virtuals in Vector<>""
* commit '04075569b565c949a6db8b4e8a9f10d281de4d9c':
  Revert "Revert "put back the unused virtuals in Vector<>""
2012-10-25 11:45:41 -07:00
Dave Burke 04075569b5 Revert "Revert "put back the unused virtuals in Vector<>""
This reverts commit 225c66a48c

Change-Id: If31a04b81052cbc7dd7bf237c07107c33066d03d
2012-10-25 11:40:51 -07:00
Mike Lockwood 126d215667 More changes to fix PDK build:
move screencap back to frameworks/base
move libdiskusage over from frameworks/base

Change-Id: I8415716634a4cb5b0fae15ef15ff21ee0a08906a
2012-10-24 12:30:41 -07:00
Jamie Gennis 3b6055a718 am ba7dc2db: Merge "SurfaceFlinger: add support for secure displays" into jb-mr1-dev
* commit 'ba7dc2db6e93a2407c8c328f2838591b7b760658':
  SurfaceFlinger: add support for secure displays
2012-10-22 13:54:50 -07:00
Jamie Gennis dd3cb84cfb SurfaceFlinger: add support for secure displays
This change adds support for displays that are not allowed to display surfaces
with the eSecure flag set.  All non-virtual displays are considered secure,
while virtual displays have their secure-ness specified at creation time.

Bug: 7368436
Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
2012-10-22 13:41:21 -07:00
Romain Guy f58475b5ae am 60393d45: Merge "Add runtime debugging capabilities to OpenGL" into jb-mr1-dev
* commit '60393d45207b6548e1f61ca104fa59aecee87d30':
  Add runtime debugging capabilities to OpenGL
2012-10-18 17:37:54 -07:00
Romain Guy 16928bfeca Add runtime debugging capabilities to OpenGL
The shell property debug.egl.trace can now be set to:

0
  disables tracing
1
  logs all GL calls
error
  checks glGetError after every GL call, logs a stack trace on error
systrace
  logs each GL call to systrace

Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996
2012-10-18 16:16:10 -07:00
Kenny Root 3fe50abbfd am 125becee: am 7abbbc68: Merge "Add TEMP_FAILURE_RETRY to ZipUtils"
* commit '125beceefd44f6abd17ff336bb989e1850965bd8':
  Add TEMP_FAILURE_RETRY to ZipUtils
2012-10-16 16:29:17 -07:00
Kenny Root d611117f24 Add TEMP_FAILURE_RETRY to ZipUtils
Change-Id: I275c415f14eeffaf9a58d45f3ea014d766441ec3
2012-10-16 14:00:56 -07:00
Jamie Gennis 2d5e230292 SurfaceFlinger: add animation transactions
This change adds a transaction flag for WindowManager to indicate that a
transaction is being used to animate windows around the screen.  SurfaceFlinger
will not allow more than one of these transactions to be outstanding at a time
to prevent the animation "frames" from being dropped.

Bug: 7353840
Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
2012-10-15 19:09:04 -07:00
Mathias Agopian 45778999c7 Merge "Fence didn't manager sync_wait error codes properly" into jb-mr1-dev 2012-10-09 16:36:30 -07:00
Mathias Agopian b5c9dcdf3b Fence didn't manager sync_wait error codes properly
error codes are returned in errno, this caused ::waitForwever()
to only wait for 1 second and return improper error code (-1).

needed to help debugging 7316632

Bug: 7316632
Change-Id: Ie144f614a88393393972a3a770c6b4b0581f961a
2012-10-09 14:38:19 -07:00
Jeff Brown 2a09bb3219 Add blankDisplay/unblankDisplay to SurfaceComposerClient.
Bug: 7309812
Change-Id: Ia401d642094a46c62f0d26c65da1d11341e203a1
2012-10-08 19:13:57 -07:00
Jesse Hall 9504eb915c Fix race condition in ConsumerBase::addReleaseFence()
This needs the ConsumerBase mutex locked, but wasn't locking it. Two
of the four places that called it already held the lock so were fine.
Now addReleaseFence() takes the lock itself, and I added
addReleaseFenceLocked() for the two already-locked callers, since in
one of them dropping the lock would be inconvenient.

Bug: 7289269
Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a
2012-10-05 14:40:50 -07:00
Jesse Hall ba607d53c6 Add Fence::waitForever which logs a warning timeout, and use it
Bug: 7217641
Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
2012-10-02 16:29:46 -07:00
Andy McFadden c01a79d77b Pass display arg to blank/unblank
This allows us to blank and unblank displays other than the built-in
display (e.g. HDMI).

Bug: 7240511
Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
2012-09-28 13:04:16 -07:00
Andreas Huber 7682a9c35a Add a way to configure an OMX encoder to emit SPS/PPS before IDR frames.
Change-Id: I71ce254533c8e99bc54d199d8a9828397fe3d99d
related-to-bug: 7245308
2012-09-28 11:33:17 -07:00
Iliyan Malchev 38b657265c Revert "Compatibility work around for bad graphics driver dependency."
This reverts commit a50b51c03a

Change-Id: Ibdcd776a7f241dbb2475403ea04f939249774c41
2012-09-27 15:52:12 -07:00
Mathias Agopian 7b19051137 fix a crasher when running out of memory
MemoryHeapBase::getBase() returns MAP_FAILED in case or
OOM, not null which is what SF was checking against.

This addresses one of the issues of bug 7230543.

Bug: 7230543
Change-Id: I763a88f64a2f9ff75eb139cfbaf9a1a9746c5577
2012-09-25 15:30:38 -07:00
Andy McFadden 4803b74e2a Show build config in dumpsys SurfaceFlinger
This adds a line to the "dumpsys SurfaceFlinger" output that shows
build-time configuration values.

Example:
 Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \
  [libgui USE_FENCE_SYNC]

Bug 7206633

Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0
2012-09-25 11:31:46 -07:00
Mathias Agopian e96e9e1093 fix a crasher in SurfaceTexture's setFilteringEnabled
bug: 7211067
Change-Id: Id8658a8df429d76c20ab9112858b38e52343dc9c
2012-09-24 19:26:11 -07:00
Mathias Agopian ff28e201ec Display events now always carry the display id they happened on
Change-Id: I12de1d883c23927722bc3a71b782f0079de4e831
2012-09-21 14:20:35 -07:00
Mathias Agopian 148994e5f3 We now report hotplug events to the framework
Change-Id: I2d6b7787d39e5929485a551e4982498c5053c211
2012-09-20 17:13:58 -07:00
Deva Ramasubramanian dbaaa38882 frameworks/native: Amend HDCP API
- Allow caller to set the observer and cookie.
- Add more notifications that the HDCPModule can send to its Observer.

Change-Id: I8bf9cc02a029cd38bbd25d9f0a634452173f4d26
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-09-19 11:17:36 -07:00
Jamie Gennis 3941cb240d SurfaceTexture: default to doing GL sync
This change makes updateTexImage default to performing the necessary
synchronization and adds an argument for SurfaceFlinger to disable that
synchronization so that it can be performed lazily.

Change-Id: I7c20923cc786634126fbf7021c9d2541aa77be5d
Bug: 6991805
2012-09-18 10:59:40 -07:00
Andy McFadden 8dfa92fef9 Plumb display name into SurfaceFlinger
The Surface createDisplay() call takes a display name for debugging.
This change carries it through SurfaceFlinger and displays it in
the "dumpsys SurfaceFlinger" output.

Bug 7058158

Change-Id: I79f3474a8656ff1beb7b478e0dbf2c5de666118a
2012-09-18 09:20:23 -07:00
Andy McFadden 6905205c8d Fix transform hints
The hints were being set a little too late, so the pre-rotation stuff
wasn't quite working.

Bug 7054997

Change-Id: Id8d5c626db7a76f768ba762a145b315878ee08e6
2012-09-16 11:39:09 -07:00
Mathias Agopian 068d47f29d strengthen region validation
Change-Id: I75ee7bc4dd7a2f5357ac8994a23bc8b8bfb6eb44
2012-09-12 17:30:47 -07:00
Andy McFadden c272430960 Merge "Watch for SurfaceFlinger death" into jb-mr1-dev 2012-09-12 13:22:35 -07:00
Jamie Gennis 61e04b92bd SurfaceTexture: use eglWaitSync
This change adds a compile-option to use eglWaitSyncANDROID to ensure that
texturing operations that access the current buffer of a SurfaceTexture do not
occur until the buffer is completely written.  It also moves this
synchronization into a new SurfaceTexture method called doGLFenceWait and
changes SurfaceFlinger's Layer class to use that method rather than performing
its own wait on the fence.

Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
2012-09-10 13:27:23 -07:00
Andy McFadden 6652b3edcb Watch for SurfaceFlinger death
The ComposerService object wasn't watching for SurfaceFlinger
restarts, which doesn't usually matter because the app framework
restarts when SurfaceFlinger dies.  However, mediaserver continues
to run, which means its ComposerService object was trying to use
a dead handle, and playback of DRM movies was failing.

This adds a DeathRecipient listener and some logic to re-establish
the SurfaceFlinger connection.

Bug 6645813

Change-Id: I07581b881d3835601aa57d5358c8259d93bc4515
2012-09-06 18:54:42 -07:00
Jamie Gennis b272541546 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
2012-09-06 17:54:53 -07:00
Mathias Agopian 00e8c7a88a display projection API now has a single function instead of 3
Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
2012-09-04 19:30:46 -07:00
Jamie Gennis 493db47929 Merge "BufferQueue: add a setMaxAcquiredBufferCount check" into jb-mr1-dev 2012-09-04 14:58:51 -07:00
Jamie Gennis e84ec393bb Merge "libgui: add BufferQueue test infrastructure" into jb-mr1-dev 2012-09-04 14:55:59 -07:00
Fabrice Di Meglio 13e1257838 Merge "Add support for "-rtl" in resources" into jb-mr1-dev 2012-09-04 14:55:03 -07:00
Jamie Gennis c68f2ecfa0 BufferQueue: add a setMaxAcquiredBufferCount check
This change adds a check to verify the validity of the value passed to
setMaxAcquiredBufferCount.

Change-Id: I39730557aa58261e678bd6e4fce11bab78e98362
2012-09-04 14:54:34 -07:00
Mathias Agopian 50f262fe56 minor SharedBuffer clean-up
Change-Id: If38b7ce85806ae628c00f2c938de4e3f75142543
2012-08-31 18:41:21 -07:00
Mathias Agopian 2401ead700 Add a way to retrieve a Region as a SharedBuffer
Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
2012-08-31 18:38:22 -07:00
Mathias Agopian 3ab68558fa change how we store Region data internally
We used to keep the bounds of the region as a
separate rectangle. Instead we now store it as the last
element of the Vector<> of Rects.

This has the benefit of being slightly more efficient when
copying regions and reduces the overhead of small regions,
but more importantly will allow us to export the underlaying
SharedBuffer (eventually).

Change-Id: I80790e4fb1a09a747a5616000cfef852ac4ce9e9
2012-08-31 18:38:22 -07:00
Mathias Agopian 2098517e3e make sure Parcel handles 0-sized LightFlatenables
Change-Id: Ib30a1c0228f8a938abaa0c7c8a6ba32ffd971121
2012-08-31 18:09:51 -07:00
Jamie Gennis 9e75ddda93 libgui: add BufferQueue test infrastructure
This change adds some infrastructure for testing the BufferQueue class.  It
also includes a test that tests the new check in BufferQueue::acquireBuffer
that prevents the consumer from acquiring more than one buffer beyond the max
acquired buffer count that was set.

Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
2012-08-31 17:02:49 -07:00
Dianne Hackborn 8210185fe3 No longer need "original calling uid".
Change-Id: Ifc4a89dd088609a5a8553f6ac6553174e09e8222
2012-08-31 15:40:58 -07:00
Jamie Gennis 72f096fb1a 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
2012-08-30 18:26:09 -07:00
Jamie Gennis 1847f7fd79 Merge "BufferQueue: simplify max buffer count handling" into jb-mr1-dev 2012-08-30 18:23:27 -07:00
Jamie Gennis 2b97769823 Merge "BufferQueue: clean up buffer counting" into jb-mr1-dev 2012-08-30 18:21:11 -07:00
Wink Saville f196b56d70 Merge "Revert "A vendor ril depends on a native screen shot code."" into jb-mr1-dev 2012-08-30 17:31:47 -07:00
Wink Saville 94f261556c Revert "A vendor ril depends on a native screen shot code."
This reverts commit 9b5782baf0.

A new ril for toro, hack no longer needed.
2012-08-30 11:53:55 -07:00
Jamie Gennis e191e6c348 BufferQueue: simplify max buffer count handling
This change reworks how the maximum buffer count is computed.

Change-Id: I7d3745814b9bd6f6f447f86bfea8eb7729914ebf
2012-08-29 15:35:34 -07:00
Jamie Gennis 31a353da22 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
2012-08-29 15:35:34 -07:00
Andreas Huber c1396dd145 Merge "initial checkin of a preliminary HDCP API for vendors to implement." into jb-mr1-dev 2012-08-29 13:32:15 -07:00
Andreas Huber a8fc772b5b initial checkin of a preliminary HDCP API for vendors to implement.
Change-Id: If98277efdec1bc8f1e9f4af1ca73324e4c3d469b
2012-08-29 13:26:55 -07:00
Wink Saville 9b5782baf0 A vendor ril depends on a native screen shot code.
Add a temporary shim until the vendor fixes the ril.

Bug: 7073467
Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
2012-08-28 16:20:50 -07:00
Jeff Brown f456d32d3c am d7007cd4: Merge "Forward compatibility patch."
* commit 'd7007cd4bb2016a09ae8e8f746118f81fdd27f02':
  Forward compatibility patch.
2012-08-27 17:57:26 -07:00
Mathias Agopian 3ee454a7be Eradicate DisplayID.
DisplayDevices are now keyed of the wp<IBinder> the client uses.
DisplayID has now become DisplayType which is just used to identify
physical displays (as opposed to virtual displays such as wifi displays).

Change-Id: I0c5968f2c902dcd699a7e0afacf833ff070c12ea
2012-08-27 17:43:43 -07:00
Jeff Brown a50b51c03a Compatibility work around for bad graphics driver dependency.
This is a compatibility shim for one product whose drivers
are depending on SurfaceComposerClient::getDisplayInfo(
int, DisplayInfo*) when it really shouldn't.

Revert this patch when the problem has been resolved.

Bug: 7065398
Change-Id: I6542691b81fd1b1e1d79500a62e82d40a3d51db7
2012-08-27 17:20:53 -07:00
Jeff Brown 1ae49e3fef Merge "Remove unused "layer" argument from show()." into jb-mr1-dev 2012-08-27 17:17:09 -07:00
Jeff Brown e310c3949f Merge "Banish DisplayID from the SurfaceFlinger API." into jb-mr1-dev 2012-08-27 17:16:37 -07:00
Jeff Brown 52142828ee Forward compatibility patch.
Change-Id: I8e8af0c6035aaac5e5097f1cfb198250475627ee
2012-08-27 16:44:39 -07:00
Jeff Brown 380223bf1b Remove unused "layer" argument from show().
Change-Id: I8944a9f4a27c330b11e5e837c69b88c8f84145ba
2012-08-27 14:40:17 -07:00
Jeff Brown 9d4e3d2f42 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
2012-08-27 14:40:17 -07:00
Jean-Baptiste Queru f671385e71 am 9801575a: am 908c8ff5: Merge "Fixed clang build error for libgui"
* commit '9801575a65f2f9d0bdc924ec0a4bbfb6ef071bbe':
  Fixed clang build error for libgui
2012-08-27 08:17:48 -07:00
Jean-Baptiste Queru 9801575a65 am 908c8ff5: Merge "Fixed clang build error for libgui"
* commit '908c8ff55482b723eddec54c6308e54a136a3e49':
  Fixed clang build error for libgui
2012-08-27 08:15:12 -07:00
Mathias Agopian 225c66a48c Revert "put back the unused virtuals in Vector<>"
This reverts commit 1648d4c13b.

Bug: 6977192

Change-Id: Idbb6b239aaed4fb1c054ce943f6ba06ede3492bb
2012-08-24 17:16:10 -07:00
Jamie Gennis 490aee0fc5 Merge "SurfaceTexture: inherit from ConsumerBase (try 2)" into jb-mr1-dev 2012-08-24 11:11:07 -07:00
Tareq A. Siraj 114e968482 Fixed clang build error for libgui
Fixed the order of the statements in ANDROID_SINGLETON_STATIC_INSTANCE
macro so that the templated static member variable initialization
comes before the instantiation of the Singleton class. This
fixes the clang compile error.

Change-Id: Ic47d17e152b657f2dff3191ccc3770753fdf002b
Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>
2012-08-23 14:08:57 -04:00
Jamie Gennis 9f54ac3886 ui/Fence: change the TIMEOUT_NEVER value to -1
Change-Id: I3ef0a4c06f80990b53a8bf2eda6edbfcbefd0f34
2012-08-21 19:07:30 -07:00
Eino-Ville Talvala 0493044503 Merge "Add BufferItemConsumer, a simple BufferQueue consumer." into jb-mr1-dev 2012-08-21 16:46:05 -07:00
Jamie Gennis 9fea3421ff SurfaceTexture: inherit from ConsumerBase (try 2)
This change makes SurfaceTexture inherit from ConsumerBase.  It removes all of
the functionality from SurfaceTexture that is now provided by the base class.
This includes fixes for two bugs that were found after checking this change in
the first time and then reverting it.

Change-Id: Ie2d9f4f27cfef26fdac341de3152e842b01a58d2
2012-08-21 16:41:03 -07:00
Eino-Ville Talvala e232fdca2a Add BufferItemConsumer, a simple BufferQueue consumer.
BufferItemConsumer allows for acquiring BufferQueue's BufferItems,
which contain all the data and metadata the BufferQueue has for a
given graphics buffer.

This consumer is useful when direct access to the native buffer_handles
is needed by the client.

Also includes a minor cleanup of CpuConsumer's use of 'virtual'.

Bug: 6243944
Change-Id: If7dc4192b15ac499555f1eda42a85140f2434795
2012-08-21 15:46:35 -07:00
Mathias Agopian 1648d4c13b put back the unused virtuals in Vector<>
some binaries are using these private APIs and broke
(as they should!) with this change. Temporarily restore the
virtuals to work around this.

Bug: 6977550
Change-Id: I7c37f24b16e4d586b89205c493db5169cf87e024
2012-08-20 21:23:15 -07:00
Mathias Agopian 317357fdf7 Merge "get rid of mirrorItemAt() which isn't used anywhere" into jb-mr1-dev 2012-08-20 16:48:07 -07:00
Eino-Ville Talvala 84a9a3c0ec Merge "CpuConsumer: inherit from ConsumerBase" into jb-mr1-dev 2012-08-20 16:18:11 -07:00
Eino-Ville Talvala f57e7540d4 CpuConsumer: inherit from ConsumerBase
Change-Id: I55178b1d673ffa0fbc6e63ef47642c64d4d03228
2012-08-20 15:44:40 -07:00
Mathias Agopian f4ce7803fe get rid of mirrorItemAt() which isn't used anywhere
Change-Id: Id6f2dbeed21cabc127d39538c0ff464077ada83f
2012-08-20 15:25:19 -07:00
Jamie Gennis 729f48082e Merge "Revert "SurfaceTexture: inherit from ConsumerBase"" into jb-mr1-dev 2012-08-20 14:33:24 -07:00
Jamie Gennis ce7a6c0fc9 Revert "SurfaceTexture: inherit from ConsumerBase"
This reverts commit ed059a8d75

Change-Id: I72542c2595771a40c2c88251e0d6eb54e305b99b
2012-08-20 14:28:53 -07:00
Jamie Gennis 483bccd0d9 Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"
This reverts commit f8d33c652b

Change-Id: I1ff2e1cc85824a8fac1051f573d2931db81af511
2012-08-20 14:28:21 -07:00
Jamie Gennis f8d33c652b SurfaceTexture: call ConsumerBase::freeBufferLocked
This change fixes SurfaceTexture::freeBufferLocked so that it calls the base
class implementation.

Change-Id: I45d76fb2eb02c1fa6e4e917823ead83e2086bd15
2012-08-20 11:30:44 -07:00
Jamie Gennis 2c7eb92b63 Merge "SurfaceTexture: inherit from ConsumerBase" into jb-mr1-dev 2012-08-17 15:35:17 -07:00
Mathias Agopian 818b46058a display states can't share the dirty flags
Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
2012-08-16 20:58:57 -07:00
Jamie Gennis ed059a8d75 SurfaceTexture: inherit from ConsumerBase
This change makes SurfaceTexture inherit from ConsumerBase.  It removes all of
the functionality from SurfaceTexture that is now provided by the base class.

Change-Id: I4a881df42810a14ee32d4ef7c8772a8f2510f4c7
2012-08-16 18:11:02 -07:00
Fabrice Di Meglio 8855e6f1c5 Add support for "-rtl" in resources
Change-Id: I0aaf10caf7b6a6d9e76b67dcabf01e4267b407bb
2012-08-14 15:17:38 -07:00
Jeff Brown f0083bf528 Merge "Add a very simple helper function to log slow functions." into jb-mr1-dev 2012-08-13 23:35:08 -07:00