1071 Commits

Author SHA1 Message Date
kmccormick
4f414b7949 Doc update: fix incorrect enum
"Bug: 4980236"

Change-Id: I39f8f429574a9916c5fffc5b2e4ec4715ec48803
2013-03-28 16:14:08 -07:00
Adam Koch
e43d5714fc am 1a5bec01: Merge "Doc fix: update BitmapFactory.Options.inSampleSize javadoc Bug: 8250653" into jb-mr1-dev
* commit '1a5bec0127ca4584008a1ab9e1ce49e671f8387c':
  Doc fix: update BitmapFactory.Options.inSampleSize javadoc Bug: 8250653
2013-03-05 06:37:48 -08:00
Adam Koch
758333d70a Doc fix: update BitmapFactory.Options.inSampleSize javadoc
Bug: 8250653

Change-Id: I7187372ab3c742b9395d119a7425f60f071dbb4e
2013-02-22 11:45:17 -05:00
Scott Main
805d2e2d98 am 00f49084: Merge "docs: fix renderscript links that currently require redirect" into jb-mr1-dev
# Via Android (Google) Code Review (1) and Scott Main (1)
* commit '00f490844d89b146e5490204a5a483834950c489':
  docs: fix renderscript links that currently require redirect
2013-02-06 12:19:30 -08:00
Scott Main
b47fa1699a docs: fix renderscript links that currently require redirect
Change-Id: Ie12ff2c4be5ca22ac43dfe3a16868c7bef8e4ae8
2013-02-05 14:23:13 -08:00
Adam Powell
bb53dad63b Remove overzealous mutate() sanity check in LayerDrawable
Child drawables of a LayerDrawable should be able to mutate() as a
no-op even if they !canConstantState.

Bug 7622311

Change-Id: I32c00961310f23aaf9ad868c419cbefb9d27a1d2
2012-11-27 11:39:11 -08:00
Chet Haase
a004ff880e Merge "Use correct alpha value when a color is not set on a GradientDrawable." into jb-mr1.1-dev 2012-11-26 10:20:30 -08:00
Romain Guy
18bbcf7f68 Merge "Copy missing state in DrawableContainer" into jb-mr1.1-dev 2012-11-26 09:45:29 -08:00
Chet Haase
813680780f Use correct alpha value when a color is not set on a GradientDrawable.
A previous fix ensured that color filters would have a default (black) color to
interact with if no color was set on the GradientDrawable object. However, that fix
assumed an opaque alpha value, which is not always the case. Specifically, calling
setImageAlpha() on an ImageView with a shape drawable source (as in the bug here)
caused the alpha to be set to a translucent value, which was then ignored in the fix
above.

The fix is to account for the current alpha value of the GradientDrawable object
when setting the color used by the paint object.

Issue #7592193 ImageView.setImageAlpha() broken when colorFilter is in use

Change-Id: Ie622ffca776fdd8731ced78ce1f683ca6a51dec8
2012-11-21 11:21:13 -08:00
Romain Guy
9f8af6546d Cleanup: add PointF.toString()/equals()/hashcode()
PointF was missing these methods found in Point.

This change also properly implements equals() and hashcode() for
Point to match the PointF implementations.

Change-Id: Ic97280fb9f8c7011d8a13103c67d6e898adf00c0
2012-11-20 18:35:20 -08:00
Romain Guy
fa9b396dbc Copy missing state in DrawableContainer
The copy constructor of DrawableContainerState was not properly
copying all the state. This change adds the missing two fields
that should be copied over.

Change-Id: Ic92ba17ccf8fb3c8cbb5ead18690287da21c48a4
2012-11-20 18:32:37 -08:00
Chris Craik
fa0853e0b9 Add missing variable copies in Path copy constructor
bug:7564602

Also, clear isSimplePath flag for possible translates, since rect drawing path
doesn't support them

Change-Id: Ibb4a3e87ace0feb16bce1c6032016c5f4643f8d6
2012-11-16 16:09:33 -08:00
Raph Levien
39824f685c Fix for bug 7400445 regression in background drawable
The opacity calculation for a gradient drawable of shape must take
rounded corners into account - if the corner radius is nonzero, then the
shape is translucent rather than opaque. Previously the code always
assumed that such rectangles were fully opaque, which led to the
background (visible behind the rectangle) not getting drawn.

This patch simply checks for corner radius in addition to shape and
computes opacity as translucent in the nonzero case.

Change-Id: Iaf4d24abc6ecf49f85c82972b8f998700c83295e
2012-10-31 13:59:02 -07:00
Chet Haase
547e66531d Don't null the reference to Bitmap pixels until we're really ready
A change in the VM triggers a native memory error more aggressively than before,
showing that there's a bug in the logic of recycling bitmaps. Since the pixel
memory is allocated on the Java heap, nulling out the reference to that memory
in the Java level Bitmap object can cause that memory to get collected at any time.
Meanwhile, we may have a reference to that memory at the native level for rendering
purposes, causing an error if/when we access that memory after it has been collected
by the VM.

