141 Commits

Author SHA1 Message Date
Jason Sams
43ee06857b Implement reflecting Java objects into the ACC enviroment. 2009-08-12 17:54:11 -07:00
Joe Onorato
a8f2acee39 readData should read the data, not write the data. 2009-08-12 11:47:23 -07:00
Marco Nelissen
3f8f9da85f Fix the simulator build by removing librs_jni and libRS from it.
Since libacc isn't 64-bit clean (it casts pointers to integers),
and so can't be built for the gHardy simulator, everything
that depends on it can't be built for the simulator either, which
means removing libRS and librs_jni.
2009-08-12 09:41:07 -07:00
Romain Guy
b3c61e7dec Fix the build 2009-08-11 17:49:01 -07:00
Joe Onorato
f415cf2d78 Add two addDefines methods to ScriptC.Builder. They add #defines from the fileds on a class or object that you pass in. 2009-08-10 15:15:52 -07:00
Android (Google) Code Review
5d3b13150d Merge change 20657
* changes:
  Fix possible NPE when mutating a DrawableContainer
2009-08-10 15:12:04 -07:00
Romain Guy
1010ac9b7c Fix possible NPE when mutating a DrawableContainer 2009-08-10 15:11:06 -07:00
Jason Sams
40a29e8e28 Implement basic allocation readback. Add Get height, width to ScriptC_Lib. 2009-08-10 14:55:26 -07:00
Joe Onorato
01e5fbd721 build libRS 2009-08-10 14:06:01 -07:00
Joe Onorato
d7b3774da6 Let java put #defines into renderscript 2009-08-09 22:58:20 -07:00
Jason Sams
1bada8cd6e Begin implementing SimpleMesh and fix some bugs with refcounting and java object destruction tracking. 2009-08-09 17:05:13 -07:00
Jason Sams
9bee51c42e Remove useless slot from ProgramVertex. Optimize GL state setup. 2009-08-05 13:57:03 -07:00
Jason Sams
110195fe9f Seperate ProgramVertex from RenderScript.java and merge ProgramVertexAlloc into the ProgramVertex class. 2009-08-04 19:00:00 -07:00
Jason Sams
0835d42be9 Seperate Light and Sampler from RenderScript.java 2009-08-04 17:58:23 -07:00
Jason Sams
22534176fb Split ProgramFragment and ProgramStore from RenderScript.java. Update Element and Type to new cached builder for easier app developement. 2009-08-04 17:05:43 -07:00
Jason Sams
69f0d31e57 Split ScriptC from RenderScript.java. Implement state caching in the Builder objects. 2009-08-04 12:29:40 -07:00
Android (Google) Code Review
9df76c7c2f Merge change 9551
* changes:
  Implement the jni bindings for Adapter2D.  Fix a refcount bug in the native adapter implementation.  Use adapters in Film to border the mipmaps.
2009-08-03 16:23:07 -07:00
Jason Sams
bd1c3ad0cd Implement the jni bindings for Adapter2D. Fix a refcount bug in the native adapter implementation. Use adapters in Film to border the mipmaps. 2009-08-03 16:03:08 -07:00
Romain Guy
a32d100b34 Add new utility methods to rsScriptC_Lib, android.util.MathUtil and android.graphics.Color.
Fixes RS compilation.
2009-07-31 21:36:18 -07:00
Jason Sams
b8c5a84e7c Split RenderScript Type and Allocation into seperate classes. 2009-07-31 20:40:47 -07:00
Jason Sams
36e612a488 Begin splitting up RenderScript.java into seperate classes. First piece split off Element. 2009-07-31 16:26:13 -07:00
Romain Guy
584a375df6 First pass at implementing the Grass live wallpaper in RenderScript.
This change also adds second(), minute() and hour() to the RS library.
2009-07-30 19:11:51 -07:00
Android (Google) Code Review
afcf686cb0 am 25dff70f: Merge change 9039 into donut
Merge commit '25dff70f153529b87f5ad4a92f4de21e8950b1de'

* commit '25dff70f153529b87f5ad4a92f4de21e8950b1de':
  Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
2009-07-30 16:05:27 -07:00
Jason Sams
dba3ba5b5b Implement bitmap resource loaders for utility. cleanup rolloRS and checkin maps.png which was missing. 2009-07-30 14:56:12 -07:00
Dianne Hackborn
0d221012ff Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
It turns out we were not returning the density for anything retrieved from a
TypedArray...  which basically means any bitmap references from a layout or style...!!!

This is now fixed.

