207 Commits

Author SHA1 Message Date
Adam Lesinski
5b4ef81f2b Add Graphics alloc tracking via memtrack
Any OpenGL memory reported by /proc/pid/smaps will not be included
in the GPU GL memory count and will be considered Unknown. This is
an artifact of how some memory reporting is done in libmemtrack
and some is done in this module.

bug:10294768

Change-Id: Id8fb63b2e86520f4dbc8410573a509e66b96b13b
2013-09-25 14:41:49 -07:00
Svetoslav
6811f4e92c Move PdfDocument to android.graphics.pdf
1. Move PdfDocument to android.graphics.pdf.

2. Changed the PdfDocument as per API concil request.

3. Updated the documentation.

bug:10461180
bug:10552565
bug:10681585
bug:10552336

Change-Id: I08e15b34cf37bb064248c887e6f59808019cafe8
2013-09-19 17:12:47 -07:00
Elliott Hughes
b93489270d Merge "Remove a fixed-length buffer in the wifi code." into klp-dev 2013-08-19 18:08:49 +00:00
Elliott Hughes
a11d574fc6 Remove a fixed-length buffer in the wifi code.
Also increase the size of the buffer we do need, simplify the code, and
fix some of the error checking.

(cherry-pick of 56968581ce77d3c0ee4286da6b0d5548874934b9.)

Bug: http://code.google.com/p/android/issues/detail?id=36193
Bug: 10363597
Change-Id: Iadd2ee25469a37ddf06c3292b675a4cbcc4ecfa3
2013-08-16 14:48:38 -07:00
Jeff Sharkey
da5a3e12f4 Richer ParcelFileDescriptor close events.
When reading from the end of a pipe or socket, there is no way to
tell if the other end has finished successfully, encountered an error,
or outright crashed.  To solve this, we create a second socketpair()
as a communication channel between the two ends of a pipe or
socket pair, sending a status code with details about why the
ParcelFileDescriptor was closed.

The writer end of a pipe or socket can closeWithError() to send a
message to the reader end.  When the reader encounters EOF, they
call checkError() to detect if any error occured.  This also detects
the case where the remote process died without sending a success
message.

This design is also extended to support regular files on disk, using
the communication channel above to detect various remote close events
or crashes, and delivering that event to a supplied OnCloseListener.

Replaces JNI with best-practice Libcore.os calls, and deprecates
some flags to match Context.

Bug: 10330121
Change-Id: I8cfa1e4fb6f57397667c7f785106193e0faccad3
2013-08-16 14:34:43 -07:00
Derek Sollenberger
5827cb5059 Changes needed to support Skia at r10377.
Change-Id: Id1e1c8c5938ee1a33c6fa3caabd2c28e89243eb4
2013-08-01 12:52:21 -04:00
Eino-Ville Talvala
2f1a2e423e Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
2013-07-30 11:37:31 -07:00
Mathias Agopian
2ca204e4c0 get rid of PixelFormatInfo and simplify things
Change-Id: I487d4eef7db0095ace4babf5bb100a8769711257
2013-07-25 19:25:10 -07:00
Igor Murashkin
b519cc52ec camera2 api: Add CameraMetadata get/set support
* Add a Rational class
* Can get/set Key<T> where T is a primitive (or Rational)
* Can get/set Key<T> where T is a primitive array
* Can get/set Key<T> where T is an enum (synthetic constructor only)

Not implemented yet:
* When T is anything else, i.e. Rect, Size, etc

Bug: 9529161
Change-Id: I64438024a1e8327a38dd2672652626f0ffbb70e3
2013-07-11 13:06:56 -07:00
Jeff Brown
9d3b1a424c Move input library code to frameworks/native.
No longer compile libandroidfw as a static library on the device
since it already exists as a shared library.  Keeping the static
library would force us to provide a static library version of
libinput for the device as well which doesn't make sense.

Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
2013-07-01 20:11:42 -07:00
Igor Murashkin
70725500dc Initial camera device implementation
* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: Ie6f02a7c0952b0f5ebc41905425b15cae221f7d3
2013-06-26 13:19:45 -07:00
Igor Murashkin
36483e9622 Revert "Initial camera device implementation"
This reverts commit 59bc67c732eab53b370b196066e8012d3f6bf09a.

