677 Commits

Author SHA1 Message Date
Romain Guy
82d4a3ab85 Merge "Make Drawable.mCallback a WeakReference." 2010-12-14 17:36:28 -08:00
Romain Guy
f2a47782f3 Make Drawable.mCallback a WeakReference.
Many memory leaks occur because of long lived drawables. This should
help.

Change-Id: I2e9e8dee26579ec56e8e73f08f6b1d62be7812d9
2010-12-14 17:33:00 -08:00
Patrick Dubroy
982b71bf47 Merge "Allocate bitmap backing buffers in the Java heap." 2010-12-14 16:56:07 -08:00
Patrick Dubroy
e4ac2d6b57 Allocate bitmap backing buffers in the Java heap.
Change-Id: I60f6ccff13357c1c518e9d56b02fe0171637edd1
2010-12-14 16:50:50 -08:00
Shih-wei Liao
6b32fab1db 1. Add Context to a RenderScript or RenderScriptGL instance.
This is to allow RenderScript to better interact with the Android environment.
   E.g., per-app cache.
2. Plumbing, testing.
3. Added getApplicationContext in RenderScript.java.

Change-Id: I85edeebe38825e20b2e86f4f4815689dfc332ef9
2010-12-14 11:17:20 -08:00
Jason Sams
d4b23b5444 More API updates.
Change-Id: I754dc645ac08fa25019eed8fd8b7b3c47f178ff2
2010-12-13 15:32:35 -08:00
Chet Haase
ad3ec1b9cb Merge "Add ability to reuse bitmaps when decoding PNG content" 2010-12-13 08:15:57 -08:00
Chet Haase
decc8cd41e Add ability to reuse bitmaps when decoding PNG content
Change-Id: Ic74b62c6280954ff80bcf64f3989a36c7c0b5615
2010-12-10 16:56:53 -08:00
Jason Sams
4ef6650bd0 Remove CreateFromBitmapRef and add
CopyTo(bitmap) replacement.

Change-Id: Ib73fb9f4bfe5f468eaf0f8f1bf68a93759eef00d
2010-12-10 16:03:15 -08:00
Chet Haase
37f74cad46 Add ability to reuse bitmaps when loading new content
Change-Id: Ic5f5f40ee39787403977fb372b335dc21cf07243
2010-12-09 15:07:39 -08:00
Jason Sams
5476b450e5 Allocation API update.
Change-Id: I9b4a71f9e94c7d3978f06b7971051ab4f8472503
2010-12-08 16:14:36 -08:00
Wei-Ta Chen
0e007d7ab9 Unhide inPreferQualityOverSpeed in BitmapFactory.Options.
The new field allows a developer to use a more accurate by
slightly slower IDCT method in JPEG decode. This in turns improves the
quality of the reconstructed image.

The field by default is not set and thus does not affect existing
applications.

Bug: 3238925

Related changes: https://android-git.corp.google.com/g/#change,83291 and
                 https://android-git.corp.google.com/g/#change,83294

Change-Id: I969f5c413f9b2179454aeb90e18ae8222ee583b4
2010-12-07 16:10:16 -08:00
Jason Sams
bf6ef8d78f API review cleanup.
Change-Id: Ieae7d450308b5637ed4253fe9baed3634c6ed141
2010-12-06 17:46:20 -08:00
Wei-Ta Chen
953f9094a2 Add inPreferQualityOverSpeed into BitmapFactory.Options.
The new field allows a developer to use a more accurate by
slightly slower IDCT method in JPEG decode. This in turns improves the
quality of the reconstructed image.

The field by default is not set and thus does not affect existing
applications.

Bug: 3238925
Change-Id: I93d55b7226e47a43e639325cd1a677694d6f2ee4
2010-12-06 14:24:51 -08:00
Dianne Hackborn
8c7a580b34 Some theme cleanup.
- Add new dialog themes without a title bar.
- Add new Theme.Holo.NoActionBar.DialogWhenLarge.
- Remove old Extended and Theme.Light.Holo themes.
- Reorder the public definitions to keep things nice.

Also @hide the MipmapDrawable class.

Change-Id: Ic69a56e9b28aacf441780633f37f0bc6a475d08a
2010-12-03 16:32:50 -08:00
Gilles Debunne
0bb000931b Fix in vertical measurement in text lines with different text sizes
The last span of the TextLine was defining the FontMetrics, instead of
min/maxing the different values.

