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
AAPT dump badging relies on the empty locale being
present when there are no locales.
Bug: 38192121
Test: manual
Change-Id: I2f5c431d4fd07c525a2318e7b93be0e93c32448f
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
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
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)
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: Ie3c9c3d3c8c75ade36422d1e8ee0a5fe117e9091
(cherry picked from commit 3f8fd40f285dba5b3639ee1e3d4e4544048c1446)
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
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
Merged-In: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
(cherry picked from commit f6298101181122b5b70d1094b131e44580cf62b2)
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
Merged-In: Ifebdb3797498d49f2bebe5fc728e6d6d8def71cb
(cherry picked from commit f6298101181122b5b70d1094b131e44580cf62b2)
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
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
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
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
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
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
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
(cherry picked from commit 3fc8f2df3098a5bb8191cca43b4dc4cf3bba160b)
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
Merged-In: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
(cherry picked from commit 3fc8f2df3098a5bb8191cca43b4dc4cf3bba160b)
This optimization fails to account for inverse fill.
Test: bit CtsGraphicsTestCases.CanvasTest
Bug: 37417782
Change-Id: I04adfa93542b1bd1f5d905c64bb40e521242e29d
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
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