2202 Commits

Author SHA1 Message Date
Jason Sams
f9678070a0 Merge "Fix bug in grain." into jb-mr1-dev 2012-08-21 17:09:56 -07:00
Jason Sams
a8309cb7ee Merge "Move the kernel launch to specific intrinsic class." into jb-mr1-dev 2012-08-21 17:08:17 -07:00
Stephen Hines
cdb05977ac Merge "Switch to v8 (and appropriate llvm-rs-cc stuff)." into jb-mr1-dev 2012-08-21 16:01:30 -07:00
Jason Sams
f1c051b6f2 Fix bug in grain.
Compare with 0 was done against unsigned which did not
correctly clamp.

Change-Id: I6dbff36190c279961017e57db3aaba51c60a0ad3
2012-08-21 15:54:07 -07:00
Jason Sams
19e1086df1 Move the kernel launch to specific intrinsic class.
This allows support of both input types. Kernel source
and global source.

Change-Id: Iea60bebd79c786795eae81c14cbec352b470a9c0
2012-08-21 15:53:29 -07:00
Jean-Baptiste Queru
02df84a3b1 am 34d85746: am b8da225f: Merge "Tests/RS: Add RS context check for RsBalls setAccel()"
* commit '34d8574665caaef52f7c595b57f45f1c9efd7e39':
  Tests/RS: Add RS context check for RsBalls setAccel()
2012-08-21 14:02:02 -07:00
Jean-Baptiste Queru
34d8574665 am b8da225f: Merge "Tests/RS: Add RS context check for RsBalls setAccel()"
* commit 'b8da225f26b689288710ff0eafefa906b4f5700f':
  Tests/RS: Add RS context check for RsBalls setAccel()
2012-08-21 14:00:11 -07:00
Maxim Siniavine
9229700728 Added a test to measure memory usage of apps.
Each app uses a certain amount of memory when running in the
foreground. This test takes a list of app on the command line
starts them one at a time and reports the total PSS of the
app's process. The test allows to monitor memory usage over time.

Change-Id: I3411bd96cf7c7af10acbb8deeb9936469b810ea2
2012-08-21 11:31:44 -07:00
Dianne Hackborn
79af1dd54c Switch public APIs to use new UserHandle class for identifying users.
Gets rid of "yet another integer" confusion.

Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
2012-08-17 10:36:08 -07:00
Yong Chen
da1c93ae4d Tests/RS: Add RS context check for RsBalls setAccel()
mRS could be null when lock and unlock screen by pressing power key
several times, it causes RsBalls crash. Add null pointer check to fix.

Change-Id: If37dee8609420daaff17772d5194cad5531f98e6
Author: Yong Chen <yong.a.chen@intel.com>
Signed-off-by: Yong Chen <yong.a.chen@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 31271
2012-08-17 10:04:21 +08:00
Stephen Hines
31bc7f9f21 Merge "Initial version of Renderscript Compute Benchmark" into jb-mr1-dev 2012-08-16 14:38:43 -07:00
Stephen Hines
9196c9a0c3 Merge "Fisheye filter: approx version, general performance improvements" into jb-mr1-dev 2012-08-16 14:37:34 -07:00
Stephen Hines
65b8734400 Switch to v8 (and appropriate llvm-rs-cc stuff).
Change-Id: Ib3f71442af4aa06a55d5a9f819b52082e23dddd6
2012-08-16 14:01:17 -07:00
Jason Sams
14250ccf22 Merge "Testing java compat lib for RS." into jb-mr1-dev 2012-08-16 11:23:41 -07:00
Rajeev Sharma
000dc53ca9 Initial version of Renderscript Compute Benchmark
Tests all library functions with all input types and outputs timing data via
rsDebug.  Also tests all basic numerical operations and type conversions.

Change-Id: I39038606776bbf7361d5fc7a9a3ec3b05b8e6ae0
2012-08-15 21:58:19 -07:00
Rajeev Sharma
50b1ba0083 Fisheye filter: approx version, general performance improvements
Lightly refactor original filter and rework math for performance.  Add approx
version which uses approx_rsqrt, approx_sqrt, and the new approx_atan function.