Also fiddle with the density compatibility mode to turn on smoothing in certain situations,
helping the look of things when they need to scale and we couldn't do the scaling at
load time.
2009-07-29 19:44:01 -07:00
Android (Google) Code Review
a590434559 Merge change 8835
* changes:
  Add "boxed" bitmap uploads which simply place a non-pow2 bitmap into the smallest larger pow texture.  The added space is filled black.
2009-07-28 12:03:46 -07:00
Jason Sams
b0ec1b46d6 Add "boxed" bitmap uploads which simply place a non-pow2 bitmap into the smallest larger pow texture. The added space is filled black. 2009-07-28 12:02:16 -07:00
Android (Google) Code Review
2c3fc83ac5 am ef9fd18d: Merge change 8616 into donut
Merge commit 'ef9fd18d90829ecbd37769cc05a8d5288aff821c'

* commit 'ef9fd18d90829ecbd37769cc05a8d5288aff821c':
  Fiddle with default densities to try to sanitize the API.
2009-07-27 12:05:44 -07:00
Dianne Hackborn
96e240f25a Fiddle with default densities to try to sanitize the API.
An issue with the density API is that bitmaps assumed the old default density,
so new programs would have to explicitly set the correct density for every bitmap
they create.

This is an attempt to fix that situation, by define the default density of bitmaps
to be the main screen's density, except for old apps where it is the original default
density.

Actually implementing this is not so great, though, because the Bitmap constructors
can't really know anything about who is calling them to know which density to use.
So at this level the compatibility mode is defined per-process -- meaning the initial
package loaded into a process defines the default bitmap density, and everyone else
loaded in later on has to live with that.

In practice this shouldn't be much of a problem, there shouldn't be much mixing of
old vs. new apps in a process.  It does mean that, going forward, if a developer is
going to use shared user IDs for this, they will need to make sure either that all of
their apps are in the same compatibility mode, or that their code explicitly sets the
density of bitmaps it receives.  This isn't all that great, but I think it is worth
the benefit of allowing people who write modern apps to not have to deal with bitmap
densities.

This change also does some cleanup of the density management (making sure to always
copy over bitmap densities, etc) and adds java docs to explain the various ways
density is set and used by the system.
2009-07-26 17:42:30 -07:00
Dianne Hackborn
e2dba02441 am 11ea3347: Allow for screen density drawables in compatibility mode.
Merge commit '11ea33471e1a14a8594f0b2cd012d86340dd3bd8'

* commit '11ea33471e1a14a8594f0b2cd012d86340dd3bd8':
  Allow for screen density drawables in compatibility mode.
2009-07-24 16:08:56 -07:00
Dianne Hackborn
11ea33471e Allow for screen density drawables in compatibility mode.
This change allows us to use drawables that match the current screen
density even when being loaded in compatibility mode.  In this case,
the bitmap is loaded in the screen density, and the bitmap and
nine-patch drawables take care of accounting for the density difference.

This should be safe for existing applications, for the most part, since
they shouldn't really be pulling the bitmap out of the drawable.  For
the small rare chance of them breaking, it worth getting the correct
graphics.  Also this will only happen when there is actually a resource
of the matching density, and no existing apps should have resources for
anything besides the default density (though of course all of the
framework resources will be available in the native density).

As part of this, the bitmap density API has been changed to a single
integer provider the DPI unit density.
2009-07-24 10:47:15 -07:00
Android (Google) Code Review
53305e8326 Merge change 8421
* changes:
  Unbreak build by making the build of renderscript again conditional on BUILD_RENDERSCRIPT until we can figure out why the build servers see an error that does not reproduce locally.
2009-07-23 16:12:06 -07:00
Jason Sams
8af858e9b6 Unbreak build by making the build of renderscript again conditional on BUILD_RENDERSCRIPT until we can figure out why the build servers see an error that does not reproduce locally. 2009-07-23 16:10:46 -07:00
Android (Google) Code Review
bc512021ee Merge change 8279
* changes:
  Move the java and jni renderscript files to the proper location.
2009-07-23 15:25:13 -07:00
Jason Sams
e29d471e5c Move the java and jni renderscript files to the proper location. 2009-07-23 15:19:03 -07:00
Android (Google) Code Review
8aea2f5f74 am 59c25cba: Merge change 8218 into donut
Merge commit '59c25cbaf0dd690e503b881392510127441d9074'

* commit '59c25cbaf0dd690e503b881392510127441d9074':
  DrawableContainer was not respecting the value returned by Drawable.getPadding(Rect).
