| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
issue: 15516788
Change-Id: I53a312addbb7ce17ecf02b2f14b9e991eab42be9
|
| |
| |
| |
| |
| |
| | |
The compiler warning distracts me often.
Change-Id: Ia96e6c82ce1c0f1ae58f7faadbf8769b36d1f810
|
| |
| |
| |
| | |
Change-Id: Ib8eea6153eaf7e0e93e54c69fe59e63e98a409a6
|
| |
| |
| |
| | |
Change-Id: Ib545a143f1959b6104adbc9d594dd626851d90b3
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
wallpaper with built in rotation
* commit 'c3db8011d7f7a5bcb0a9e5ae2d20022c6e88d8f9':
Fixed crash when setting wallpaper with built in rotation
|
| |/
| |
| |
| |
| |
| |
| |
| | |
If an image had a built in rotation, a crash could occur,
when setting it. An example was a panorama image which had
a rotation of 90 degrees
Change-Id: Iede8226dac3a40f08d39a69162eb388e6aba97ec
Bug: 13507421
|
|\ \
| |/
| |
| |
| |
| |
| | |
wallpaper bug where wrong size was taken when cropping
* commit '50cd7c39bb9f62d443a62d1f4af7f6ebc107f217':
Fixed wallpaper bug where wrong size was taken when cropping
|
| |
| |
| |
| |
| |
| |
| |
| | |
When cropping, the selected area of the image was incorrectly
cropped to the size of the view instead of the size of the image
Bug: 13617446
Change-Id: If54a0891fa2cdeee70ba63752874f1543d401701
|
| |
| |
| |
| |
| |
| | |
Bug: 13534714
Change-Id: I45ff3436de40ea85fb22d776584d9f30f0795898
(cherry picked from commit 0fa6c1b146f7ed1aba335c30878e2c1b2bf2a8f1)
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- take into account that image decoder might not
respect inSampleSize
- check rounded values so we don't have crop rects
that lie outside a bitmap's dimensions
- correctly set initial scale on bitmaps that are
larger than the screen size
- switch to using asynctask when setting wallpaper
dimensions
(cherry picked from commit e39c9a953ca11319b747b3aa79f4ccd082b775b7)
Change-Id: I43372f0bff37f139c8bc83f9956a967d0b4a8708
|
| |/
| |
| |
| |
| |
| | |
Bug: 12034934
Change-Id: Ice1b1140bd6e351dd4e520f555f245d84a645aac
(cherry picked from commit 2ab14daebac46307d2364733481edc3115bbf98c)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to an internal rounding in the renderer, the calculations
for the cropping area could be slightly offset, getting out
of the image boundaries. I sanitized the rect by ensuring they
are inside the image.
Bug: 12174629
Change-Id: Icc37790732ddd479631b898b23c05501d2dcd5be
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: 11650650
Change-Id: Ie1680220fdb235a166a0eaa0a2309729f861865c
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed a bug where an asynctask tried to load an image
even after the activity was destroyed leading to a
security exception since the permission could not be granted anymore.
Bug: 12760267
Change-Id: Ieffb10b1007f349371647512ffe4fe72433344e7
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | | |
Bug: 13534714
Change-Id: I45ff3436de40ea85fb22d776584d9f30f0795898
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to an internal rounding in the renderer, the calculations
for the cropping area could be slightly offset, getting out
of the image boundaries. I sanitized the rect by ensuring they
are inside the image.
Bug: 12174629
Change-Id: Icc37790732ddd479631b898b23c05501d2dcd5be
|
| |
| |
| |
| |
| |
| | |
suggestWallpaperDimensions is deprecated/ignored now anyway
Bug: 12118434
|
| |
| |
| |
| |
| | |
Bug: 12034934
Change-Id: Ice1b1140bd6e351dd4e520f555f245d84a645aac
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- take into account that image decoder might not
respect inSampleSize
- check rounded values so we don't have crop rects
that lie outside a bitmap's dimensions
- correctly set initial scale on bitmaps that are
larger than the screen size
- switch to using asynctask when setting wallpaper
dimensions
|
|/
|
|
| |
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
|
|
|
| |
Bug: 11324470
|
|
|
|
|
|
| |
Bug: 11342816
Change-Id: Ib8bbd30c1cc2d4f984af889895fb78412a1ab004
|
|
|
|
|
|
|
|
|
| |
- don't crash if image passed to wallpaper picker
is invalid
- close input streams correctly
Bug: 11413915
Bug: 11380658
Bug: 11362731
|
|
|
|
| |
Bug: 11134758
|
|
|
|
| |
Bug: 11137824
|
|
|
| |
Change-Id: Icd13130d6250759c71ef016f62d10d7359cf067e
|
|
|
|
|
| |
Also, sync to latest version of WallpaperCropActivity
Bug: 10950237
|
|
|
| |
Bug: 10834711
|
|
Also, create a system fallback WallpaperCropper
Bug: 4225598
Change-Id: I6bc6d5a3bb3df1dc00f3db701978aa172020c568
|