8715 Commits

Author SHA1 Message Date
Stan Iliev
cc78864bb7 Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev
am: dad0ba155e

Change-Id: Ibd006617200e11ac929b23da279e099c9fce4ca1
2017-05-13 01:52:23 +00:00
TreeHugger Robot
dad0ba155e Merge "Fix recent apps in system UI for Skia pipeline" into oc-dev 2017-05-13 01:41:58 +00:00
Stan Iliev
625dd56a45 Fix recent apps in system UI for Skia pipeline
Enable HW Bitmaps for Skia pipeline just enough to make
recent apps list working by adding support for BitmapShader.
Drawing HW bitmaps in a canvas is also supported.

Test: recent apps work, HWUI unit tests pass, CTS tests pass.
bug: 38136140
Change-Id: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
Merged-In: Ibd06c859c86dc213310d5ce5272497e1882d0cc6
2017-05-12 19:42:33 -04:00
Adam Lesinski
287a372575 Merge "AAPT: Include empty locale in getLocales" into oc-dev
am: 19af4cc375

Change-Id: Idcac3756eede932c7924ccc3ef3edc7e12b7a10b
2017-05-12 04:10:49 +00:00
Adam Lesinski
0532e76302 Merge "Fix support for @empty in style resolution" into oc-dev
am: 7d75f49175

Change-Id: Ie5a046f75a7c7fa13d330b90f3b9a8ff6c5ac373
2017-05-12 01:00:00 +00:00
TreeHugger Robot
19af4cc375 Merge "AAPT: Include empty locale in getLocales" into oc-dev 2017-05-12 00:22:44 +00:00
TreeHugger Robot
7d75f49175 Merge "Fix support for @empty in style resolution" into oc-dev 2017-05-11 21:55:24 +00:00
Adam Lesinski
fa2fc0b263 AAPT: Include empty locale in getLocales
AAPT dump badging relies on the empty locale being
present when there are no locales.

Bug: 38192121
Test: manual
Change-Id: I2f5c431d4fd07c525a2318e7b93be0e93c32448f
2017-05-11 12:26:52 -07:00
Adam Lesinski
32e7501a27 Fix support for @empty in style resolution
If @empty is encountered in XML, do not fallback
to searching through the theme.

Bug: 36891052
Test: make aapt2_tests
Test: bit CtsContentTestCases:android.content.res.cts.TypedArrayTest
Change-Id: Ie3bf7b70af9c7913513a1092afd95d26bec5e635
2017-05-11 11:28:29 -07:00
Seigo Nonaka
373b15bda9 Fix double bolding
resolveStyle increases minikinStyle's weight value based on Skia's style
value. Since we compute Skia's style based on given weight value, we
should not add extra bold weight to minikinStyle.

This CL also fixes misunderstanding of base weight.
The base weight is only used for computing weight relative to the
weighted alias. Thus, base weight should not be updated except for
createWeightAlias method.

To be clear, this CL changes the function names but keeps the same
semantics as before.

Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests
Test: am instrument -w -e class android.graphics.cts.TypefaceTest\
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Bug: 37880319
Merged-In: Ied73189b11792fb062da46f45afd2db664e6ecb4

Change-Id: I82350a1bfb99ce198b955f127949e21bccccb1cb
2017-05-09 04:10:07 +00:00
Seigo Nonaka
264d3bef34 Fix double bolding
resolveStyle increases minikinStyle's weight value based on Skia's style
value. Since we compute Skia's style based on given weight value, we
should not add extra bold weight to minikinStyle.

This CL also fixes misunderstanding of base weight.
The base weight is only used for computing weight relative to the
weighted alias. Thus, base weight should not be updated except for
createWeightAlias method.

To be clear, this CL changes the function names but keeps the same
semantics as before.

Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests
Test: am instrument -w -e class android.graphics.cts.TypefaceTest\
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Bug: 37880319

