2280 Commits

Author SHA1 Message Date
Stephen Hines
2f2f0d40e8 Merge "Failing uchar4->int4 test" into jb-mr1-dev 2012-09-13 19:45:56 -07:00
Jason Sams
80d819033d Unhide intrinsics and document API.
Change-Id: I0233245c68f9a08780213062e62cfea6cf909c13
2012-09-13 17:00:48 -07:00
Jason Sams
bd6acda96f Merge "Fix bugs in grain where values could go out of bounds." into jb-mr1-dev 2012-09-13 14:44:34 -07:00
Guang Zhu
79d45660f2 dodging the @JavascriptInterface bullet
The reason for not to fix the test instead with new annotation
is that it's preferable to have a single version that works for
all platforms.

This can be revisted once we have enough platforms released to
not to care about the older ones.

Change-Id: I42557f920702e5a65e39a3fea80533bd07b54367
2012-09-13 12:03:10 -07:00
Jason Sams
8a95803738 Fix bugs in grain where values could go out of bounds.
Change-Id: Ib2cc3177424cf24bc81b75786dfd9be30fea5378
2012-09-13 11:07:33 -07:00
Stephen Hines
58b2b24128 Updated tests for simpler ScriptC constructors.
Change-Id: Ia1f66a3598a979924ccbf857093693135012c4c9
2012-09-12 21:45:56 -07:00
Jason Sams
3a5b801176 LUT intrinsic and CrossProcess test.
5x5 convolve and test
Gauss blur and test


Change-Id: Ic2f5d583cbdc1793ec8c8e2beea783d4ec34a57f
2012-09-08 22:16:22 -07:00
Romain Guy
4aacf93d40 Merge "Fix memory corruption in LayerRenderer::copyLayer" into jb-mr1-dev 2012-09-07 18:44:40 -07:00
Romain Guy
e49d7ec361 Fix memory corruption in LayerRenderer::copyLayer
The pixel store pack alignment was not set for the source texture,
causing a write to occur outside of the destination bitmap's
bounds.

Change-Id: Iaa5767acf7b5943fbc2765c3810a142f06b1a796
2012-09-07 18:42:38 -07:00
Jason Sams
cd664f0faa Merge "Add greyscale intrinsic test." into jb-mr1-dev 2012-09-07 15:40:11 -07:00
Jason Sams
3f7bbe8cd3 Merge "Document ColorMatrix intrinsic and add helpers" into jb-mr1-dev 2012-09-07 15:38:25 -07:00
Chris Craik
75040f8a77 Handle different x, y scales in drawLines AA path
bug:7114630

Fixes different x, y scales, and fixes boundaryWidthProportion to be from
center, not edge.

Also adds drawLine tests that previously drew blurry.

Change-Id: I2b648a60361ad3931eac67647b9b27909525ee1e
2012-09-07 15:20:38 -07:00
Jason Sams
c1ccbf5231 Add greyscale intrinsic test.
Change-Id: I24c9b8769ab7fe2fed9ef17f7ff1063c60977c41
2012-09-06 23:54:05 -07:00
Jason Sams
8fd5853c1c Document ColorMatrix intrinsic and add helpers
Increase size of test image.
Add helpers for greyscale and yuv<>rgb conversions

Change-Id: I6cdd06ae23623b47f5034585ed5d385ff11348ac
2012-09-06 23:29:36 -07:00
Chris Craik
378d131e65 Merge "Varying-based AA rect drawing" into jb-mr1-dev 2012-09-06 10:52:14 -07:00
Chris Craik
6ebdc114e0 Varying-based AA rect drawing
Instead of calculating opacity from relative position in the shader, use a
shader varying to do this computation for us.

bug:5045101

Also adds a test to HwAccelerationTest to show incorrect antialiasing in
scaled drawAARect / boundarySize calculation.

Change-Id: Icdc41acb01dc10ce354834f8389a5aed2f439162
2012-09-05 16:45:03 -07:00
Jason Sams
6d617c2ddd Merge "Stabilize perf data." into jb-mr1-dev 2012-09-05 13:50:36 -07:00
Jason Sams
3e777c7970 Merge "Add ColorMatrix Intrinsic." into jb-mr1-dev 2012-09-05 13:48:58 -07:00
Jason Sams
76fb2973b9 Stabilize perf data.
Change-Id: I75fb31b1bb6e6a7a5a82b86fd4a6639dd328ceaa
2012-09-05 13:18:43 -07:00
Jason Sams
5729fcdf95 Add ColorMatrix Intrinsic.
Add better intrinsic testing.
Include reference .rs for each intrinsic.

Change-Id: I327649f16ac8f641c2bd96f7b16f51874a3e820e
2012-09-04 19:57:40 -07:00
Jason Sams
f1ffb4f7fe Merge "update image processing to fix ScriptGroup names." into jb-mr1-dev 2012-09-04 16:59:07 -07:00
Jason Sams
c3f6d184bb update image processing to fix ScriptGroup names.
Change-Id: Id3be5142ad740af65f3ce19b9d8047926bb55a85
2012-09-04 15:25:34 -07:00
Romain Guy
9fc4b356a4 Add new hw acceleration test
Change-Id: Id2b94286cf62ab77d8c843cffaba09b3070a6332
2012-09-04 10:27:05 -07:00
Dianne Hackborn
4120375d46 Remove Binder.getOrigCallingUid().
Replaced all remaining places that used it with explicit user
specification.

While doing this, I ran into stuff that was creating PendingIntent
objects (that now need to specify the explicit user they are for),
which are also posting notifications...  but have no way to specify
the user for the notification.

So the notification manager in the system process now also gets a
formal concept of a user associated with the notification, which
is passed in to all the necessary aidl calls.  I also removed the
old deprecated aidl interface for posting/cancelling notifications,
since we now always need a user supplied.

There is more work that needs to be done here, though.  For example
I think we need to be able to specify USER_ALL for a notification that
should be shown to all users (such as low storage or low battery).
Along with that, the PendingIntent creation needs to be tweaked to
be able to handle USER_CURRENT by evaluating the user at the point the
pending intent is sent.

That's for another change, however.

Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
2012-08-31 15:11:13 -07:00
Dianne Hackborn
73365695e4 Merge "Improve multi-user broadcasts." into jb-mr1-dev 2012-08-30 14:56:11 -07:00
Dianne Hackborn
5ac72a2959 Improve multi-user broadcasts.
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
2012-08-30 14:33:22 -07:00
Maxim Siniavine
2effa64ab7 Fixed MemoryUsage issue with reporting results.
When the memory of the application did not stabilize within
the time limit, the test would report that using the application
name, instead of the result key. Fixed the test to always use the
result key.

Change-Id: Ie16969e831bd3d89ee0496b992568f52bf1989cb
2012-08-30 14:05:38 -07:00
Stephen Hines
7bb5745b97 Failing uchar4->int4 test
BUG=7081293

This demonstrates the missing vmovl.u16 for expanding the unsigned char input.

Change-Id: I14f560e0fb1efd1c283d2e0a87f5506ca28cf88d
2012-08-29 20:17:57 -07:00
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