Change-Id: I796d50da05c1684167696ea4da37d7d75fc78626
2012-08-15 21:50:42 -07:00
Jason Sams
ebefb2c3d8 Testing java compat lib for RS.
Change-Id: I77a19dea9f6b9513b79ae6b686dfe1803bb4cd98
2012-08-15 17:26:39 -07:00
Jeff Brown
9630704ed3 Power manager rewrite.
The major goal of this rewrite is to make it easier to implement
power management policies correctly.  According, the new
implementation primarily uses state-based rather than event-based
triggers for applying changes to the current power state.

For example, when an application requests that the proximity
sensor be used to manage the screen state (by way of a wake lock),
the power manager makes note of the fact that the set of
wake locks changed.  Then it executes a common update function
that recalculates the entire state, first looking at wake locks,
then considering user activity, and eventually determining whether
the screen should be turned on or off.  At this point it may
make a request to a component called the DisplayPowerController
to asynchronously update the display's powe state.  Likewise,
DisplayPowerController makes note of the updated power request
and schedules its own update function to figure out what needs
to be changed.

The big benefit of this approach is that it's easy to mutate
multiple properties of the power state simultaneously then
apply their joint effects together all at once.  Transitions
between states are detected and resolved by the update in
a consistent manner.

The new power manager service has is implemented as a set of
loosely coupled components.  For the most part, information
only flows one way through these components (by issuing a
request to that component) although some components support
sending a message back to indicate when the work has been
completed.  For example, the DisplayPowerController posts
a callback runnable asynchronously to tell the PowerManagerService
when the display is ready.  An important feature of this
approach is that each component neatly encapsulates its
state and maintains its own invariants.  Moreover, we do
not need to worry about deadlocks or awkward mutual exclusion
semantics because most of the requests are asynchronous.

The benefits of this design are especially apparent in
the implementation of the screen on / off and brightness
control animations which are able to take advantage of
framework features like properties, ObjectAnimator
and Choreographer.

The screen on / off animation is now the responsibility
of the power manager (instead of surface flinger).  This change
makes it much easier to ensure that the animation is properly
coordinated with other power state changes and eliminates
the cause of race conditions in the older implementation.

The because of the userActivity() function has been changed
so that it never wakes the device from sleep.  This change
removes ambiguity around forcing or disabling user activity
for various purposes.  To wake the device, use wakeUp().
To put it to sleep, use goToSleep().  Simple.

The power manager service interface and API has been significantly
simplified and consolidated.  Also fixed some inconsistencies
related to how the minimum and maximum screen brightness setting
was presented in brightness control widgets and enforced behind
the scenes.

At present the following features are implemented:

- Wake locks.
- User activity.
- Wake up / go to sleep.
- Power state broadcasts.
- Battery stats and event log notifications.
- Dreams.
- Proximity screen off.
- Animated screen on / off transitions.
- Auto-dimming.
- Auto-brightness control for the screen backlight with
  different timeouts for ramping up versus ramping down.
- Auto-on when plugged or unplugged.
- Stay on when plugged.
- Device administration maximum user activity timeout.
- Application controlled brightness via window manager.

The following features are not yet implemented:

- Reduced user activity timeout for the key guard.
- Reduced user activity timeout for the phone application.
- Coordinating screen on barriers with the window manager.
- Preventing auto-rotation during power state changes.
- Auto-brightness adjustment setting (feature was disabled
  in previous version of the power manager service pending
  an improved UI design so leaving it out for now).
- Interpolated brightness control (a proposed new scheme
  for more compactly specifying auto-brightness levels
  in config.xml).
- Button / keyboard backlight control.
- Change window manager to associated WorkSource with
  KEEP_SCREEN_ON_FLAG wake lock instead of talking
  directly to the battery stats service.
- Optionally support animating screen brightness when
  turning on/off instead of playing electron beam animation
  (config_animateScreenLights).

Change-Id: I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
2012-08-15 03:06:24 -07:00
Dianne Hackborn
34743ac7d6 Merge "Add API to create new contexts with custom configurations." into jb-mr1-dev 2012-08-14 17:33:01 -07:00
Dianne Hackborn
756220bd19 Add API to create new contexts with custom configurations.
This allows you to, say, make a Context whose configuration
is set to a different density than the actual density of the device.

The main API is Context.createConfigurationContext().  There is
also a new API on ContextThemeWrapper that allows you to apply
an override context before its resources are retrieved, which
addresses some feature requests from developers to be able to
customize the context their app is running in.