Change-Id: Ied73189b11792fb062da46f45afd2db664e6ecb4
(cherry picked from commit 1f9c461e6a9537f91a6509e73eeb04ee6d5706cf)
2017-05-09 03:58:29 +00:00
Yi Kong
d71a903539 Merge "Remove unused lambda captures" am: 1101f45613 am: c7ce115073
am: ca9988f0f9

Change-Id: Id1259cbbf1bbe9032d66315a346fa4d5d27ce2b3
2017-05-09 00:40:22 +00:00
Yi Kong
b2233821e1 Remove unused lambda captures
Test: build
Bug: 37752547
Change-Id: Id102e93fef06e9c818b27fa8a5c6218c319bdd30
2017-05-08 10:24:22 -07:00
Colin Cross
af737306f9 Convert libandroid and libandroid_runtime to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: Ie3c9c3d3c8c75ade36422d1e8ee0a5fe117e9091
(cherry picked from commit 3f8fd40f285dba5b3639ee1e3d4e4544048c1446)
2017-05-06 00:50:39 +00:00
Sergey Vasilinets
9c29d93ee3 Merge "Add StrictMode.noteSlowCall to calls that result in hw bitmap readback" into oc-dev
am: 01a5cc9004

Change-Id: I52ea2290a175df2dcd5b3805f7e5943e387133da
2017-05-05 19:51:04 +00:00
Sergey Vasilinets
01a5cc9004 Merge "Add StrictMode.noteSlowCall to calls that result in hw bitmap readback" into oc-dev 2017-05-05 19:31:53 +00:00
Arun
93cafba790 Merge "Reduce hwui CPU time by using glDrawRangeElements" am: 057c7c3164 am: 94f4f5e45f
am: b5facc7516

Change-Id: I9e96bf83ae5ebd4237fc4d78a58e83793de86aad
2017-05-05 19:10:21 +00:00
Treehugger Robot
057c7c3164 Merge "Reduce hwui CPU time by using glDrawRangeElements" 2017-05-05 18:50:13 +00:00
Arun
b0a9477c8e Reduce hwui CPU time by using glDrawRangeElements
The CPU overhead of glDrawElements in the GPU driver is significant
with client-side vertex data (unique per draw call) as the driver has
to calculate the mininimum and maximum indices from the index buffer
in order to evaluate the range of vertex data required. This can be
avoided by keeping track of the min-max in hwui and passing it with
glDrawRangeElements. This requires OpenGL ES3.0 support (which is
already checked for elsewhere in hwui).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I57bb1ddd239a1032f74f1cd2683bbe0970e84bd9
2017-05-05 15:11:27 +00:00
Colin Cross
58f94a9526 Convert libhwui to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
Merged-In: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
(cherry picked from commit f6298101181122b5b70d1094b131e44580cf62b2)
2017-05-04 10:11:54 -07:00
Colin Cross
271c2e00aa Convert libhwui to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
Merged-In: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
(cherry picked from commit f6298101181122b5b70d1094b131e44580cf62b2)
2017-05-04 10:07:21 -07:00
sergeyv
9fd259c9b0 Add StrictMode.noteSlowCall to calls that result in hw bitmap readback
bug:37748500
Test: BitmapTest:*inStrictMode
Change-Id: Ifea1c6f0c50ba2f409c96b7ccf7eb31c89ef81c8
2017-05-03 17:41:33 -07:00
Chris Craik
16ee9b9bd1 Merge "Make all FrameBuilderTests run on RT" into oc-dev
am: ecc121d8bf

Change-Id: Iee5e75009bfe1dcce9dd021aa20f1410b1810f32
2017-05-03 22:46:22 +00:00
Chris Craik
e681bf6b5c Make all FrameBuilderTests run on RT
Fixes: 33834637
Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests  --gtest_filter=FrameBuilder.renderNode_OpenGL
Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests  --gtest_filter=FrameBuilder.projection*

They essentially all use Caches, so making RT-only for safety. This
prevents crashes when trying to access Caches in a non-rt test, when
it's not guaranteed to be created.

