1676 Commits

Author SHA1 Message Date
Dan Albert
9295a1354e am e40974d9: Merge "Fix an overflow found by ASAN."
* commit 'e40974d92873462c4f1b100c7d03b3f41756c807':
  Fix an overflow found by ASAN.
2014-10-20 21:54:41 +00:00
Dan Albert
d395f79133 Fix an overflow found by ASAN.
Sometimes len is 0.

Change-Id: I031000188edc57663a5519b00cbbb751600d32f4
2014-10-20 14:45:55 -07:00
Elliott Hughes
b68fe9e5f3 am ae1b6805: Merge "Track change to private libcore data structure."
* commit 'ae1b6805a2609759186af8d7131c4750e011019a':
  Track change to private libcore data structure.
2014-10-09 18:13:54 +00:00
Elliott Hughes
d47acaeecd Track change to private libcore data structure.
Bug: 15476051
Change-Id: I4e28ecfa3a1d03c21f9bbde7f3daf79a79d96fe6
2014-10-08 16:07:33 -07:00
Neil Fuller
ee665151a4 am 0c1faf43: Merge "Switch from FloatMath -> Math and Math.hypot where possible"
* commit '0c1faf43aecadc37b78c4ad6cb669eb351d21385':
  Switch from FloatMath -> Math and Math.hypot where possible
2014-10-02 10:18:29 +00:00
Neil Fuller
0c1faf43ae Merge "Switch from FloatMath -> Math and Math.hypot where possible" 2014-10-02 10:14:19 +00:00
Andreas Gampe
152d9aae63 am 31629651: Merge "Frameworks/base: Fix more aapt issues"
* commit '316296511bf12c4e14dfb6f54731d1a515114abf':
  Frameworks/base: Fix more aapt issues
2014-10-02 07:01:55 +00:00
Andreas Gampe
b8dc7bc582 Frameworks/base: Fix more aapt issues
Change-Id: I6da7dc674e9f9e3b0886a3cfd1e3194d6b5ac948
2014-10-01 20:42:00 -07:00
Andreas Gampe
1dcc75b2db am 0ce259c2: Merge "Frameworks/base: Fix AAPT warnings"
* commit '0ce259c2f69cefd09342a95fbbd4c1a63a0af484':
  Frameworks/base: Fix AAPT warnings
2014-10-01 23:38:25 +00:00
Andreas Gampe
2412f84064 Frameworks/base: Fix AAPT warnings
Turn on -Wall -Werror. Fix warnings.

Change-Id: I287fb3c1e851c654479bcf9ea8c73bd354a6b2a1
2014-10-01 16:18:06 -07:00
Dan Albert
fe50cfd533 am c46dbe8a: Merge "Use std::sort instead of qsort_r wrapper."
* commit 'c46dbe8ac4748a0084b026524ad9e5ac44fb9fde':
  Use std::sort instead of qsort_r wrapper.
2014-10-01 20:34:15 +00:00
Dan Albert
0de19adc80 Use std::sort instead of qsort_r wrapper.
The HAVE_(BSD|GNU)_QSORT_R in AndroidConfig.h has never worked, and we
should just be using something standard anyway.

Change-Id: I784d6212f6c890a11c4af2f83d1ce2d279708652
2014-10-01 11:34:17 -07:00
Neil Fuller
33253a4baa Switch from FloatMath -> Math and Math.hypot where possible
The motivation is an API change: FloatMath is going to be
deprecated and/or removed. Performance is not the goal of
this change.

That said...

Math is faster than FloatMath with AOT compilation.

While making the change, occurances of:

{Float}Math.sqrt(x * x + y * y) and
{Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2))

have been replaced with:

{(float)} Math.hypot(x, y)

Right now there is no runtime intrinsic for hypot so is not faster
in all cases for AOT compilation:

Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with
AOT, but all other combinations of FloatMath, use of pow() etc.
are slower than hypot().

hypot() has the advantage of being self documenting and
could be optimized in future. None of the behavior differences
around NaN and rounding appear to be important for the cases
looked at: they all assume results and arguments are in range
and usually the results are cast to float.

Different implementations measured on hammerhead / L:

AOT compiled:

[FloatMath.hypot(x, y)]
benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials

[FloatMath.sqrt(x*x + y*y)]
benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials

[FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))]
benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials

[(float) Math.hypot(x, y)]
benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials

[(float) Math.sqrt(x*x + y*y)]
benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials

[(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))]
benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials

Interpreter:

benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials
benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials
benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials
benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I06c91f682095e627cb547d60d936ef87941be692
2014-10-01 14:04:15 +01:00
Dan Albert
1a4527ce94 am 799812cd: Merge "Clean up makefile cruft."
* commit '799812cd6f7f9aa4a87d81dafd273d51ac5ba992':
  Clean up makefile cruft.
2014-09-19 22:14:42 +00:00
Dan Albert
88ba339aef Clean up makefile cruft.
The build system already takes care of all these things.

