1448 Commits

Author SHA1 Message Date
Tim Murray
da67debe22 Remove extraneous logging.
bug 8888887

Change-Id: I68d01c2ba649257be1577d53f330ad28d3b57011
2013-05-09 14:45:43 -07:00
Derek Sollenberger
0c8c0add4e am c195ef73: am bee78812: Merge "Fix bug where we incorrectly clipped the bounds to the device size." into jb-mr2-dev
* commit 'c195ef73445c3ba605355798b9f1f9a78bc52f11':
  Fix bug where we incorrectly clipped the bounds to the device size.
2013-05-09 14:19:45 -07:00
Derek Sollenberger
708144e828 Fix bug where we incorrectly clipped the bounds to the device size.
This CL also updates the documenation to make it clear that the API
returns in local space, not clipped to the size of the bitmap/device.

bug: 8747526
Change-Id: I389844672ce955341863f9940c3b401ab00dc1dc
2013-05-09 14:00:29 -04:00
Derek Sollenberger
07da9df62b am e3326143: am 2c76016c: Merge "Fix error where clips/matrices are incorrectly transferred." into jb-mr2-dev
* commit 'e3326143c63e791863c1fd95599fb9db74fb4eed':
  Fix error where clips/matrices are incorrectly transferred.
2013-05-09 05:05:47 -07:00
Derek Sollenberger
3bd9a6dc6b Fix error where clips/matrices are incorrectly transferred.
In these cases the caller passes in a NULL bitmap and expects it
to clear the canvas state. This change preserves that behavior.

bug: 8738494
Change-Id: I7ebf6a74bab3c2822849a3404de3828fec8d3084
2013-05-08 10:59:47 -04: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
Scott Main
3fc184cf6e am 01e48e7d: am 22f6a60e: Merge "add docs for new attributes, including account restriction for restricted profiles" into jb-mr2-dev
* commit '01e48e7d1541920ece358257e4c2481936497835':
  add docs for new attributes, including account restriction for restricted profiles
2013-04-25 21:27:06 -07:00
Scott Main
b40c1fdaee add docs for new attributes, including account restriction for restricted profiles
Change-Id: I737ea55bfa58562b1b384e52626e95b479759376
2013-04-25 19:05:55 -07:00
Stephen Hines
0f59d6d34e am 4a84af89: am b322f994: Merge "Add new error code for Debug Context work." into jb-mr2-dev
* commit '4a84af896c830d6ef613d1baa607d472cf865073':
  Add new error code for Debug Context work.
2013-04-20 21:37:10 -07:00
Stephen Hines
b322f99476 Merge "Add new error code for Debug Context work." into jb-mr2-dev 2013-04-20 04:48:18 +00:00
Jason Sams
6a341fc793 am dd240d9a: am 0935f258: Merge "Updating API based on feedback" into jb-mr2-dev
* commit 'dd240d9a30578930bbf63b6bd9998e940dd16160':
  Updating API based on feedback
2013-04-19 13:17:10 -07:00
Jason Sams
f64cca905c Updating API based on feedback
bug 8656887

This hides the methods used to support Camera
Fixes the oversight in LaunchControl
Documents some missing functions




Change-Id: I5b19b65dd5ddf9917100192c180bb63d89c80679
2013-04-19 12:56:37 -07:00
Stephen Hines
42028a8756 Add new error code for Debug Context work.
Bug: 7343201

This error type is less severe when running under the debug context,
allowing developers to use RSErrorHandler to respond to errors like
out-of-bounds native accesses.

Change-Id: I79c87d1956c94833546f0f638ffa1aafecae49cd
2013-04-17 19:22:01 -07:00
Jason Sams
e8ed1eeb3f am 4b87c54b: am 097ed01a: Merge "Revert GC thread changes" into jb-mr2-dev
* commit '4b87c54b06ed6834785ea06e066bb1e988a76973':
  Revert GC thread changes
2013-04-15 12:47:30 -07:00
Jason Sams
f38c6ab76a am c4294ed2: am 330a9fe3: Merge "Unhide new RS APIs." into jb-mr2-dev
* commit 'c4294ed2f1de5c89b5e283942e0d5f8cd8822bfb':
  Unhide new RS APIs.
2013-04-14 19:28:29 -07:00
Jason Sams
9bf189228f Revert GC thread changes
This is not quite a straight revery, some manual edits were necessary.

