8703 Commits

Author SHA1 Message Date
TreeHugger Robot
2ba96eced0 Merge "Add tests for b/34598346" 2017-01-23 23:46:00 +00:00
John Reck
47aa8d1477 Add tests for b/34598346
Test: unit test passes
Bug: 34598346
Change-Id: I7e5144aa875e42487718059cc06b86e32db28702
2017-01-23 14:07:53 -08:00
TreeHugger Robot
65e8f0adf3 Merge "Workaround libmemunreachable lockup" 2017-01-23 21:16:55 +00:00
TreeHugger Robot
2d31375d94 Merge "Remove all calls to SkCanvas::getClipStack from HWUI unit tests" 2017-01-23 20:37:16 +00:00
John Reck
553ae6ab07 Workaround libmemunreachable lockup
Bug: 34586922
Test: hwui_unit_tests completes
Change-Id: Ia55f7bc49faf8a32624e2f16e2477eb12a261b07
2017-01-23 11:06:46 -08:00
Stan Iliev
c1db0e0ff7 Remove all calls to SkCanvas::getClipStack from HWUI unit tests
Refactor HWUI unit tests to not invoke SkCanvas::getClipStack,
because this Skia API is going to be deprecated.

Test: Build and ran sailfish-eng. Ran HWUI unit tests.
Change-Id: Iac277aa26fbe9e2a0860cde2dd43732ed1c4c4e3
2017-01-23 13:47:35 -05:00
John Reck
51c51df46c Add missing nothingToDraw() check
Fixes: 34598346

Prior to 2874daa4d38bddd3a5f0edb3774d5e5884dd9554 we
never freed the resources of root nodes. Now that this is being
done we need to ensure that the backdrop has content before
we try to draw that content. All other nodes passed in
deferRenderNodeScene check that nothingToDraw() returns false
before drawing them, but that check was missed on the backdrop
node.

Test: manual. open calculator then long-press on recents
Change-Id: I495749161b38b57278bdb60d5f872eeeb2b218d0
2017-01-23 10:26:28 -08:00
TreeHugger Robot
27be018934 Merge "Refactor GLFunctorDrawable to use new SkCanvas API for clip region" 2017-01-20 14:31:41 +00:00
TreeHugger Robot
a9da39cb64 Merge "Add wide color gamut and HDR resource qualifiers" 2017-01-20 04:10:04 +00:00
Romain Guy
c9ba559021 Add wide color gamut and HDR resource qualifiers
Bug: 32984164
Test: Config_test, AaptConfig_test and aapt2_tests
Change-Id: Ie9c82bfe2d36b1d6180ee223250ab5bb2ce90dd4
2017-01-19 18:44:00 -08:00
Siyamed Sinir
c0d685b87a Revert "Follow minikin::FontFamily constructor signature change."
This reverts commit a0a4828614edfd633ab86f04408e7f4e55b491dd.

Bug: 34378805
Change-Id: Icbdbfbde2efe8eaebbe4334a679e3b3247057388
2017-01-20 02:01:25 +00:00
Siyamed Sinir
24fac986ec Merge "Revert "Introduce set/getFontVariationSettings."" 2017-01-20 01:59:52 +00:00
Siyamed Sinir
a3b9f2e3c6 Revert "Introduce set/getFontVariationSettings."
This reverts commit ba3028c1fc9fca2d45acc841557da2c9a83923bf.

Bug: 34378805
Change-Id: I8250c87af5d65fb45789632580be4ae1b8711372
2017-01-20 01:13:23 +00:00
TreeHugger Robot
1f9f11007d Merge "Move StringPiece to libandroidfw" 2017-01-19 23:40:06 +00:00
Stan Iliev
98d251b10e Refactor GLFunctorDrawable to use new SkCanvas API for clip region
Refactor GLFunctorDrawable::onDraw to get SkCanvas clip region
with new Skia API (getClipStack is going to be deprecated).