The fix is to avoid setting the reference to the pixels to null unless we are
not referring to it in native code. This is determined at the time we call
recycle() - we return a boolean to indicate whether the native code is still
using the memory. if not, the Java code can null out the reference and allow the
VM to collect it. Otherwise, it will get collected later when the encompassing
Bitmap object is collected.

Issue #7339156 HTML5 tests crash the app (Vellamo)

Change-Id: I3a0d6b9a6c5dd3b86cc2b0ff7719007e774b5e3c
2012-10-22 15:25:19 -07:00
Romain Guy
1b85122bd2 Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev 2012-10-16 19:05:49 -07:00
Romain Guy
713e1bb9df Add API to enable mipmaps on Bitmap
Bug #7353771

This API can be used when scaling large images down to a small size
to get nicer looking results.

Change-Id: If09087eed36077eee5355f6047a3ca67747d7d9e
2012-10-16 18:44:09 -07:00
Stephen Hines
5b4f8f90fd Convert one more bind() -> setVar().
Bug: 7318821
Change-Id: I215c70a99c81e560a73412b2263fed39a0fdae03
2012-10-16 13:19:23 -07:00
Jason Sams
e6a7886674 Fix bugs in scriptGroup.
Intrinsics were treating inputs as fields rather than varObjs.
This would generate a lot of extra work for the reflection
layers. Also we would like to deprecate this path in the future.

bug 7318821

Change-Id: I81e8c562ba05aae5d085d5c08e91e2c4877265c5
2012-10-15 15:52:22 -07:00
Tim Murray
091f7ccf9a Fix cycle detection for SGs.
bug 7318821

Change-Id: I695d7230551d8512c6c3f0c31c57f12498da7036
2012-10-12 12:07:09 -07:00
Romain Guy
86ad866283 Merge "Don't scale bitmaps to an empty size when targetDpi=0 Bug #7334217" into jb-mr1-dev 2012-10-11 15:50:17 -07:00
Romain Guy
0b68477f82 Don't scale bitmaps to an empty size when targetDpi=0
Bug #7334217

Change-Id: I8d232a835580ffbf85334e0a3580e8d8240c8570
2012-10-11 15:11:22 -07:00
Tim Murray
b2d552259e Merge "Add DAG validation for ScriptGroups." into jb-mr1-dev 2012-10-10 17:35:12 -07:00
Tim Murray
2a603897c6 Add DAG validation for ScriptGroups.
bug 7318821

Change-Id: If13cfe7a9f214ab253236bd52dd96df7b07aa14e
2012-10-10 14:21:46 -07:00
Marco Nelissen
55adc145d4 Adjust buffer position after copying
Make Bitmap.copyPixelsFromBuffer() adjust the buffer's position,
making it consistent with Bitmap.copyPixelsToBuffer().
b/6948775

Change-Id: Ie26f8050b1fb4d19cd39ee1a08b6f652a732fec3
2012-10-08 09:15:46 -07:00
Romain Guy
f7ee2a03c1 Merge "Fix rendering artifacts on tiled renderers Bug #7275145" into jb-mr1-dev 2012-10-03 18:47:35 -07:00
Romain Guy
dfab363807 Fix rendering artifacts on tiled renderers
Bug #7275145

This change fixes ViewRoot and adds extra debug information. It does
not solve the problem entirely. Another CL will.

Change-Id: I7e604ba38aad7f421769783dcbd998d6905ab2d9
2012-10-03 18:07:59 -07:00
Jason Sams
833a89c694 Merge "Fix range on blur intrinsic." into jb-mr1-dev 2012-10-03 16:02:42 -07:00
Romain Guy
41c769d9a8 Bring back Netflix progress bar
Bug #7274157

Gradients and color filters are multiplied by the paint's color so it
needs to be set to opaque black to have an effect.

Change-Id: Ib5dd1e6185f758f55b57a0f4496dfae98f1a096b
2012-10-02 16:04:05 -07:00
Jason Sams
31864d76a3 Fix range on blur intrinsic.
The intrinsic fails when the radius was 0. A blur
of radius 0 is a nop and should be disallowed. Fix the
test to allow sub-pixel radius to be selected.

bug 7273437

Change-Id: I2805674e29d557615eb7ac65c7910d4dffa28b58
2012-10-02 15:21:11 -07:00
Romain Guy
cf8675ee17 Draw stroked rectangle as meshes instead of textures
Bug #7233734

Stroked rectangles were rendered using software generated textures
which would lead to slightly misaligned results. Instead, let's use
the new convex path rendering code that will do the right thing
(and save a lot of bandwidth.)

