Merge commit '6af2552d244ff933dfd54570121db455cc7c3cda'
* commit '6af2552d244ff933dfd54570121db455cc7c3cda':
use safeUnref() since the other macro is not defined in donut
Merge commit '7299d6ad9820bbb601034542c94d6dc73cc4829d'
* commit '7299d6ad9820bbb601034542c94d6dc73cc4829d':
check for null native objects, which never happens on a real subclass (we throw in that case)
* changes:
check for null native objects, which never happens on a real subclass (we throw in that case) but can happen because we allow the callers to create the base class from java.
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.
Merge commit '11ea33471e1a14a8594f0b2cd012d86340dd3bd8'
* commit '11ea33471e1a14a8594f0b2cd012d86340dd3bd8':
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.
The function is used to rebuild any caches associated with the bitmap.
In the case of purgeable bitmaps, this call ensures that the pixels
are decoded for drawing, and therefore prefetching techniques
implemented by callers can be leveraged.
Merge commit '066e6bfd01a5ddd4748eacdc82fee5374e2af929'
* commit '066e6bfd01a5ddd4748eacdc82fee5374e2af929':
when we reset a paint, it should return to the state it was in when it was first created.
Merge commit 'a41962065a93b63e7161cffd662b564e01a9e189'
* commit 'a41962065a93b63e7161cffd662b564e01a9e189':
Modify the decoding logic in the FD case when a purgeable flag is set,
and lower the threshold of bitmap size for using ashmem().
For the decoding logic, we now go through the "non-purgeable" path if isShareable is false,
irrespective of the value of the purgeable flag.
Merge commit '2bb3ea162a58c0f1dddccdbe68b64e02456f11f9'
* commit '2bb3ea162a58c0f1dddccdbe68b64e02456f11f9':
Fix native core runtime. A messy declaration was causing a problem at boot time.
Merge commit '3e3439d5ba0cf5eda060c4991219c32af917fc5b'
* commit '3e3439d5ba0cf5eda060c4991219c32af917fc5b':
Fixes#1847219. Add a new API to load fonts from arbitrary files: Typeface.createFromFile(String/File).
Merge commit 'e5c4725666da25138193bed83831b66b9c0b2c45'
* commit 'e5c4725666da25138193bed83831b66b9c0b2c45':
pass original ptrs to JNI release functions (instead of += index to them)
Merge commit '77c9990ae0806575ae7a2750459f3e74f0bec092'
* commit '77c9990ae0806575ae7a2750459f3e74f0bec092':
Add call to (new) Canvas.freeCaches() in response to low-memory
BitmapFactory::Options now let you specify if the resulting bitmap can be
"purgeable". If so, then its decoded pixels may be purged when not actively
being drawn, freeing up that RAM. When such a bitmap is drawn, it will
automatically be re-decoded on demand. This is done by having the bitmap
keep a reference/copy of the encoded data.
Where it is a reference or a copy is controlled by the "shareable" flag in
Options. If this is true, the implementation *may* just reference the encode
data (e.g. a file descriptor) rathern than making a complete copy of it.
Currently, purgeable is not supported for generic inputstreams, but is
enabled for byte-array, file-descriptor, and assets, though for impl
reasons only file-descripts are currently enabled for "shareable", but that
may change in the future.
happens earlier than AutoDecoderCancel object is added
to the gAutoDecoderCancelMutex linked list.
Original author: raychen
Merged from: //branches/donutburger/...
Automated import of CL 144209