Change-Id: I9e1ce3b9f4af4e2b9b98855c0ca533581c87ea7f
2013-06-25 05:13:55 +00:00
Igor Murashkin
59bc67c732 Initial camera device implementation
* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: I183dd47ddd737ec2c3c374e5c3461542a97f09b0
2013-06-24 17:41:10 -07:00
Svetoslav Ganov
b06accf34f Merge "Generate PDF from Canvas." 2013-06-21 20:09:51 +00:00
Brian Carlstrom
9f8203a159 Remove libdvm dependency
Change-Id: I7d37db4e72e9435ecd514340cf61a051dc272f04
2013-06-20 16:34:45 -07:00
Svetoslav Ganov
ff4adde573 Generate PDF from Canvas.
This change adds simple APIs that enable an Android application
to generate a PDF document by drawing content on a canvas.

Change-Id: Ibac93d7c37b01a376ce7c48238657d8c7698d588
2013-06-19 19:35:38 -07:00
Derek Sollenberger
d7a80774f0 Modifications needed for updating Skia to r9286.
bug: 8719528
Change-Id: I260fefb93c5a8c5dec86acdec66cbe55a2ee8a92
2013-05-28 10:44:26 -04:00
Brian Carlstrom
6155251c7b am bf7afa23: am 94f55b30: Merge "Tracking libnativehelper dependencies"
* commit 'bf7afa239e9541b3cac5a3c510bfb9b25b4a1348':
  Tracking libnativehelper dependencies
2013-05-10 22:49:00 -07:00
Brian Carlstrom
bf7afa239e am 94f55b30: Merge "Tracking libnativehelper dependencies"
* commit '94f55b30e3e04dbea63836197e76c7464d8d6d37':
  Tracking libnativehelper dependencies
2013-05-10 22:47:57 -07:00
Brian Carlstrom
fde1f91d9b Tracking libnativehelper dependencies
Change-Id: I05ec62c43fbe5f8ba23256abac7271ca0b1a7242
2013-05-10 21:16:12 -07:00
Jesse Hall
ce3fe5fd8a am 4d32a367: am 2787ba25: Merge "Register EGLExt JNI methods" into jb-mr2-dev
* commit '4d32a36759b619abdda9c895054f513aef3a3f03':
  Register EGLExt JNI methods
2013-05-07 10:18:38 -07:00
Jesse Hall
237c2b871f Register EGLExt JNI methods
Bug: 8678160
Change-Id: I8ecd2e6da2aee250b3433be18fff6af927b02994
2013-05-06 11:36:59 -07:00
Romain Guy
3b748a44c6 Pack preloaded framework assets in a texture atlas
When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
2013-05-02 13:32:09 -07:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Jesse Hall
d830e74ff4 Add android.opengl.GLES30, hidden for now
Bug: 8566953
Change-Id: Ia5a01d5e857b4fce12a451e2dcab0359758ad648
2013-04-15 17:37:33 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Jeff Brown
c28867a1d6 Use input transport for communications between app and IME.
The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder.  This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
2013-03-26 15:42:39 -07:00
Elliott Hughes
bf49422197 am 582c5b85: am 690d3435: Merge "jni: remove obsolete flag from makefile"
* commit '582c5b85c5653d93afc63b00ac1efff94d0853ab':
  jni: remove obsolete flag from makefile
2013-03-05 22:43:07 +00:00
Bruce Beare
d625127db9 jni: remove obsolete flag from makefile
Change-Id: Ia7e67694a736745333e9d36396b8cb6194fd26ec
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2013-03-05 14:29:46 -08:00
Kristian Monsen
1456758802 resolved conflicts for merge of 58a1ca66 to master-chromium
Change-Id: I06b61e6d7d52b584eae03a95220381475b8bff0e
2013-02-14 19:48:27 -08:00
Mathias Agopian
58a1ca6642 Merge "split Surface in two classes: SurfaceControl and Surface" 2013-02-14 20:25:08 +00:00
Mathias Agopian
3866f0d581 split Surface in two classes: SurfaceControl and Surface
SurfaceControl is the window manager side; it can
control the attributes of a surface but cannot push buffers
to it. Surface on the other hand is the application (producer)
side and is used to push buffers to the surface.

Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
2013-02-14 12:19:11 -08:00
Jeff Sharkey
1f6692f1f9 am aec6bcfb: Merge "Parse network stats using native code."
# Via Android (Google) Code Review (1) and Jeff Sharkey (1)
* commit 'aec6bcfb767a4b9dfd391bff338a8ff284b29549':
  Parse network stats using native code.