Change-Id: Ib95ff581e56c1ecead97e4919298e6fd146ca167
2012-10-02 13:33:10 -07:00
Dianne Hackborn
2effc77c9a Merge "Update APIs to JB MR1 level 17." into jb-mr1-dev 2012-09-30 12:22:50 -07:00
Dianne Hackborn
fc4947491f Update APIs to JB MR1 level 17.
17 is current, resources are fixed, cleanup is done.

Change-Id: I6de446e209f59c5dd5fe1cde311776ab222817ea
2012-09-30 11:24:23 -07:00
Romain Guy
885d82d427 reset() should reset. Otherwise it would be called something else.
Bug #7256095

Change-Id: I610bbcaccdceaf2b5bb5f9d231283335911d4cd9
2012-09-28 19:24:37 -07:00
Tim Murray
74478f73b7 fix blend intrinsics, add tests
Bug: 7190126
Change-Id: If69213377282bf5b412508e7af974a1f8d440287
2012-09-26 16:29:08 -07:00
Jason Sams
f70bb04346 Add Blend intrinsic.
Change-Id: I6f679c910fc23fe7441e17ad66bcf5f3dd7425a0
2012-09-21 16:10:49 -07:00
Derek Sollenberger
cd77583ed3 Ensure that the decoder is thread-safe.
This prevents issues where one thread recycles the decoder while another
thread is in the process of checking the decoder's status or in the process
of decoding a region.

bug: 6880937
Change-Id: I7f755bf2149d03594e528ca79c536713b1447a55
2012-09-21 08:19:05 -04:00
Jason Sams
55db6865ef Merge "Clean up and publish the YUV to RGB intrinsic." into jb-mr1-dev 2012-09-18 18:43:52 -07:00
Jason Sams
e69e9e6b6e Clean up and publish the YUV to RGB intrinsic.
Change-Id: Iffb346a5d751f0bae123455869bda8db37d542ff
2012-09-18 18:23:15 -07:00
Romain Guy
684385ddde mutate() didn't work as advertised
Bug #7162705

Change-Id: I15b2663fa7f1c71a2a3479134b8b7f37bfcbc607
2012-09-18 16:56:11 -07:00
Romain Guy
29d0aa73a0 Merge "Compute GradientDrawable's opacity correctly" into jb-mr1-dev 2012-09-18 15:39:30 -07:00
Romain Guy
e91aa0fa64 Compute GradientDrawable's opacity correctly
The current implementation of GradientDrawable always assumes the shape needs
to be blended. This causes all windows to be considered translucent by default.
This change recomputes the opacity as needed to ensure windows are marked
opaque when they should.

Change-Id: Iaf291d889a6c5122ab00c9f5781df3e7f61547fa
2012-09-18 15:37:24 -07:00
Fabrice Di Meglio
8b3560d3e6 Merge "Fix bug #7172972 API REVIEW: android.graphics.drawable.Drawable" into jb-mr1-dev 2012-09-18 14:50:47 -07:00
Fabrice Di Meglio
f358260af4 Fix bug #7172972 API REVIEW: android.graphics.drawable.Drawable
- add @hide

Change-Id: I20dca8d7f6a58dfd1dd342135dcff912e08d4ab9
2012-09-18 13:38:53 -07:00
Jason Sams
08a81583c1 Add Kernel, Method, and field IDs
bug 7182873

Change-Id: I066a359bb04027e9376dac088560f042c496b10e
2012-09-18 12:32:10 -07:00
Ying Wang
12618a7f20 Make librs_jni depend on libRSDriver to remove circular dependency
Change-Id: Ia607f732f2f22968fd6f1793c2f252f08300357d
2012-09-16 13:31:30 -07:00
Jason Sams
80d819033d Unhide intrinsics and document API.
Change-Id: I0233245c68f9a08780213062e62cfea6cf909c13
2012-09-13 17:00:48 -07:00
Romain Guy
dd4b1fec4c Don't crash when copying a null Rect
Bug #7158068

Change-Id: I8f5f3ee12b2c4fd1fe28212b0c6de1214f2ce5f9
2012-09-12 17:28:02 -07:00
Jason Sams
3a5b801176 LUT intrinsic and CrossProcess test.
5x5 convolve and test
Gauss blur and test


Change-Id: Ic2f5d583cbdc1793ec8c8e2beea783d4ec34a57f
2012-09-08 22:16:22 -07:00
Jason Sams
4319079375 Merge "Fix doc typo." into jb-mr1-dev 2012-09-08 13:05:37 -07:00
Romain Guy
be6024d571 Merge "Fix crash in ShapeDrawable" into jb-mr1-dev 2012-09-07 18:38:03 -07:00