Change-Id: I88364986660088521e24b567e2fda22fb7042819
2012-08-14 16:51:38 -07:00
Jason Sams
6ab97682fd Intrinsics test
Change-Id: I1847ad0c9190100eb84f7e052dd9f3bff81dc447
2012-08-14 12:06:00 -07:00
Chet Haase
e816baea65 Optimize interactions with glyph cache
There are two fixes here:
- precaching: instead of caching-then-drawing whenever there is a new
glyph, we cache at DisplayList record time. Then when we finally draw that
DisplayList, we just upload the affected texture(s) once, instead of once
per change. This is a huge savings in upload time, especially when there are
larger glyphs being used by the app.
- packing: Previously, glyphs would line up horizontally on each cache line, leaving
potentially tons of space vertically, especially when smaller glyphs got put into cache
lines intended for large glyphs (which can happen when an app uses lots of unique
glyphs, a common case with, for example, chinese/japanese/korean languages). The new
approach packs glyphs vertically as well as horizontally to use the space more efficiently
and provide space for more glyphs in these situations.

Change-Id: I84338aa25db208c7bf13f3f92b4d05ed40c33527
2012-08-14 10:33:30 -07:00
Jason Sams
dc39e86cdc Fix build issue with new error checks.
Change-Id: Iccb9c12e0427622964a52806652eaddfb5834240
2012-08-10 16:29:00 -07:00
Jason Sams
423ebcb4dc Implement ScriptGroup and add test.
Change-Id: I6ce0479c20f425d501c759c15717aa8b418c3f5f
2012-08-10 16:02:33 -07:00
Romain Guy
320d46bf84 Reduce gradients textures size whenever possible
Change-Id: Ifd58625ee62edac3b5d20b77553cb98b6fa2b46e
2012-08-08 16:05:42 -07:00
Dianne Hackborn
537915828b Merge "More mult-user API work." into jb-mr1-dev 2012-08-08 10:22:49 -07:00
Dianne Hackborn
7d19e0242f More mult-user API work.
- You can now use android:singleUser with receivers and providers.
- New API to send ordered broadcasts as a user.
- New Process.myUserHandle() API.

For now I am trying out "user handle" as the name for the numbers
representing users.

Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
2012-08-07 19:19:22 -07:00
Romain Guy
0a332e39eb Merge "Draw an empty border around glyphs to avoid sampling issues Bug #6942209" into jb-mr1-dev 2012-08-07 19:12:09 -07:00
Romain Guy
33fa1f774c Draw an empty border around glyphs to avoid sampling issues
Bug #6942209

The font renderer was preserving a 1 px border around each glyph to ensure
bilinear filtering would work nicely. Unfortunately, this border was not
set to 0 when glyphs were added in the cache to replace old evicted glyphs.

Change-Id: Ib85afca7ebad5cb63f960dc0e87ae162333dbfe8
2012-08-07 19:09:57 -07:00
Rajeev Sharma
6e1b917759 Add case for NEON min to RSTest
Regression test for bug 6841495.

Change-Id: If98380f402a711592dcddba5438e3cce5b008131
2012-08-07 14:30:50 -07:00
Rajeev Sharma
8fa57118ad Add approximate version of Vignette filter to Image Processing test
Currently uses approx_recip and approx_length (thus approx_sqrt).  Will use
approx_exp once this is implemented.

Change-Id: I9f01023105e82a82262100d8ed831e9250a05ed8
2012-08-06 14:22:54 -07:00
Romain Guy
a70cd04985 Merge "Add dithering to gradients" into jb-mr1-dev 2012-08-03 11:09:49 -07:00
Dianne Hackborn
b4163a6e12 Add APIs for interacting across users.
- Expose the existing Context.sendBroadcast() as
  Context.sendBroadcastAsUser().
- Add new android:singleUser attribute for services.
- Add new INTERACT_ACROSS_USERS_FULL permission for full
  system-level access to cross-user interface (allows
  sendBroadcastAsUser() to send to any receiver).
- Add new INTERACT_ACROSS_USERS_FULL permission for
  more restricted cross-user interaction: this is required
  for android:singleUser, and allows you to use
  sendBroadcastAsUser() but only to send to your own
  receivers.