2009-07-22 11:51:34 -07:00
Romain Guy
5140141c26 DrawableContainer was not respecting the value returned by Drawable.getPadding(Rect).
Before this change, DrawableContainer would always return true from getPadding(Rect)
even if all of its children were returning false from getPadding(Rect). This change
modifies this behavior to respect getPadding(Rect): mConstantPadding is kept null
when getPadding(Rect) returns false for all of the children and a flag is set
to avoid recomputing that value every time getConstantPadding() is invoked.
2009-07-22 11:35:49 -07:00
Android (Google) Code Review
fead9b8ad0 am fe6f45c8: Merge change 8098 into donut
Merge commit 'fe6f45c81463d2d28e11ac6083f2653e1286c5ef'

* commit 'fe6f45c81463d2d28e11ac6083f2653e1286c5ef':
  cast is floor. Use round instead.
2009-07-21 17:41:10 -07:00
Mitsuru Oshima
61324e58c5 cast is floor. Use round instead.
This fixes a few layout issues (that was due to smaller widnow size)
2009-07-21 16:42:41 -07:00
Android (Google) Code Review
bec99bffee am 5c536e91: Merge change 7840 into donut
Merge commit '5c536e9162721c460699a041959a0d67de1d20db'

* commit '5c536e9162721c460699a041959a0d67de1d20db':
  Fix issue where scaled bitmap sizes could be wrong.
2009-07-19 21:14:48 -07:00
Android (Google) Code Review
469b4c67ad am aad0fcc9: Merge change 7783 into donut
Merge commit 'aad0fcc9619eb72c18a6afff48ebc9d4011f0f54'

* commit 'aad0fcc9619eb72c18a6afff48ebc9d4011f0f54':
  Add "nodpi" density, and expose a bunch of density-related APIs.
2009-07-19 20:28:49 -07:00
Dianne Hackborn
2784ff0af8 Fix issue where scaled bitmap sizes could be wrong.
The Bitmap functions to get the scaled width/height couldn't actually
do the right thing because they didn't know the destination they would
be drawing to.  Now there are two forms of them, taking an explicit
parameter specifying the destination.
2009-07-18 17:13:29 -07:00
Dianne Hackborn
a53b828635 Add "nodpi" density, and expose a bunch of density-related APIs.
Also update the DpiTest app to use nodpi images, and try to have a mode
where it turns off compatibility though it's not quite working.
2009-07-17 16:59:08 -07:00
Android (Google) Code Review
c634fdd803 am 09a903ab: Merge change 7696 into donut
Merge commit '09a903ab5b8d940605783ae4ee591c0f090a31d1'

* commit '09a903ab5b8d940605783ae4ee591c0f090a31d1':
  add hidden Options field for native allocations
2009-07-17 15:43:14 -07:00
Mike Reed
1b22b97925 add hidden Options field for native allocations 2009-07-17 11:21:47 -04:00
Android (Google) Code Review
eabdb7c252 am 6b532800: Merge change 6478 into donut
Merge commit '6b5328006ff9e844713eb26b40621d72bee0bdd1'

* commit '6b5328006ff9e844713eb26b40621d72bee0bdd1':
  Fix ShapeDrawable.inflateTag() to accept proper dimension specs for padding
2009-07-08 10:45:52 -07:00
Phil Dubach
90cfa9df3f Fix ShapeDrawable.inflateTag() to accept proper dimension specs for padding
ShapeDrawable.inflateTag() handles the 'padding' tag with the standard
attributes android:left, etc.  The attribute values for these standard
attributes should be dimension specifications, e.g. '4dp'.
ShapeDrawable.inflateTag() was wrongly parsing the attribute values as plain
integers.
2009-07-08 09:43:49 -07:00
Brad Fitzpatrick
0f07b2c850 Lazily allocate the mBounds Rect in Drawable.
For background, see:
http://kohlerm.blogspot.com/2009/04/analyzing-memory-usage-off-your-android.html

Thanks, Markus!
2009-07-07 12:38:50 -07:00
Android (Google) Code Review
fbc7c1a784 am 9848f11f: Merge change 5826 into donut
Merge commit '9848f11fd8788b985330183aeb83cc589b8b14ae'

* commit '9848f11fd8788b985330183aeb83cc589b8b14ae':
  Fix NullPointerException in NinePatch constructor
2009-07-01 17:27:46 -07:00
Android (Google) Code Review
0901c82336 am 91c91b74: Merge change 5817 into donut
Merge commit '91c91b74df12e40c31a50ecb807ac60bed2ccb58'

* commit '91c91b74df12e40c31a50ecb807ac60bed2ccb58':
  Replace indeterminate progress animated asset with new ones
2009-07-01 16:01:40 -07:00