261 Commits

Author SHA1 Message Date
Brad Fitzpatrick
02d9102b3b Document Bitmap.createScaledBitmap
Change-Id: Ife6a42bc08d17c56274e78a1f5d2c100c2fe4dc8
2010-10-04 10:52:18 -07:00
Brad Fitzpatrick
83d522290e Doc fix: duplicate word 'of'
Change-Id: I45a4ca443becc2f2cf02cbca2bd61ef2ee590b5c
2010-10-03 21:07:21 -07:00
Wei-Ta Chen
f7681f8491 Do not merge.
Fix 3052285 by not publishing the BitmapRegionDecoder API until the honeycomb release.

Bug: 3052285
Change-Id: Ie339e414c1a5581e1d38684621e0e97162616977
2010-10-01 12:16:38 -07:00
Sonia Serafimova
d45a33554c Prevent unhandled exception in NinePatchDrawable
Added null check in computeBitmapSize() to avoid unhandled
exception "java.lang.NullPointerException" at
android.graphics.Rect.<init>(Rect.java:72).

This problem was discovered in the wild.

Change-Id: I9d40629a052f1390e1811288af6209d8cc3f679b
2010-09-26 09:07:02 -07:00
Wei-Ta Chen
6b849e2123 Unhide BitmapRegionDecoder.
1. Rename LargeBitmap to BitmapRegionDecoder
2. Move the instantiations of BitmapRegionDecoder out of BitmapFactory.
3. Remove the use of MemoryFile in BitmapRegionDecoder, since MemoryFile's API had been modified in master. Otherwise, the change will break the master build.
4. Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions.

Most of the modifications, except for (2) and (3), were reviewed in https://android-git.corp.google.com/g/#change,64716 .
However, that change broke the master build due to (3) and was reverted eventually.
So, instead of withdrawing this change and waiting for that change to be checked in again, I merge the two changes into one.

Change-Id: I2202c0fbbbd6d6676bbd9637e690023ea4099c40
2010-09-23 13:56:52 +08:00
Joseph Wen
2dcfbefbbe Fix bug in JNI BitmapFactory
In nativeCreateLargeBitmapFromFileDescriptor() if the file descriptor
can not be rewinded isShareable should be set to false.

Change-Id: I7dd545c9d52d21c226e11b8921e35a1d9bba9515
2010-09-10 17:24:15 +08:00
Wei-Ta Chen
340ce75b44 Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API."
This reverts commit 50ba3d2c09a9131f3578d271adf2bc8258ca1742.
2010-09-08 10:44:21 +08:00
Wei-Ta Chen
50ba3d2c09 Rename LargeBitmap to BitmapRegionDecoder for having a better API.
Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because
BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions.

Change-Id: I3e60c7fe4abd0289e1384e69a08fd20fe6fb0e10
2010-09-07 21:02:13 +08:00
Chih-Chung Chang
601ede9aa3 Revert "Don't recycle native bitmap after the finalizer is called."
Bitmap should not be accessed from multiple threads.

This reverts commit 966803ab81f8e9bfefa502fcb533de023825a389.
2010-08-22 00:23:18 +08:00
Romain Guy
f92a0a6d4e Load bitmaps in the correct format.
Bug #2936873

Change-Id: Ide93ffd8227cea6c610dde625163ccffb4590e90
2010-08-20 15:43:52 -07:00
Chih-Chung Chang
966803ab81 Don't recycle native bitmap after the finalizer is called.
If an object A's finalizer calls Bitmap B's recycle() when B's
finalizer is already called, we will have trouble because the
native bitmap is already freed in the finalizer.

Change-Id: Ic0be8ed75fb3aacee9ce6e3d9908178a55151eb9
2010-08-20 17:10:49 +08:00
Gilles Debunne
d018a0ce72 Merge "Text selection without trackball." into gingerbread 2010-08-19 17:59:08 -07:00
Gilles Debunne
b0d6ba1ec4 Text selection without trackball.
Backported from HC.

Squashed commit of the following:

commit af214a595c7a9fdd11a2dc384f7d4665abf751c0
    Fixes in TextView's selection.

commit eb9fd59ebe6500a66c2003d46b5802299970ae8d
    TextView with Selection Contextual Mode

commit 4c4c338ef355b369ce4b57d6c6fba7ee8f9dddf4
    Cosmetic changes around TextView.

commit d4b4b054e87480d984ad18766f5e76553e3080d8
    Double and one and a half tap removed from TextView.