The original CL didn't undergo sufficient design review or testing.  Revert until the regressions can be sorted out.

Bug 8585185


This reverts commit 6dacf8355a0692b52c49f603f43317772cb36175

This reverts commit f8c033db1edf36a0ab09568c3142054f0be2d1a1

Change-Id: Ie7215bdf881332e822603547e92f810f595077fc
2013-04-14 02:56:03 +00:00
Jason Sams
02d56d90e0 Unhide new RS APIs.
This exposes the fast path handling of YUV data.

bug 8566866

Change-Id: Iaa3700100db61dd51d16d80ea8ae22f2dcc41bb0
2013-04-14 02:51:57 +00:00
Dianne Hackborn
de1fae77b6 am 00c4c670: am 301e95f2: Merge "Add a little more resource load tracing." into jb-mr2-dev
* commit '00c4c67069b9d13005ae072b8744c728aa73f99a':
  Add a little more resource load tracing.
2013-04-12 18:09:58 -07:00
Dianne Hackborn
0acc1931d3 Add a little more resource load tracing.
Change-Id: Id797adb67ab411d5b1a1c223863d3bb4655d10b1
2013-04-12 17:49:17 -07:00
Tim Murray
d7fec6edad am f151a541: am d6b8a035: Merge "Add support for synchronous get()." into jb-mr2-dev
* commit 'f151a5411eb6afd104daac10b3e43f5e3a60c61d':
  Add support for synchronous get().
2013-04-12 13:11:45 -07:00
Tim Murray
d6b8a03533 Merge "Add support for synchronous get()." into jb-mr2-dev 2013-04-12 20:03:52 +00:00
Tim Murray
e1f8089a94 am 5c18ff0f: am 869d2735: Merge "Fix issues with GC thread." into jb-mr2-dev
* commit '5c18ff0f2b9eab8481acfe13603e253e9c16fb32':
  Fix issues with GC thread.
2013-04-12 00:10:47 -07:00
Tim Murray
869d273503 Merge "Fix issues with GC thread." into jb-mr2-dev 2013-04-12 07:04:08 +00:00
Tim Murray
6dacf8355a Fix issues with GC thread.
bug 8600533

Change-Id: I356902ee9897daeb2c1090815beeb572234c81e7
2013-04-11 22:04:26 -07:00
Jason Sams
5a15136572 am 4e9ce36e: am c876cc49: Fix docs typo in YUV code
* commit '4e9ce36ee03a2a27f6f80c460385a748566cde41':
  Fix docs typo in YUV code
2013-04-11 20:47:25 -07:00
Jason Sams
c876cc4994 Fix docs typo in YUV code
bug 8566866

Change-Id: I9da6d237b0a109b2c0799a41e531a0344cc19d40
2013-04-11 20:22:31 -07:00
Jason Sams
ca22277d33 am d4b1b98d: am a2f289a4: Merge "USAGE_IO_INPUT buffer notifications" into jb-mr2-dev
* commit 'd4b1b98dfd9090cf8ccf7e713d0cca9049cb10a2':
  USAGE_IO_INPUT buffer notifications
2013-04-11 19:27:15 -07:00
Jason Sams
a2f289a40d Merge "USAGE_IO_INPUT buffer notifications" into jb-mr2-dev 2013-04-12 02:20:11 +00:00
Jason Sams
739c8263a1 USAGE_IO_INPUT buffer notifications
Change-Id: I6ec0508089029da9ed118127f0c13b7b189ef5e9
2013-04-11 18:14:26 -07:00
Fabrice Di Meglio
b735e1d426 am 70d2c773: am f5c757c6: Merge "More fix for bug #8159072 Spinner widget should be RTL\'ized" into jb-mr2-dev
* commit '70d2c77320287d97fa2d90cc60f85e1706bffb1b':
  More fix for bug #8159072 Spinner widget should be RTL'ized
2013-04-11 18:10:51 -07:00
Fabrice Di Meglio
f5c757c629 Merge "More fix for bug #8159072 Spinner widget should be RTL'ized" into jb-mr2-dev 2013-04-12 01:03:33 +00:00
Tim Murray
7c4caadb93 Add support for synchronous get().
bug 8599910