Change-Id: Idef80b554e07cef5e5ed2adf1b5740a76f13ef6d
2014-09-11 16:21:19 -07:00
Dan Albert
1d99636fcc am 8085477f: Merge "Don\'t check for null references."
* commit '8085477fb98eab36bbc8c3e9add76f398235b469':
  Don't check for null references.
2014-09-09 16:35:02 +00:00
Dan Albert
8085477fb9 Merge "Don't check for null references." 2014-09-09 16:25:41 +00:00
Dan Albert
6c585756b4 am 2ffa4aab: Merge "Use char16_t for char things."
* commit '2ffa4aabd76353a907ee89a3e0c6f1961237f257':
  Use char16_t for char things.
2014-09-09 04:37:42 +00:00
Dan Albert
2ffa4aabd7 Merge "Use char16_t for char things." 2014-09-09 04:30:35 +00:00
Dan Albert
de86cf1362 am 5a6934c0: Merge "Don\'t pollute the namespace for two uses."
* commit '5a6934c07946743e622df52ba1155d97129b37f0':
  Don't pollute the namespace for two uses.
2014-09-09 04:23:57 +00:00
Dan Albert
1c6c7573e9 Don't pollute the namespace for two uses.
Clang complains about ambiguity between std::hash and ::hash (locally
defined). There's no need to pull in the whole namespace for two uses of
std::map anyway.

Change-Id: Icbaa7ebbaad05999988784ad34662c721fb12b29
2014-09-08 18:44:12 -07:00
Dan Albert
a8995adc2b Don't check for null references.
The address of a reference will never be null in well formed C++ code.
The function returning the value being checked simply returns a
dereferenced pointer (which is just going to segfault if it is null!).

Change-Id: I3a4eb6adfc003c63ebf21b81d46088d52154d99d
2014-09-08 18:34:29 -07:00
Dan Albert
f348c15ecf Use char16_t for char things.
When compiling in C++ mode, the compiler will complain about conversions
from uint16_t to char16_t. Be consistent in using char16_t for strings.

Change-Id: I052b6176ced635162920b31560052d9a64f92764
2014-09-08 18:30:08 -07:00
Brian Carlstrom
18a7b459f1 am 7c8318c0: Merge "PackageInfo is a class, not a struct"
* commit '7c8318c0e85540739afba3e8c0f922176bc299cd':
  PackageInfo is a class, not a struct
2014-08-17 23:55:44 +00:00
Brian Carlstrom
4d4e450a39 PackageInfo is a class, not a struct
(cherry picked from commit 646d1b8ea801d92b04ead6cbae2899d8256ec3ff)

Change-Id: Id9ddc520fbfc4787c3b267df9a35a45e8cc52d65
2014-08-17 16:10:48 -07:00
Tim Murray
638a2b2dac am 8224edb9: Merge "Update makefile for clang host build."
* commit '8224edb94f6421a2d910362c56940dcf991847e6':
  Update makefile for clang host build.
2014-07-24 21:04:20 +00:00
Tim Murray
132ed0f2b4 Update makefile for clang host build.
bug 16172793

Change-Id: If7484c5dbcccce7d925bec97bff0a3e4c30e9434
2014-07-17 16:37:42 -07:00
Deepanshu Gupta
39488dc3d4 am 7b97e426: Merge "Optimize Blend composites."
* commit '7b97e426bd77b22a64b49112ce2455a51bac0b5b':
  Optimize Blend composites.
2014-07-15 20:10:40 +00:00
Deepanshu Gupta
aaef3efa22 am e147445a: Merge "Add BlendComposite.java"
* commit 'e147445a5e10b3e0fd01c7792e560ad677cd77ab':
  Add BlendComposite.java
2014-07-15 20:10:36 +00:00
Deepanshu Gupta
9ce0746104 Optimize Blend composites.
Removed redundant array allocations to improve performance for various
blending modes.

Change-Id: Iaba1d6ff3ad03eebdc859c599b610cc593370438
2014-07-07 15:16:36 -07:00
Deepanshu Gupta
882e087591 Add BlendComposite.java
The class is adapted from a demo tool for Blending Modes written by
Romain Guy (romainguy@android.com). The tool is available at
http://www.curious-creature.org/2006/09/20/new-blendings-modes-for-java2d/

Change-Id: I8f7c7ca08d3078106056764a4e2f1ce95d990137
2014-07-07 10:35:15 -07:00
Brian Carlstrom
f8077cf2d7 am 8e21e215: Merge "Switch from core to core-libart"
* commit '8e21e21550eddce01ad06fdf05b342993bf44c6a':
  Switch from core to core-libart
2014-06-19 02:03:35 +00:00
Brian Carlstrom
dbcae5ceb7 Switch from core to core-libart
Bug: 14298175
Change-Id: I89db18bf3d88f9511cb2ad943c64ecdbaf09d96f
2014-06-18 17:43:27 -07:00
Deepanshu Gupta
b78cc30920 Add missing dependency in layoutlib build file [DO NOT MERGE]
Add missing dependency on built_ext_data