commit 897c2847ba1fca8ef01eadadd1bc3de007af3ee5
    Selection handlers in TextView

commit 832be74a5394649e28927484d9a86c6d53b430e7
    New cursor controller in TextViews.

Change-Id: I01cc64736e2abea605317ee53907a1713617fc17
2010-08-19 15:55:02 -07:00
Romain Guy
288471d8a5 DO NOT MERGE. Load assets in place instead of deferring until draw.
Before this change, all framework assets would be decoded at drawing time
outside of zygote. This was forcing all apps to re-decode the assets and
zygote to keep an in-memory copy of each asset. This behavior is now
opt-in by setting the inPurgeable flag on BitmapFactory.Options.

Change-Id: Ief823139163d8071b8ee1267746622faf52eb8ec
2010-08-19 15:02:31 -07:00
Joseph Wen
f1f48bc7f2 Do JPEG tile-based decoding.
Change-Id: I5c1b4ac3c02eb4350ef0ba9a7877b22cfd730cfb
2010-08-17 14:34:02 +08:00
Scott Main
5352d2378d am 38137d7a: Merge "docs: lots of additions to the resources docs new drawable resources add <merge> and <include> to layout resource update drawable class descriptioons to point to resources guide add ID resource type" into froyo
Merge commit '38137d7a27b037611c70a9d900aa53b4c15563bf' into gingerbread

* commit '38137d7a27b037611c70a9d900aa53b4c15563bf':
  docs: lots of additions to the resources docs
2010-07-15 11:20:32 -07:00
Mathias Agopian
058d0390a4 Remove the YV16 format for simplicity's sake.
Change-Id: Iee03d100933ba0c67b13d51e0435be3b4cd953cf
2010-07-14 15:12:05 -07:00
Scott Main
dfe5c20440 docs: lots of additions to the resources docs
new drawable resources
add <merge> and <include> to layout resource
update drawable class descriptioons to point to resources guide
add ID resource type

Change-Id: I733eec50bb2671f28c9e6dd7dec14eb6586f5193
2010-06-21 15:19:23 -07:00
The Android Open Source Project
5849606df7 merge from open-source master
Change-Id: I6a7542e696e69bc8788f3b3b77fcec50512ba81c
2010-03-29 11:04:30 -07:00
David Hoover
5f3445dc60 Fix typos in comment.
Change-Id: Ia2a9ea0802bcc5773bb4fd52d7e07f9492242bfd
2010-03-28 08:49:49 -07:00
The Android Open Source Project
8e10a7b7c8 merge from open-source master
Change-Id: I4d8f34986fd9e16ead8a22909263069dbb819d3e
2010-03-25 16:39:32 -07:00
Mike Reed
54900e8c05 update dox that we ignore the exact parameter on computeBounds
Change-Id: I6051210ea2a73b4d1c6cd631a285209ab130b4e5
2010-03-25 14:02:40 -04:00
viral.vkm
1be46d7920 setCornerRadii should be called when either of corners radius is specified
as 0dp and thus while checking for condition, it should be ORed and not ANDed.

It solves Android Issue: 939
http://code.google.com/p/android/issues/detail?id=939

Change-Id: Ic18fae769480972f763f634e7462c6ed3853220b
2010-03-25 17:50:57 +05:30
Romain Guy
a8551b1efa Fix the build.
Change-Id: I0caef1fd522d231d803e0fd9e0b8fdf3272db168
2010-03-10 22:11:50 -08:00
Mike Reed
76d1e01d5e hidden api sameAs() to compare the pixels of 2 bitmaps for equality 2010-03-08 08:53:23 -05:00
Jason Sams
8a64743f37 Add support for linking to a skia bitmap rather than always copying the data from the bitmap. 2010-03-01 15:31:04 -08:00
Jason Sams
c2908e60c9 Support defered generation of mipmaps. With this change we support mipmap generation when the texture is uploaded to GL without requiring RS to retain the full chain. 2010-02-23 17:44:28 -08:00
Mathias Agopian
a696f5d667 Add ImageFormat.java and move the Camera/YUV constants from PixelFormat to it.
PixelFormat's corresponding constansts are now deprecated.
2010-02-18 15:32:47 -08:00
Mike Reed
35d2621b3a Merge "update dox" 2010-02-18 06:11:39 -08:00
Jeff Sharkey
2b95c24138 Added more @RemotableViewMethod methods, mutate ImageView.
Catch some View methods missed during the first pass of
marking with @RemotableViewMethod annotation.  Also adds new
ImageView.setColorFilter(int) to match the android:tint XML
attribute.