Change-Id: I530c73d0ffe2d4f4ef53a46715f5bcca2c485f70
2017-05-03 10:55:29 -07:00
Yi Kong
5edbb34dd2 Merge "Remove no-op std::max call" am: c00af4c533 am: ef5e579cec
am: f3310cb3b1

Change-Id: I553be70f9ba04feaf4da01041bfb3edc6ae38252
2017-05-01 18:51:59 +00:00
Yi Kong
06a2d2bf23 Remove no-op std::max call
This was calling std::max on an unsigned integer and 0, which is
essentially no-op. Remove this code.

Test: Build
Bug: 37752547
Change-Id: I74ce45b95960621dff11f574fbe1af60ad147cf0
2017-04-30 23:54:08 -07:00
Chris Craik
5805cfdbc1 Merge "Revert "Temporarily enable GL validation"" into oc-dev
am: 8f4ac4ac05

Change-Id: I7a44ab6a8a2a05c124bbe0d84475f5c21b1b7bf4
2017-04-28 23:15:34 +00:00
Chris Craik
8f4ac4ac05 Merge "Revert "Temporarily enable GL validation"" into oc-dev 2017-04-28 23:04:02 +00:00
Chris Craik
a1e500ebf4 Merge "Add conic support for Path#approximate" into oc-dev
am: ebd44d0076

Change-Id: I68f5924aef7526de1c801f529dd5a304a1a1d287
2017-04-28 18:53:15 +00:00
TreeHugger Robot
ebd44d0076 Merge "Add conic support for Path#approximate" into oc-dev 2017-04-28 18:47:37 +00:00
Adam Lesinski
65c42a5569 Merge "AAPT2: Add workaround for non-standard package IDs" into oc-dev
am: e7172ff9fb

Change-Id: I7b8e53f8394e41433ceebe4f6e477f8561e49807
2017-04-28 01:04:51 +00:00
TreeHugger Robot
e7172ff9fb Merge "AAPT2: Add workaround for non-standard package IDs" into oc-dev 2017-04-27 23:45:44 +00:00
Derek Sollenberger
1c9c7b867c Merge "Disable Vulkan backend when running hwui_unit_tests." into oc-dev
am: f9dc09f4ea

Change-Id: I613b0f380995d88bbda6c916af68b96ab69e8dff
2017-04-27 23:41:25 +00:00
Chris Craik
96202d56ad Add conic support for Path#approximate
Fixes: 37722722
Test: bit CtsGraphicsTestCases:PathTest
Test: bit CtsUiRenderingTestCases:android.uirendering.cts.testclasses.PathTests

Also adds static asserts to path-walking code, to avoid this problem
in the future.

Also adds annotations, since this is public API now.

Change-Id: Ic39b167968b98fd8197be2d0f9aca79949717237
2017-04-27 16:24:18 -07:00
TreeHugger Robot
f9dc09f4ea Merge "Disable Vulkan backend when running hwui_unit_tests." into oc-dev 2017-04-27 22:10:49 +00:00
Derek Sollenberger
0f89539de6 Disable Vulkan backend when running hwui_unit_tests.
The Vulkan backend fails to run on devices without vulkan drivers.
Until we can stub out the vulkan drivers for those devices we find
an acceptable solution.

Test: hwui_unit_tests on device w/out vulkan
Bug: 37422708
Change-Id: I3d7c21882053459f25ca1eb5648cdf5dfd4c333e
2017-04-27 11:30:20 -04:00
Adam Lesinski
4ca56978a9 AAPT2: Add workaround for non-standard package IDs
The dynamic ref table used to map build-time IDs to runtime IDs
is mainly used for shared resource libraries and has a few built-in
mappings (app 0x7f and framework 0x01).

Using a non-standard package ID like 0x80 causes a failure in package ID
lookup. The solution is to ship the dynamic_ref_table with an identity mapping
with any resource table that uses a non-standard package ID.

Adds some tests to ensure this works correctly.