Test: Built and ran angler-userdebug. Ran CTS WebView clip tests.
Change-Id: Ia11e3f3d64d5c33802b7a8f296f213ef39a69905
2017-01-19 18:08:38 -05:00
Roozbeh Pournader
2d00c0952e Merge "Update locale data from in-tree ICU" 2017-01-18 17:03:35 +00:00
Greg Daniel
57b8eb3da0 Merge "Update hwui_unit_tests to support running with Vulkan backend." 2017-01-18 16:13:04 +00:00
Greg Daniel
98c78dad19 Update hwui_unit_tests to support running with Vulkan backend.
Added Macros for RENDERTHREAD_TESTS which run these tests using specific backends.
RENDERTHREAD_TESTS - Runs OpenGL, SkiaGL, and SkiaVulkan
RENDERTHREAD_SKIA_TESTS - Runs SkiaGL and SkiaVulkan
RENDERTHREAD_OPENGL_TESTS - Runs OpenGL

Test: manual running of hwui_unit_tests

Change-Id: Ia7420ee7a38803a15e2d58394d14b38cae8208d3
2017-01-18 09:12:31 -05:00
Adam Lesinski
d5083f6f6b Move StringPiece to libandroidfw
libandroidfw needs to make use of StringPiece, so
move it to libandroidfw and update all code referencing
StringPiece in aapt2.

Test: make libandroidfw_tests libaapt2_tests
Change-Id: I68d7f0fc7c651b048d9d1f5e7971f10ef5349fa1
2017-01-17 18:55:51 -08:00
Adam Lesinski
fdaa9c58c9 Merge "New implementation of AssetManager/ResTable" 2017-01-17 23:58:36 +00:00
Ben Wagner
1a6cd84d64 Merge "Remove SkDevice.h includes." 2017-01-17 17:10:05 +00:00
Roozbeh Pournader
9bddb48413 Update locale data from in-tree ICU
Also add back script information for Yiddish old code (ji) that was
removed in ICU.

Bug: 26756576
Test: none
Change-Id: Ia785f86bf0407aeed6134ef9d44e504494256da2
2017-01-13 17:37:04 -08:00
Roozbeh Pournader
4115c64313 Treat Latin American locales specially
am: cf246af30d

Change-Id: I98ff3b1774e6cc3511fcd296d9cec5ccfce03c40
2017-01-14 01:10:25 +00:00
Zak Cohen
9013325c3a Merge changes from topic 'vrmode'
* changes:
  Set ui mode in UiModeManagerService to vrheadset when VR mode is enabled.
  Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
2017-01-13 23:15:00 +00:00
Ben Wagner
c2d9470aa9 Remove SkDevice.h includes.
SkDevice.h is being removed from Skia. This removes these already unused
includes which mention this file.

Test: refactoring CL. Existing unit tests still pass.

Change-Id: I8340a5822ad2b75c54fe0dca1303ceab9bbee805
2017-01-13 17:03:13 -05:00
Roozbeh Pournader
cf246af30d Treat Latin American locales specially
Due to legacy reasons, Android translations of European Spanish were
kept under 'es', while Latin American Spanish translations were kept
under 'es-US'. The combination of this, and the new locale
preference rules in Nougat, resulted in 'es' winning over 'es-US' for
all Latin American locales, since 'es' was a direct ancestor, while
'es-US' was just a fallback.

The changes in Nougat had assumed that app developers would put Latin
American Spanish translations under 'es-419', but that could create a
backward-compatibility problem under older Android versions that did
not support three-digit region codes properly.

This CL keeps the Nougat logic and its locale parent tree, but
special-cases es-US and es-MX to be treated as equivalents of es-419
in cases where they are present and es-419 is not.

