158 Commits

Author SHA1 Message Date
Jason Sams
25ffcdc9d7 Point Sprites 2009-08-20 16:11:03 -07:00
Romain Guy
484d57f435 Move the sky 2009-08-19 12:10:03 -07:00
Jason Sams
730ee65d4d Implement OOB destroy method that can be called from the java finalizer removing the need to explicitly destroy objects. 2009-08-18 17:07:09 -07:00
Jason Sams
7ce033d797 Cleanup of object destruction. No need to have a per-class destruction function. This was a legacy of the distant past when the classes did not have a common base. 2009-08-18 14:20:07 -07:00
Android (Google) Code Review
948ee25127 Merge change 21660 into eclair
* changes:
  Optimized Galaxy
2009-08-17 20:00:32 -07:00
Romain Guy
4f7136c659 Optimized Galaxy 2009-08-17 19:59:27 -07:00
Android (Google) Code Review
9fb956dbdc Merge change 21653 into eclair
* changes:
  Remove global IO context and integrate it into the RS context.
2009-08-17 18:40:38 -07:00
Jason Sams
bc948dedce Remove global IO context and integrate it into the RS context. 2009-08-17 18:35:48 -07:00
Android (Google) Code Review
5fe1afe9cc Merge change 21603 into eclair
* changes:
  Fix infinite recursion.
2009-08-17 15:25:23 -07:00
Dianne Hackborn
46407d831e Fix infinite recursion. 2009-08-17 15:22:29 -07:00
Jason Sams
334ea0c98f Update fountain and add writable flag to script slots. 2009-08-17 13:56:09 -07:00
Dianne Hackborn
7341d7a104 More work on wallpapers.
- Do better about figuring out when to stop them and other related window
  management.
- Fix problem where we were not redrawing the surface when the orientation
  changed.  This was the cause of the device hang.
2009-08-17 10:42:59 -07:00
Romain Guy
81e4640d18 Add Galaxy wallpaper 2009-08-16 23:22:44 -07:00
Mike Reed
e14e70a1b0 fix documentation 2009-08-14 15:34:36 -04:00
Mathias Agopian
317a6280cc Surface::GPU and Surface::HARDWARE are now deprecated; they will be set automatically if needed.
this also ripples into the window manager API by making some constant there deprecated as well.
2009-08-13 18:19:32 -07:00
Jason Sams
fbf0b9ecda Implement named slots and convert script.addType to script.setType to remove ordering restrictions. 2009-08-13 12:59:04 -07:00
Jason Sams
1b52aae4d9 Fix build break. 2009-08-12 18:50:44 -07:00
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