Bug 3220698

Change-Id: I7394b1699a15aeee4cc38462d561faf329d3e1f6
2010-12-02 16:18:54 -08:00
Chet Haase
2970c49938 various fixes for animations and javadocs
Issues around threading of animations and AnimatorSet bugs are
fixed in this change. Unrelated fixes to javadocs in other
framework classes are also part of the change.

Change-Id: I35f7e03ffdec9143bc2eb155e8f9384798ad35b3
2010-11-23 14:05:42 -08:00
Jason Sams
add9d96332 More error checks
Change-Id: Id2b9ab7a76bbdf2ed745f5e36e552dc9b101982f
2010-11-22 16:20:16 -08:00
Alex Sakhartchouk
67f2e442a3 Support for cubemaps.
Change-Id: Iaf6087f614451a8e233b3e5bc49c834ab0ad08ee
2010-11-18 15:27:28 -08:00
Shih-wei Liao
a914f340ae Add caching support of BCC binaries.
Change-Id: I1e75bb84d88319cb6f1bbe6d907cf6e8ed546142
2010-11-18 00:03:23 -08:00
Joe Onorato
e70b375c4b Add an opacity attribute to LayerDrawable that lets you control the opacity directly instead of
collecting the values from the children-- a task that is much harder to get right than we want to
spend startup time on.

Change-Id: Idf5b1d612472c6accfdc935c6a6fadb1eb239a73
2010-11-17 21:20:08 -08:00
Jason Sams
68f0a32d10 Merge "Fix ref counting for globals when set from java code." 2010-11-16 18:30:58 -08:00
Jason Sams
6f4cf0b888 Fix ref counting for globals when set from java code.
Change-Id: I415b6ddeaab277e60233e905a6bae357cd5193eb
2010-11-16 17:37:02 -08:00
Jeff Sharkey
4bd1a3dbca Show Bitmap.Config value when unable to handle.
Part of investigating http://b/3201172.

Change-Id: I76a31c968b4c60beb079349a0722aa9a4ea5921c
2010-11-16 13:47:37 -08:00
Adam Powell
6af97e1c20 Revised assets for progress bars and indeterminate progress spinners.
Add support in ActionBar for activity-wide progress APIs.

Add ability for progress bars to set a target framerate rather than
the 5fps previously used.

Clean up some more dialog layouts using hardcoded styles rather than
theme attributes.

Change-Id: I8e88c7595e27c0b6f7829b598f2b084ac8501ae3
2010-11-12 19:06:40 -08:00
Jason Sams
7194a7bacd Merge "Document RS element and type and add validity checking to type creation." 2010-11-12 15:01:07 -08:00
Jason Sams
a1b13ed091 Document RS element and type and add validity checking to type creation.
Change-Id: Ic96c0199e27785b3eabde2c6e95ed514915328e9
2010-11-12 14:58:37 -08:00
Jason Sams
d99a7be36e Merge "More documentation." 2010-11-12 11:15:59 -08:00
Adam Powell
021aad952b First pass at styling progress bars for Holo.
Added attribute to let scale drawables size based on the intrinsic
width and height as a minimum. This helps prevent artifacts when
some 9-patches are used in situations like progress bars.

Change-Id: I168a232d3225afe9b5578a05a9b8634a1084404c
2010-11-11 14:53:29 -08:00
Chet Haase
449bb119c9 Merge "Add invalidation to Drawable when its properties change" 2010-11-11 14:04:10 -08:00
Chet Haase
9891e1fce5 Add invalidation to Drawable when its properties change
invalidateSelf() already exists on Drawable. This triggers a call to
callback listeners so that they know the drawable has been invalidated.
For example, the background drawable on View will cause the View itself
to be invalidated.

Change-Id: I45b231a7600dcf3bc139e4059b7c9940ff49f60c
2010-11-11 13:20:08 -08:00
Jason Sams
27676fe24b More documentation.
Change-Id: I423ff081edd4dab9173bc13d05850bb39839b6d3
2010-11-10 17:00:59 -08:00
Jason Sams
06d69de788 Continue error check improvements and write some docs.
Change-Id: I345b08490da21d9ee715ff1ddc80c1a816b579f4
2010-11-09 17:11:40 -08:00
Jason Sams
1c41517124 Handle user message ID 0
Pass RS runtime errors back to java.
throw exceptions for runtime errors.

