231 Commits

Author SHA1 Message Date
Andreas Huber
7825334929 Split AndroidRuntime into AndroidRuntimeBase base-class and the rest.
AndroidRuntimeBase (exported by libandroid_runtime_base.so) is all you need
to link against to gain the ability to do AndroidRuntimeBase::getJNIEnv()
thus minimizing build dependencies.

Change-Id: Ia7f0c94c8c02b974c068e0db34774827f96aa95b
2014-02-12 15:00:05 -08:00
Michael Wright
453fa30ab2 Revert "Move inputservice over to frameworks/native"
This reverts commit 89e5c7ebb37fabc4368e87e17a502db62598bd61.
2014-02-10 15:08:26 -08:00
Michael Wright
89e5c7ebb3 Move inputservice over to frameworks/native
Remove all of the pieces except the PointerController and SpriteController over
to frameworks/native in preparation for inputflinger. Those two need to stay in
frameworks/base for now because they depend on Skia currently. In the long run
they should be merged into either the InputManager or the WindowManager rather
than as a part of the inputservice / inputflinger.

Change-Id: Iebef71f3030fb3d26a5f338eb66d75bb37c17734
2014-02-10 14:10:27 -08:00
John Reck
4f02bf4eef Native-side proxy
Remove RemoteGLRenderer
 Remove reflection-based control

Change-Id: If17c2bbb61c7141986d88c4763def77ed1074985
2014-01-27 16:40:39 -08:00
Vinit Deshpande
80a3a364fd Merge "Revert "Revert "Move Wifi services to a new git project""" 2014-01-08 23:47:44 +00:00
Vinit Deshpande
3ffa1a899a Revert "Revert "Move Wifi services to a new git project""
This reverts commit f1182c9c1abdb4e8f733632d0567410ab9fc1d3c.

Change-Id: Ic440cfa6502b651b2cc67faf73c7c9c49df42190
2014-01-08 02:55:29 +00:00
Vinit Deshpande
d9feaf4971 Merge "Revert "Move Wifi services to a new git project"" 2014-01-08 02:41:16 +00:00
Vinit Deshpande
f1182c9c1a Revert "Move Wifi services to a new git project"
This reverts commit 4a3f9cf099bbbe52dc0edb2a7e1d1c976bc335a3.

Change-Id: I6269a683e842a5d1cfdafea892be86972ae11c40
2014-01-08 02:38:31 +00:00
Vinit Deshapnde
ed8ed0bc81 Merge "Move Wifi services to a new git project" 2014-01-08 02:27:25 +00:00
John Reck
23b797ab51 EGL migration to native
Move EGL state management to native side for RemoteGLRenderer

Change-Id: I12b0fed70246564d4caebf87374e8bbca655c572
2014-01-07 14:53:55 -08:00
Vinit Deshapnde
4a3f9cf099 Move Wifi services to a new git project
Bug: 12175455
Change-Id: I1fa07e29c6a9aae38d9e334d519a9f2445d15613
2014-01-07 11:00:05 -08:00
Chris Craik
5438979e49 Move GLES20DisplayList functionality into DisplayList
Removes unneeded indirection layer

Change-Id: I75d3e369eda2788cbc52a3575c4e1c521e842f59
2013-12-20 13:53:50 -08:00
Kristian Monsen
85948593e3 resolved conflicts for merge of 800d4d72 to master
Change-Id: Ib1defc447745e5406d64c0d99c962832c79d15ef
2013-12-12 23:59:37 -08:00
Kristian Monsen
f5fabdf83d Fix one and hide the other warnings from core/jni
Most of the warnings are unused parameter from skia functions.

Change-Id: I9df57718d117c26b96163f751ccb056ca86ac072
2013-12-11 21:58:53 -08:00
John Reck
cec24ae16e RenderThread work
Hacky prototype needs a private API to enable

Change-Id: I21e0ddf3cdbd38a4036354b5d6012449e1a34849
2013-12-09 15:57:09 -08:00
The Android Open Source Project
ebcb32f58a Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Dmitry Shmidt
2a69b17309 wifi: Remove obsolete libwpa_client library
Change-Id: I222c60ec65375768dc62f9219d115b5b09a374f6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-12-05 10:50:48 -08:00
Dmitry Shmidt
e41451993e wifi: Remove obsolete libwpa_client library
Change-Id: I222c60ec65375768dc62f9219d115b5b09a374f6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-11-22 16:28:32 -08:00
Raph Levien
aff6ea9516 Merge "Initial integration of Minikin to framework" 2013-11-18 19:38:18 +00:00
Raph Levien
a033630e80 Initial integration of Minikin to framework
With this patch, framework does at least some of its text rendering
using Minikin instead of TextLayoutCache. There's a lot of stuff broken
and not yet implemented, but the phone will boot.

Changes are hidden behind USE_MINIKIN, which should be set in
BoardConfig.mk for the brave. Without that, there are changes to
signatures in JNI methods and so on, but shouldn't be any visible
changes.

This commit also introduces a new abstraction for Typeface:

The new TypefaceImpl abstraction represents the functionality that
corresponds to a Java Typeface object. Currently it is backed by
SkTypeface, but in the migration to Minikin it is a FontCollection
combined with a FontStyle. This patch introduces a USE_MINIKIN
preprocessor switch, so there is no substantial change to existing
Skia-based code, but which lets us start replacing the implementation
with the Minikin version.

Change-Id: I532c4c2d32d4f4c1f349dc1db37caa112af587ea
2013-11-18 10:32:20 -08:00
John Reck
e77a040f3a Merge "More refactoring" 2013-11-11 17:38:18 +00:00
John Reck
3083579424 More refactoring
Merge GlRenderer and Gl20Renderer
 Move GLRenderer to its own file
 Move native methods from HardwareRenderer to GLRenderer

Change-Id: Ib4680b03dd98101b2a428062cc94774ff73baa75
2013-11-11 09:37:02 -08:00
Michael Wright
1fc1834d66 Disable unused parameter warning for jni code
Change-Id: Iee2620186c8868d86ccb5f8d0fd6239079638e2d
2013-11-07 18:33:05 -08:00
Jeff Sharkey
5aca2b8dc4 Plumb through physical device UUID and label.
vold now parse out UUID and label for inserted physical devices,
and reports them to framework.  Add these to hidden StorageVolume
class for use by DocumentsUI and MediaProvider.

Remove last JNI method in FileUtils!

Bug: 11175082
Change-Id: I1cfcd1ade61767b103f693319ea2600008ee2e3c
2013-10-16 16:34:21 -07:00
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