When ImageView touches ColorFilter or alpha, mutate the
underlying Drawable. Fix NPE in StateListDrawable.mutate().
2010-02-17 15:03:32 -08:00
Mike Reed
7df951595f update dox 2010-02-17 14:03:59 -05:00
The Android Open Source Project
3941411a21 am 1e90ab54: merge from open-source master
Merge commit '1e90ab542d675616e9370ab7e5add99d7af12587'

* commit '1e90ab542d675616e9370ab7e5add99d7af12587':
  Fixs the incorrect message for SecurityException
  Default RotateDrawable's pivot set to (50%, 50%)
2010-02-11 11:20:40 -08:00
The Android Open Source Project
1e90ab542d merge from open-source master 2010-02-11 10:03:02 -08:00
Wei-Ta Chen
d2391faa5d Modify the API of YuvImage, so that callers do not need to deal with
the yuv format when specifying a rectangle region.

Bug: 2285598
2010-02-10 23:15:37 +08:00
Jason Sams
704ff64b09 Preview seperating RenderScript into RenderScript and RenderScriptGL 2010-02-09 16:05:07 -08:00
Cyril Mottier
b81b1447d2 Default RotateDrawable's pivot set to (50%, 50%)
In order to define the pivot in an XML-instanciated RotateDrawable, android:pivotX
and android:pivotY had to be set in your XML. Forgetting to set those attributes
ended up in a NullPointerException (tv = null) that were caught by the Resources.getDrawable()
method (caught as an Exception). As a result a not-very-accurate message was logged:
"Resource not found ...". Defining a default pivot value seems like a great fix.
Some other fixes would be to modify the documentation or notify the user with a better
explanation than "Resource not found ...".
2010-02-06 00:36:40 +01:00
Jason Sams
57405b93f1 Merge "Hide field packer." 2010-02-02 15:46:50 -08:00
Jason Sams
42d6c9e1e7 Hide field packer. 2010-02-02 15:45:58 -08:00
Jason Sams
2a594b1a24 Merge "Implement holders for Matrix and Vector data." 2010-02-02 15:28:03 -08:00
Jason Sams
25430d0734 Implement holders for Matrix and Vector data. 2010-02-02 15:26:40 -08:00
Wei-Ta Chen
c58ffe8253 Unhide YuvImage, which supports compressing a YUV rectangle region to JPEG.
Bug: 2285598
2010-01-28 15:48:54 +08:00
Jason Sams
5dbfe93b3f Fix some minor bugs with GL state setup that were exposed by Droids driver. 2010-01-27 14:41:43 -08:00
Wei-Ta Chen
bca2d613e0 Add a Java API that converts yuv data to a jpeg.
The compression is done in the native layer via calling libjpeg.

Bug: 2285598
2010-01-27 11:41:34 +08:00
Mike Reed
ab4a0c164b add API to change default config on image decoders.
May be called by the browser to get high-quality images when running in a 32bit window
2010-01-26 10:18:32 -05:00
Mike Reed
6dc9232c1c am a66baccc: Merge "Do not merge" into eclair
Merge commit 'a66baccc8fa9f6fa5f1630845e3c6370cb3418eb' into eclair-plus-aosp

* commit 'a66baccc8fa9f6fa5f1630845e3c6370cb3418eb':
  Do not merge
2010-01-20 18:35:24 -08:00
Mike Reed
12bcbdc681 Do not merge
port stretchy from master
2010-01-20 16:27:36 -05:00
Jason Sams
ea87e96959 Implement type generation for user uniforms in vertex shader. 2010-01-12 12:12:28 -08:00
Jason Sams
6d7b907ab5 Merge "Support npot on es 2.0 HW." 2010-01-06 17:25:32 -08:00
Jason Sams
74e02ef200 Support npot on es 2.0 HW. 2010-01-06 15:10:29 -08:00
Cary Clark
9027696bf0 am 9e5f3ec9: am e3bbaf6c: Merge "set nine patch padding initially to an empty rectangle" into eclair-mr2
Merge commit '9e5f3ec97d468702aa3f3a59e94009e807715189'

* commit '9e5f3ec97d468702aa3f3a59e94009e807715189':
  set nine patch padding initially to an empty rectangle
2010-01-06 14:05:58 -08:00