Change-Id: Ifcf16cbbf9b98137971dced5076f8a5563eb016c
2010-11-08 17:19:31 -08:00
Alex Sakhartchouk
9d71e21800 Moving attrib creation to Mesh. Adding arrays as shader inputs.
Removing fixed size arrays.

Change-Id: I0213e403a2f1283dd43f21bea770aeb059561903
2010-11-08 15:10:52 -08:00
Jason Sams
afb9965fe8 Merge "More RS exceptions cleanup. Remove some dead code." 2010-11-04 18:21:45 -07:00
Jason Sams
c1d6210fb5 More RS exceptions cleanup.
Remove some dead code.

Change-Id: If97e3fdfe6de7bb28f22e1c5ee748c81cea3db93
2010-11-04 14:32:19 -07:00
Romain Guy
8ad4b47920 Merge "Fix possible rendering issue when drawing a path." 2010-11-04 12:14:37 -07:00
Romain Guy
1041aded2d Fix possible rendering issue when drawing a path.
Change-Id: I25f2e609589f0dd9294bcf7930de6398c0d7e377
2010-11-04 12:10:40 -07:00
Jason Sams
6b81399aa1 Merge "Update ScriptC constructor to remove depricated param." 2010-11-03 23:03:06 -07:00
Jason Sams
3ba02b3d2f Update ScriptC constructor to remove depricated param.
Change-Id: Id36e325834526c6b5416fd78d5cf4259d7df97e9
2010-11-03 23:01:38 -07:00
Dianne Hackborn
079e235750 Add new fade in/out feature for drawable containers.
This is used to allow list view's pressed and activated indicators
to fade in an out, though of course it can be used elsewhere as well.

There is a lot of complexity in supporting this in list view.  The
two main things that are being dealt with:

- When recycling views, we need to make sure that the view's drawable
  state doesn't get animated from an old row's state.  The recycler
  now keeps track of which position a view was last in, and if it is
  reused at a new position there is a new View/Drawable API to tell
  it to jump to its current state instead of animating.

- For the pressed indicator to fade out, we need to keep displaying it
  after it is hidden.  There are new variables and code to keep track
  of this state, and tweaks in various places to be able to remember
  the last selected position and continue updating the drawable bounds
  as needed.

Change-Id: Ic96aa1a3c05e519665abf3098892ff2cc4f0ef2f
2010-11-03 19:11:19 -07:00
Jason Sams
d5f0630034 RS Error cleanup.
Thow java exception during init if the
GL driver fails rather than native crash.

Change-Id: Ie96ef5a2ac12e64f9456545d86157c4c95179a8e
2010-11-03 14:27:11 -07:00
Jason Sams
7d5411fd3f Merge "Fix race condition in resize that was created when GetType for allocation and Types became async." 2010-11-01 16:13:55 -07:00
Jason Sams
d26297fa56 Fix race condition in resize that was created when
GetType for allocation and Types became async.

Change-Id: Ie7036f9481cececf9565d30b25be82480f176ff2
2010-11-01 16:08:59 -07:00
Chet Haase
70d4ba15b1 Performance optimizations for animations and toolkit
Change-Id: I316a48273a9cbb428a965e4b849b3e5e9e8202f1
2010-11-01 10:19:44 -07:00
Jason Sams
5585e36a41 Balls test app.
Change-Id: I842f43e37145f8112120e2bd49925f81c588c40c
2010-10-29 10:28:13 -07:00
Alex Sakhartchouk
581cc64028 Adding nvidia extension for limited npot support.
Updating a3d loading to be async.

Change-Id: I4be71d2002b9ad6ab8896d63e625f031e6b7ea6c
2010-10-27 14:10:07 -07:00
Jason Sams
64eb351cff Merge "Begin adding async allocation creation." 2010-10-26 16:16:17 -07:00
Jason Sams
31a7e42f4b Begin adding async allocation creation.
Change-Id: I5d1381699e2b334c1d824f357bd6b310a5f79be8

Implement async bitmap upload and clean up types.

Change-Id: Icbe9894e04c1319351c1cd75b0e0017855198f20
2010-10-26 13:09:17 -07:00