Bug: 31545805
Bug: 34126460
Test: unit tests are included
Change-Id: Iab26f41294587ee044685a5a6560520c7cbb06f7
(cherry picked from commit a192a8ced65ceea8bfe44f0eac6a394cbf80d936)
2017-01-13 01:54:01 +00:00
Roozbeh Pournader
383ac409df Merge "Treat Latin American locales specially" 2017-01-13 01:53:15 +00:00
Mark Salyzyn
6f773a0d87 Replace cutils/log.h and android/log.h with log/log.h
Test: compile
Bug: 34250038
Change-Id: I42185a879beaa9bb244f53a968800392b854ac45
2017-01-12 20:29:11 +00:00
Ben Wagner
610fbb3afd Merge "Use FatVector instead of SkAutoMalloc in VulkanManager." 2017-01-12 18:41:51 +00:00
Mark Salyzyn
22221f6981 Merge "resolve merge conflicts of ec7e2a164c37 to master" 2017-01-12 17:23:01 +00:00
Ben Wagner
eec27d51d2 Use FatVector instead of SkAutoMalloc in VulkanManager.
Skia is looking to make SkAutoMalloc private and will be moving it.
Using FatVector instead will make this code both less dependent on Skia
internals and more performant.

Test: refactoring CL. Existing unit tests still pass.

Change-Id: If9de10059775b75e1ab89078eacede2e20e91299
2017-01-12 11:52:31 -05:00
Mark Salyzyn
173215d1b2 resolve merge conflicts of ec7e2a164c37 to master
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I49c6e41b79061e2b3c0352e3ac8fa5ebb152b6f5
2017-01-12 08:28:30 -08:00
Mark Salyzyn
ec7e2a164c Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b am: d1740f0f5b
am: 6dacea63d9

Change-Id: Ife229cc450dbbb5f43941fcd1b08b86f0e41a779
2017-01-12 15:59:48 +00:00
Mark Salyzyn
6dacea63d9 Merge "Replace cutils/log.h and log/logger.h with android/log.h or log/log.h (part deux)" am: 2225a0640b
am: d1740f0f5b

Change-Id: I78430cd21cf1186ccc2b48ee4ee8a9b07decde5e
2017-01-12 15:46:20 +00:00
Seigo Nonaka
ba3028c1fc Introduce set/getFontVariationSettings.
This CL enables developers to specify axis values to the underlying
font collection. The specification of the font variation settings is
the same as the CSS font-variation-settings attribute in CSS working
draft as of 2016-11-30.

Code example: Here is an example to set width 100 and weight 1.5.

  TextView tv = (TextView) findViewById(R.id.textView);
  tv.setFontVariationSettings("'wdth' 100, 'wght' 1.5");

Bug: 33062398
Test: Manually done. Ran FrameworksGraphicsTests, CtsGraphicsTestCases
      and CtsWidgetTestCases
Change-Id: I249d464f8cdaa56017a987588b94ed685aadeb58
2017-01-12 18:11:03 +09:00
TreeHugger Robot
e4e375c749 Merge "Follow minikin::FontFamily constructor signature change." 2017-01-12 07:43:53 +00:00
Adam Lesinski
da431a22da libandroidfw: Add new support for shared libraries
This adds support for shared resource libraries in the new
ResTable/AssetManager implementation.

The dynamic package map encoded in resources.arsc is parsed
and stored with LoadedArsc, and combined to form a resolved table
in AssetManager2.

Benchmarks show that this implementation is an order of magnitude
faster on angler-userdebug (make libandroidfw_benchmarks).

Test: libandroidfw_tests
Change-Id: I57c80248728b63b162bf8269ac9495b53c3e7fa0
2017-01-11 17:20:36 -08:00
Roozbeh Pournader
a192a8ced6 Treat Latin American locales specially
Due to legacy reasons, Android translations of European Spanish were
kept under 'es', while Latin American Spanish translations were kept
under 'es-US'. The combination of this, and the new locale
preference rules in Nougat, resulted in 'es' winning over 'es-US' for
all Latin American locales, since 'es' was a direct ancestor, while
'es-US' was just a fallback.

The changes in Nougat had assumed that app developers would put Latin
American Spanish translations under 'es-419', but that could create a
backward-compatibility problem under older Android versions that did
not support three-digit region codes properly.

This CL keeps the Nougat logic and its locale parent tree, but
special-cases es-US and es-MX to be treated as equivalents of es-419
in cases where they are present and es-419 is not.