Change-Id: I0e7c52350cc1abb14a5ed59bb92e8e0346209d53
2013-04-11 16:25:29 -07:00
Fabrice Di Meglio
dc25d25333 More fix for bug #8159072 Spinner widget should be RTL'ized
- fix DrawableContainerState.getChangingConfigurations() to take care about its children
- make Resources.verifyPreloadConfig() return false when the changing configuration
contains layout direction bits (this is when a Drawable is having different version
for LTR and RTL layout directions)
- use constant state instead of the resource type value for checking if we can
preload the drawable
- fix typo

Change-Id: Idd64caf0fbe0f5cfd5ffe09343e84bafa9446ea5
2013-04-11 13:38:57 -07:00
Tim Murray
5e8b65d498 am 4e8a3bcf: am 3eba934a: Merge "Clean up USAGE_SHARED and add syncing for USAGE_SHARED." into jb-mr2-dev
* commit '4e8a3bcf03cdaeba6ea2f7cbbbb55c7b10c19e9c':
  Clean up USAGE_SHARED and add syncing for USAGE_SHARED.
2013-04-10 21:58:46 -07:00
Tim Murray
3eba934a27 Merge "Clean up USAGE_SHARED and add syncing for USAGE_SHARED." into jb-mr2-dev 2013-04-11 04:50:32 +00:00
Tim Murray
ccdeb2f993 am f3860953: am a8aa6880: Merge "Add GC thread to RSGL." into jb-mr2-dev
* commit 'f38609536f27e8e6971869bf63d744bf12a60163':
  Add GC thread to RSGL.
2013-04-10 11:44:52 -07:00
Tim Murray
a8aa6880e4 Merge "Add GC thread to RSGL." into jb-mr2-dev 2013-04-10 18:37:35 +00:00
Tim Murray
fb32993a45 Add GC thread to RSGL.
bug 8585185

Change-Id: I06df29c3be831d6cd53fa8913ba3731f29c137d1
2013-04-10 11:23:24 -07:00
Stephen Hines
4e8cf0c83c resolved conflicts for merge of 0664479a to master
Change-Id: Ia2cb081d575dbf2bf041143f1c4f553ecd2c24f3
2013-04-10 10:56:36 -07:00
Stephen Hines
7d25a829d3 Defer RS cache creation until a ScriptC is built.
Bug: 8582926
Change-Id: If017f41382f023f8f6ddd78ba198402d427c95f8
2013-04-10 01:20:47 -07:00
Jason Sams
d351e3b12e am dfbd6eae: am d7094ea2: Merge "Fix docs with deprecated resize1D" into jb-mr2-dev
* commit 'dfbd6eae7bd2b1b7420f819459464ef64f9912bb':
  Fix docs with deprecated resize1D
2013-04-09 23:25:10 -07:00
Ying Wang
28af35e8cd resolved conflicts for merge of a976bddd to master
Change-Id: I64e1cbfb0eee891ce4d1eee40eefdcedcc501f7f
2013-04-09 23:21:42 -07:00
Jason Sams
d7094ea29b Merge "Fix docs with deprecated resize1D" into jb-mr2-dev 2013-04-10 05:17:30 +00:00
Ying Wang
d8b26d6c42 Merge "Add liblog" into jb-mr2-dev 2013-04-10 05:16:14 +00:00
Jason Sams
60799fb74b Fix docs with deprecated resize1D
Change-Id: Id1774e1e8be1c1600efaa535cf330e659addb703
2013-04-09 22:08:40 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Jason Sams
171af24758 am fd38ca2c: am 07c6fa12: Merge "Implement RS GC worker thread." into jb-mr2-dev
* commit 'fd38ca2cdcaa07800058a12622896cdd9d2e2189':
  Implement RS GC worker thread.
2013-04-09 21:27:53 -07:00
Jason Sams
2c128082c6 am 84882711: am 808723f2: Merge "Cleanup Allocation and add 3D copies." into jb-mr2-dev
* commit '84882711fcb7f54bfa4b0f6f28b70bbe35e24487':
  Cleanup Allocation and add 3D copies.
2013-04-09 21:27:49 -07:00
Jason Sams
07c6fa123d Merge "Implement RS GC worker thread." into jb-mr2-dev 2013-04-10 04:21:01 +00:00
Tim Murray
78e6494560 Clean up USAGE_SHARED and add syncing for USAGE_SHARED.
bug 8567006

Change-Id: Ie9c01eeccdd3fa0a81893314dfbce7c012d3f7d3
2013-04-09 17:47:57 -07:00