Bug: 37498913
Test: make libandroidfw_tests
Test: make aapt2_tests
Change-Id: Ic3f67942384d34e7fdcbc94ded360e940e3ebc8a
2017-04-26 21:55:31 -07:00
Chris Craik
005275d238 Revert "Temporarily enable GL validation"
Fixes: 35387665
Test: none

This reverts commit b5544d0308613dbcfee5d27f26bda2248d0a5e33.

Change-Id: I4cf3fa0c65aaee38d0fa9cfea15b72c8ef42acb1
2017-04-26 00:47:42 +00:00
Chris Craik
4554fa6b7c Merge "Fix include" into oc-dev
am: 7e44951bb7

Change-Id: I6e7ec68d95dc12fa3d87a0e366cf924a4dba32bc
2017-04-25 23:39:39 +00:00
TreeHugger Robot
7e44951bb7 Merge "Fix include" into oc-dev 2017-04-25 23:32:11 +00:00
Chris Craik
66c3a829dc Fix include
Bug: 35387665
Test: builds with HWUI_ENABLE_OPENGL_VALIDATION := false

Dependency on gl3.h was added while that header was auto-included for
error checking purposes. Add the include to enable us to disable gl
error checking.

Change-Id: Ic969da716e2323f8e42d20da8fd0a6fa653f9775
2017-04-25 13:42:53 -07:00
Colin Cross
8cf0d0d2b0 Convert libinputservice to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
(cherry picked from commit 3fc8f2df3098a5bb8191cca43b4dc4cf3bba160b)
2017-04-20 18:31:02 +00:00
Colin Cross
ece22cf115 Convert libinputservice to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
Merged-In: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
(cherry picked from commit 3fc8f2df3098a5bb8191cca43b4dc4cf3bba160b)
2017-04-20 03:18:38 +00:00
Matt Sarett
e07a91a8db Add unit test for Skia path behavior
Test: This is a test.
Bug: 35369941

Change-Id: Iaf21d3a903702f81a20e08e8b50b782f311ce7f3
2017-04-19 12:38:30 +00:00
Derek Sollenberger
190fe086df Merge "Remove round rect clipping optimization." into oc-dev 2017-04-18 16:06:41 +00:00
Chris Craik
c84824942d Disable crashing drop shadow tests
Bug: 36272398
Test: HWUI unit tests now run without crashing

Change-Id: I2877ed184640e5043d33b10605db71dde501fd2a
2017-04-17 13:58:22 -07:00
Derek Sollenberger
f7d98f436c Remove round rect clipping optimization.
This optimization fails to account for inverse fill.

Test: bit CtsGraphicsTestCases.CanvasTest
Bug: 37417782
Change-Id: I04adfa93542b1bd1f5d905c64bb40e521242e29d
2017-04-17 18:05:42 +00:00
Romain Guy
5545518123 Properly decode colors spaces in BitmapRegionDecoder
Reusing a bitmap with BitmapRegionDecoder would preserve the
previous color space. This change also tweaks color space
matching to make sure we pick Display P3 with parameter d=0.039
or d=0.04045

Bug: 36905374
Test: CtsGraphicsTestCases
Change-Id: I4d2d66e5babebb0b5ce5cbdc7e8244177b4b7f9c
2017-04-15 21:41:22 -07:00
Matt Sarett
ca9b703b88 Bug fix: use legacy SkCanvas regardless of color space tag
Test: Added unit test. CtsGraphicsModule.

Bug: 32984164

Change-Id: If72e1e31c98e01f97f3a05d763f5d4c71cf88313
2017-04-14 16:26:50 +00:00
Seigo Nonaka
d154829cb1 Use provided style for fallback font selection
If the developer gives some weight/italic to the Typeface.Builder
the fallback used the metadata in the font file. We should use
provided data instead.

This CL also adjusts upper and lower limits on weight, from 100..900 to
1..1000

Bug: 37257745
Bug: 37251569
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I7cf390d96b49afcce359928373698b0c9a9babd8
2017-04-14 00:54:46 +00:00