Change-Id: I4e7cca7f6cbc7f5b7416ac9b85a9aec01e61ecd4
(cherry picked from commit e345507ca4b7b83c6e0446788f4404eb697f945b)
2014-06-05 18:32:14 -07:00
Adam Lesinski
7e547e0d72 Merge "Add --pseudo-localize option to generate resources for pseudolocales." 2014-06-03 20:11:13 +00:00
Igor Viarheichyk
a191d0464f Add --pseudo-localize option to generate resources for pseudolocales.
Update help output with new option, remove mention of obsolete zz_ZZ
pseudolocale.

Change-Id: Ie2cfc8d11ef6a57e2b9a2333514a7340a3a8c075
2014-06-03 12:07:50 -07:00
Elliott Hughes
b593ad6068 am f1f28d1d: Merge "Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice."
* commit 'f1f28d1d86aea6dd1419e94aadf051e433914680':
  Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
2014-05-06 02:27:44 +00:00
Igor Viarheichyk
47843df11f Skip resource files for locales en-XA and ar-XB
during packaging if pseudolocalization was done automatically.
This prevents attemts to add same resource twice.

Change-Id: I51e17f961ac44047bf466ce4aa0d4d17f4ded0d6
2014-05-05 18:13:41 -07:00
Elliott Hughes
6a6979ad17 am 86315c45: Merge "Fixes issue causing pseudolocalization of strings in non-translatable resource files."
* commit '86315c452b955bf0b874f45c1a2e15aedda91a52':
  Fixes issue causing pseudolocalization of strings in non-translatable resource files.
2014-04-30 21:33:06 +00:00
Igor Viarheichyk
84410b054c Fixes issue causing pseudolocalization of strings
in non-translatable resource files.

Change-Id: Ic8e5effc86226d5be00561ac71bab7695ef90376
2014-04-30 11:56:42 -07:00
Bill Yi
293513a59d Merge commit '0b62467b142b61ee1e449ba958ba37dfd961ef56' into HEAD 2014-04-29 16:07:29 -07:00
Deepanshu Gupta
e2b67777ad Add missing ICU_Delegate methods.
Update the ICU_Delegate to add methods originally added in
I5de58be7e8a701f2c40182ea54bceff85ec1aad2

Change-Id: I536834fe76cbc7dae05580182fee1bea956e3e77
2014-04-21 14:33:33 -07:00
Elliott Hughes
0a1eed394f Fix warning introduced by recent psuedolocalizer change.
Change-Id: I577caf6ca4261b3d044b18bc8c5915012168031d
2014-04-18 16:15:27 -07:00
Anton Krumin
a2ef5c0d4f Pseudolocalizer improvements.
Fixes accented pseudolocalization and adds RTL pseudolocale.

This change contains following modifications in the pseudolocalization logic:
1) zz_ZZ pseudolocale was removed;
2) en_XA pseudolocale was added for pseudo-accented;
3) ar_XB pseudolocale was added for pseudo-rtl;
4) Pseudo RTL localization functionality was implemented;
5) Text expansion functionality was implemented;
6) Text bracketing was implemented;
7) Couple of issues of previous implementation were fixed.

Change-Id: I9f7f27bed717e39e82717d15c398decffc8bec3c
Signed-off-by: Anton Krumin <antkrumin@google.com>
2014-04-09 16:59:48 -07:00
Adam Lesinski
e119b22146 Reduce warning verbosity in aapt
- Attributed source of problems to the correct file.
- Only verify string localizations against valid
  locales.
Bug:13140015
Change-Id: I9dabc5efa0510649caee8af0c8ebb803d6f48269
2014-03-24 10:50:34 -07:00
Narayan Kamath
bd5e61fdee am c0232642: am 629daddd: Merge "Fix layoutlib build."
* commit 'c0232642b74517aa2717673f0811ba65c620f491':
  Fix layoutlib build.
2014-03-14 14:22:40 +00:00
Narayan Kamath
c73991bda0 Fix layoutlib build.
Was using private data structures from libcore.

Change-Id: I5bd43190081891659e18b5c871686e6078efcc81
2014-03-14 14:10:30 +00:00
Deepanshu Gupta
e5ad073d2e resolved conflicts for merge of c76345a3 to klp-dev-plus-aosp
Change-Id: I54e14e1c6cd53cd10b38b34cf31989a2aa487b83
2014-03-12 20:40:01 -07:00
Deepanshu Gupta
792f38ddd9 Merge "Fix the delegate method signatures in LayoutLib" 2014-03-11 21:22:40 +00:00
Narayan Kamath
a742ca4017 am bbf82665: am 6e2fb587: Merge "LP64: Make 9 patches architecture agnostic."
* commit 'bbf826659e8e5d0be683b2459207c495303d53b6':
  LP64: Make 9 patches architecture agnostic.
2014-03-11 18:52:07 +00:00