Change-Id: I0de88f6718e9505f4de72e3f45d29c0f503b76e9
2012-08-02 19:07:57 -07:00
Romain Guy
211efea737 Add dithering to gradients
Change-Id: Ic1208855bde3a254eca2fd7cef43e0f1318ce419
2012-08-01 19:18:35 -07:00
Rajeev Sharma
c1deaa221f Vignette filter: precompute more values, simplify math, cleanup code
Change-Id: I29cfc313a5173fd393944dd9af58d0111a3d726a
2012-08-01 15:46:30 -07:00
Romain Guy
42e1e0d482 Improve gradients
Avoid using textures for common gradients (two stops from 0.0 to 1.0)

Change-Id: Iff55d21b126c8cfc4cfb701669f2339c8f6b131a
2012-07-31 18:55:16 -07:00
Jason Sams
41bd3508e7 save 2ms replace div with mul.
Change-Id: I13d80b074b70cd2edd71f33e2881aa367b7652c7
2012-07-30 16:41:18 -07:00
Rajeev Sharma
bb0dbf7373 Add vignette filter to Image Processing test
Add a vignette filter, mostly based on the GLSL version in
android.filterpacks.imageproc.VignetteFilter but with more input options.

Change-Id: I6f38a0ca09d35566104ec8e8523548399b8704a0
2012-07-27 11:03:52 -07:00
Rajeev Sharma
bb2c947636 Add fisheye filter to Image Processing benchmark
Add a fisheye filter, mostly based on the GLSL version in
android.filterpacks.imageproc.FisheyeFilter but with the configurable center
functionality from the JNI version in the original PhotoEditor.

Change-Id: I6be7d82bf2ad564919f9e675ac9a445fae6c440a
2012-07-27 11:01:36 -07:00
Jeff Smith
440f32bbd4 am ddd88726: am 71930dd7: am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214
* commit 'ddd88726a247e4100cb62b3dc9d0887ca2ae2ec4':
  Fix several cases of broken droiddoc syntax external issue 35214
2012-07-25 22:13:40 -07:00
Rajeev Sharma
a807a50cf2 Add unsigned tests to math agreement test
All operations on unsigned tests were previously commented out due to
bug 6764163.  Signed char vectors remain commented out due to bug
6865598, but unsigned char vectors appear to be working properly.

Change-Id: I723c43fe69a78c8f8e03ed1e4db95f73966fcaad
2012-07-25 15:47:25 -07:00
Jeff Smith
ddd88726a2 am 71930dd7: am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214
* commit '71930dd77e4dc6f6be5c648019d2ab0da5f0584c':
  Fix several cases of broken droiddoc syntax external issue 35214
2012-07-25 15:05:23 -07:00
Stephen Hines
325311251e Merge "Test for unsigned RS setters." 2012-07-25 11:46:56 -07:00
Stephen Hines
85dae98ca1 Test for unsigned RS setters.
BUG=6764163

This verifies that we don't trample memory with our unsigned set_*()
operations. Previous versions of llvm-rs-cc generated code that could
accidentally overwrite neighboring locations (due to setVar() being
called on the larger Dalvik types for unsigned globals).

Change-Id: I014496122a05cf425efa160978d0738a5233742e
2012-07-25 11:45:28 -07:00
Jeff Smith
71930dd77e am a45746ef: Fix several cases of broken droiddoc syntax external issue 35214
* commit 'a45746efadd11bb7dfab026fb3c81a25fae74ca4':
  Fix several cases of broken droiddoc syntax external issue 35214
2012-07-25 10:56:03 -07:00
Jeff Smith
a45746efad Fix several cases of broken droiddoc syntax
external issue 35214

patch contributed by Jeff Smith <whydoubt@yahoo.com>

Change-Id: I70dcee88a140699bf3e1ab369bed6dcd2fdd3d83
2012-07-25 10:49:25 -07:00
Romain Guy
786fc93d71 Make HardwareRenderer able to target generic Surface objects
Change-Id: I4b7199a1eb30e0df354ae12c4819adc69db5df40
2012-07-24 16:41:21 -07:00
Romain Guy
d8031f0e8c Merge "Make gradients look slightly better" 2012-07-20 17:02:14 -07:00
Romain Guy
98ba89492a Make gradients look slightly better
Change-Id: Ib12c628a88b9ec6af1214ce6e5cb14cfde40485e
2012-07-20 16:58:45 -07:00
Stephen Hines
b10f455e44 Merge "Updated math_agree test" 2012-07-20 15:52:42 -07:00