69 Commits

Author SHA1 Message Date
Mike Reed
36ad54acef force purgeability for assets
Change-Id: I1067cfb91846a05290ed26ce9a62eb82d3170719
http://b/issue?id=1860187
2010-03-10 13:11:47 -05:00
Chia-chi Yeh
aa86859b10 YuvImage: jpeg_set_quality() should be called after jpeg_set_defaults().
Change-Id: I6579ad9241dd5ee6aabf54e1a1128d17b4f6b3e6
2010-03-10 17:08:58 +08:00
Ficus Kirkpatrick
1a9c27c312 Add a LOG_TAG for android.graphics.Graphics JNI.
It occasionally logs when it fails an allocation but wasn't
defining one before.

Change-Id: Ifc41addc870eb126616ad44465638423d51568d9
2010-03-09 10:00:31 -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
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
Mathias Agopian
8f2423e8f3 get rid off the YUV formats at the libui layer 2010-02-16 17:33:37 -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
Jack Palevich
a6276fdd42 A library for encoding and decoding ETC1 textures.
The ETC1 compressed texture format is commonly
supported by OpenGL ES 2.0-capable devices.
2009-12-31 13:31:04 +08:00
Mike Reed
31a69fdbe1 throw if we have a null typeface native instance (so we don't crash in native code)
we may still have to native-destroy a Typeface with a null ref, so check for that
2009-12-17 12:18:44 -05:00
Mike Reed
58d30b6907 am 1864d01f: Merge change Iae849da2 into eclair
Merge commit '1864d01f2be0e82da7d8844fa91bee8880282041' into eclair-mr2

* commit '1864d01f2be0e82da7d8844fa91bee8880282041':
  add table maskfilter
2009-10-30 14:13:44 -07:00
Mike Reed
0e1e623011 add table maskfilter
hidden for now, since it need only be seen by Launcher2

http://b/issue?id=2210685
2009-10-30 08:11:58 -04:00
Mike Reed
c04851fd0a add boundary patch 2009-10-28 15:18:41 -04:00
Mike Reed
a78b0a2d9e add (hidden) setHasAlpha() to allow clients like the view's cache to hint that a bitmap is opaque.
Knowing that a 32bit bitmap is opaque is a performance boost for some blits.
2009-10-07 11:38:05 -07:00
Dianne Hackborn
afa78967b8 Hack to fix issue #2125365: Sports Trivia compatability with Eclair
Adds a mechanism to tell Paint the scaling factor its target
canvas will have, for it to compute font metrics based on the
correct font size.  Only TextView uses this, but that is enough
for the large majority of apps.

Change-Id: I6cacaa0dd26d40ee3ad959bed0028678d6e9016e
2009-09-28 17:33:54 -07:00
Android (Google) Code Review
9251c34459 Merge change 26851 into eclair
* changes:
  use new setDither on ImageRef to retain that setting for purgeable images
2009-09-24 12:38:23 -04:00
Mike Reed
17154417e8 use new setDither on ImageRef to retain that setting for purgeable images 2009-09-24 12:35:27 -04:00
Dianne Hackborn
de0dfb7b65 Fix issue #2125720 Weather Forecast Widget - graphics do not scale
I forgot to add the new density field to the Bitmaps' parcelable data.

Change-Id: I77cf3e93e356297e0caed6fc71b62b5cd8f79124
2009-09-23 14:26:02 -07:00
Dianne Hackborn
8cae124af2 Various cleanup around resources and nine-patches.
Remove the stuff that doesn't use preloaded drawables when in
compatibility mode, since this works fine ever since we were able
to deal with drawables in a different density than the canvas.

Change the snapshot function on View to return a snapshot at
the same size that will actually be drawn on screen (when in
compatibility mode), to be able to show scaling artifacts and
all.

This change was original an attempt to fix issue #2101917: Text
field edges appears to be improperly rounded.  That turns out to
probably be something deeper in the graphics system, but also
included here is the debugging code I did to try to track down the
problem to make it easy to turn on again later.

Change-Id: I34bfca629639c7ff103f3989d88874112ef778d9
2009-09-11 13:31:45 -07:00
Mike Reed
211db4a287 change default for dither to true 2009-09-11 14:40:15 -04:00
Jack Palevich
106006cbde Change util_texSubImage2D to call glCompressedTexImage2D correctly.
Previously we had been setting the imageSize parameter to 0, which was
incorrect. According to the OpenGL ES spec for glCompressedTexImage2D
this parameter should be the size in bytes of the compressed data.
2009-08-31 17:42:50 -07:00
Mike Reed
dbade9d6a0 expose runtime changes to gamma 2009-08-25 13:47:47 -04:00
Mike Reed
a31ce104f5 am 6af2552d: use safeUnref() since the other macro is not defined in donut
Merge commit '6af2552d244ff933dfd54570121db455cc7c3cda'

* commit '6af2552d244ff933dfd54570121db455cc7c3cda':
  use safeUnref() since the other macro is not defined in donut
2009-07-30 16:06:31 -07:00
Android (Google) Code Review
93efb724ac am 7299d6ad: Merge change 9159 into donut
Merge commit '7299d6ad9820bbb601034542c94d6dc73cc4829d'

* commit '7299d6ad9820bbb601034542c94d6dc73cc4829d':
  check for null native objects, which never happens on a real subclass (we throw in that case)
2009-07-30 16:06:21 -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
Mike Reed
6af2552d24 use safeUnref() since the other macro is not defined in donut 2009-07-30 11:46:47 -04:00
Android (Google) Code Review
7299d6ad98 Merge change 9159 into donut
* 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.
2009-07-30 08:16:09 -07:00
Mike Reed
a04e555dc9 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.
2009-07-30 11:05:57 -04: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
ead1457616 Merge change 8639
* changes:
  explicitly set the hinting level for android apps (to match the old default)
2009-07-27 09:57:35 -07:00
Mike Reed
3d63e0119d explicitly set the hinting level for android apps (to match the old default) 2009-07-27 09:50:31 -04: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
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
Mike Reed
47c0d4eaa9 remove deprecated use of porterduff 2009-06-22 22:53:52 -04:00
Android (Google) Code Review
ce1311a3a0 am 766d7236: Merge change 4737 into donut
Merge commit '766d7236c84f636b816d71189e309e67db1f593a'

* commit '766d7236c84f636b816d71189e309e67db1f593a':
  Add prepareToDraw() to Bitmap for fixing http://b/issue?id=1907995.
2009-06-22 03:50:23 -07:00
Wei-Ta Chen
8cdcb12752 Add prepareToDraw() to Bitmap for fixing http://b/issue?id=1907995.
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.
2009-06-22 18:01:47 +08:00
Android (Google) Code Review
885f75187c am 066e6bfd: Merge change 4792 into donut
Merge commit '066e6bfd01a5ddd4748eacdc82fee5374e2af929'

* commit '066e6bfd01a5ddd4748eacdc82fee5374e2af929':
  when we reset a paint, it should return to the state it was in when it was first created.
2009-06-19 14:49:44 -07:00
Mike Reed
290f5baf91 when we reset a paint, it should return to the state it was in when it was first created.
for java, this means setting its text-encoding to UTF16...
2009-06-19 15:13:39 -04:00
Android (Google) Code Review
7d53a6bf4d am a4196206: Merge change 3074 into donut
Merge commit 'a41962065a93b63e7161cffd662b564e01a9e189'

* commit 'a41962065a93b63e7161cffd662b564e01a9e189':
  Modify the decoding logic in the FD case when a purgeable flag is set,
2009-06-04 22:42:01 -07:00
Wei-Ta Chen
2a2c5cd741 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.
2009-06-03 14:27:52 -07:00
Mathias Agopian
0795272aa2 move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00
Android (Google) Code Review
7118a2cf54 am 807f23b: Merge change 1057 into donut
Merge commit '807f23b2d8c7148cf6fc95bb88cfc2f78e4be66a'

* commit '807f23b2d8c7148cf6fc95bb88cfc2f78e4be66a':
  * Add regoin scaling for transparent support
2009-05-12 22:39:07 -07:00
Romain Guy
15203958fd am 2bb3ea1: Fix native core runtime. A messy declaration was causing a p
Merge commit '2bb3ea162a58c0f1dddccdbe68b64e02456f11f9'

* commit '2bb3ea162a58c0f1dddccdbe68b64e02456f11f9':
  Fix native core runtime. A messy declaration was causing a problem at boot time.
2009-05-12 22:39:06 -07:00
Android (Google) Code Review
807f23b2d8 Merge change 1057 into donut
* changes:
  * Add regoin scaling for transparent support
2009-05-12 15:45:25 -07:00
Romain Guy
2bb3ea162a Fix native core runtime. A messy declaration was causing a problem at boot time. 2009-05-12 15:43:26 -07:00
Mitsuru Oshima
b10f138e12 * Add regoin scaling for transparent support 2009-05-12 15:40:07 -07:00
Android (Google) Code Review
bae1ca315b am 3e3439d: Merge change 1478 into donut
Merge commit '3e3439d5ba0cf5eda060c4991219c32af917fc5b'

* commit '3e3439d5ba0cf5eda060c4991219c32af917fc5b':
  Fixes #1847219. Add a new API to load fonts from arbitrary files: Typeface.createFromFile(String/File).
2009-05-12 13:34:18 -07:00
Romain Guy
a87a132ebf Fixes #1847219. Add a new API to load fonts from arbitrary files: Typeface.createFromFile(String/File). 2009-05-12 13:22:18 -07:00