Bug: 31545805
Bug: 34126460
Test: unit tests are included
Change-Id: Iab26f41294587ee044685a5a6560520c7cbb06f7
2017-01-11 15:52:08 -08:00
Mark Salyzyn
96bf5985d5 Replace cutils/log.h and log/logger.h with android/log.h or log/log.h
(part deux)

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7417936c4d3666608fccfe51a312c90ecefba2fb
2017-01-11 15:30:30 -08:00
Adam Lesinski
7ad1110ecd New implementation of AssetManager/ResTable
The multiwindow model and Resources-per-activity
model that came in N puts greater demands on AssetManagers.
They are created whenever window dimensions change, which
can be frequently. There is a need to be able to cheaply
create a new AssetManager for each Activity, which shares
a lot of underlying state.

In order to make the creation of AssetManagers cheap,
we need a new implementation of the native AssetManager
and ResTable to support immutable representations of
APKs. This new data structure/class is ApkAssets.

ApkAssets have the same functionality of an AssetManager, except
that they operate on a single APK, and they do not do any caching.
Once loaded, they are immutable.

ApkAssets will be exposed as a Java object, with its implementation in
native code. The existing Java StringBlock will be owned by ApkAssets,
which means that Strings can be shared across AssetManagers.

ApkAssets can be cached by the ResourcesManager. Creating an AssetManager
requires only a list of ApkAssets and a configuration.

AssetManager2 (named with the suffix '2' for now while transitioning
to the new implementation) caches bags that are accessed.

Since ApkAssets are expected to be kept around longer, they do more validation
of the resource table, which cause slower load times. Measured on an angler-userdebug,
loading the framework assets takes 11ms with ApkAssets, and 2ms with the old
AssetManager implementation.

The tradeoff is that there does not need to be any security checks once an ApkAssets
is loaded, and regular resource retrieval is faster. Measured on an angler-userdebug,
accessing resource (android:string/ok) with many locales takes 18us with AssetManager2,
and 19us with AssetManager (this is per resource, so these add up).

Test: make libandroidfw_tests
Change-Id: Id0e57ee828f17008891fe3741935a9be8830b01d
2017-01-11 13:30:57 -08:00
TreeHugger Robot
4a07b95746 Merge "Fix Skia merge by fixing API mismatch." 2017-01-11 21:20:02 +00:00
TreeHugger Robot
ba5124b48b Merge "Fix dirty Z prop" 2017-01-11 20:55:09 +00:00
Derek Sollenberger
624ad836ec Fix Skia merge by fixing API mismatch.
Test: compile
Change-Id: Ie524af03fd3c85cceac13abdcdd9af8ef6ca6bb9
2017-01-11 14:57:34 -05:00
Zak Cohen
1a6acdbb86 Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
Bug: 30989383
Test: Unit test for aapt2
Change-Id: I66dc65af6327b94fed74538bee08cada0b8be4fa
2017-01-11 11:44:47 -08:00
John Reck
41282b7629 Fix dirty Z prop
Test: none
Change-Id: I886d50e58d6f404c6d19860a3032ca1b2854e073
2017-01-11 11:26:48 -08:00
Greg Daniel
6efc30e1b7 Merge "Add support for dummy draws for Vulkan webview and texture views." 2017-01-11 19:01:52 +00:00
Greg Daniel
63b18b3fda Merge "Break Layer class into Gl and Vulkan subclasses" 2017-01-11 19:00:34 +00:00
Mark Salyzyn
db15537e6e resolve merge conflicts of 082a1721b516 to master
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I17f178f425975c1c0dbd48091d25b101956d505e
2017-01-11 08:30:17 -08:00
Mark Salyzyn
082a1721b5 Merge "Replace cutils/log.h and log/logger.h with log/log.h" am: e7fcbcb991 am: 6143cbf1e5
am: ef8ccc8510

Change-Id: If6673f44c7d08960f3a0a86703cebf577bd21f1b
2017-01-11 15:45:46 +00:00
Mark Salyzyn
ef8ccc8510 Merge "Replace cutils/log.h and log/logger.h with log/log.h" am: e7fcbcb991
am: 6143cbf1e5

Change-Id: Id192d8dd973fe9e70acab72bae9856bc8a62ac75
2017-01-11 15:40:24 +00:00