2013-02-13 18:14:31 -08:00
Jeff Sharkey
9a2c2a6da9 Parse network stats using native code.
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
2013-02-13 17:40:49 -08:00
Chris Craik
7c1a49f5f5 Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.

Conflicts:
	packages/SystemUI/res/values-sv/strings.xml

Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
2013-02-13 10:50:20 -08:00
Derek Sollenberger
d81ec456bb Changes needed to roll Skia to r7527.
Change-Id: I84aef3f8a733c869fade06021816646001532758
2013-02-04 15:42:26 -05:00
Raph Levien
49a7e454d1 am 7cd0859a: Merge "Update framework text layout to use Harfbuzz NG"
* commit '7cd0859a735c0c6a489d70d5d96e44e9d1a27be8':
  Update framework text layout to use Harfbuzz NG
2013-01-15 11:28:40 -08:00
Raph Levien
aaedde51b7 Update framework text layout to use Harfbuzz NG
These are the frameworks changes to use the new version of Harfbuzz.

Change-Id: Idbef325e8fc1c27a9f2296414ddb1f79b778a00e
2013-01-15 09:58:06 -08:00
Derek Sollenberger
ca79cf69d0 Update framework to support r5967 of Skia.
bug: 6906025
Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
2012-12-12 15:28:54 -05:00
Elliott Hughes
e4d08f11c4 am 9197d170: am fec5f611: Merge "It\'s 2012. We\'re always WITH_JIT."
* commit '9197d170b770f2b87abd0cd0e13dcf71e5a181c2':
  It's 2012. We're always WITH_JIT.
2012-11-07 13:08:11 -08:00
Elliott Hughes
9197d170b7 am fec5f611: Merge "It\'s 2012. We\'re always WITH_JIT."
* commit 'fec5f611fef4fc3b7afa5d7194f4f40d156157ac':
  It's 2012. We're always WITH_JIT.
2012-11-07 10:48:26 -08:00
Elliott Hughes
be8b47f6ce It's 2012. We're always WITH_JIT.
Change-Id: Ia3d1a1b1df06816f2cfa3879ec669b34c62cf9b9
2012-11-06 17:16:21 -08:00
Glenn Kasten
b24a1b7f99 Remove obsolete references to libmedia_native
Bug: 6654403
Change-Id: I05d8e81fd31617b587fd1228a303c40db83e7f2d
2012-10-30 10:59:52 -07:00
Kenny Root
ad0090e7b8 resolved conflicts for merge of 85f9ba9e to jb-mr1-dev-plus-aosp
Change-Id: I9ae49075935f0e9ec432ce9d828ee26a4fcdb44c
2012-10-17 10:02:22 -07:00
Kenny Root
c9a1aabc49 Remove HAVE_SELINUX guards
Change-Id: I6c2161471f657aa1645695ffd56ff434b0c2b426
2012-10-16 23:32:31 -07:00
Zhihai Xu
a3ae439425 ISSUE 6849488 Bluedroid stack, remove system/bluetooth.
remove system/bluetooth stuff.

bug 6849488
Change-Id: I9ea87c9cd60d5ecfa0d58d28301554e716cd2893
2012-09-20 10:47:06 -07:00
Jeff Brown
cbad976b2a Add support for Wifi display.
Change-Id: I99693786cf9d07d07d3400046c55eb4933730b80
2012-09-07 13:26:31 -07:00
Jeff Brown
64a55af0ac Add plumbing for new surface flinger display API.
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-27 14:34:54 -07:00
Kenny Root
a579f7926a am d69b47c0: am 8942e5a3: Merge "Use libcore Posix class for StatFs implementation"
* commit 'd69b47c087a87355df76a5276ab18af847f64367':
  Use libcore Posix class for StatFs implementation
2012-08-16 14:26:07 -07:00
Kenny Root
bdd23ae9f5 Use libcore Posix class for StatFs implementation
Remove some JNI and duplicated functionality and use libcore's Posix
class for the statfs function instead.

Change-Id: Ic1e161dc10c18c2c6ee81d895a0efd8910086dbf
2012-08-16 10:55:47 -07:00