Commit Graph

8880 Commits

Author SHA1 Message Date
George Burgess IV
fa4eaa63ca Appease the static analyzer
Since the static analyzer assumes that
`head == blockToRemove && blockToRemove->prevBlock == nullptr` may be
true, it complains that we're deleting `head` and returning `head`
shortly afterward.

Assert (without assertions, since -DNDEBUG is passed) that this isn't
the case.

Bug: 27101951
Test: mma. Warning is gone.
Change-Id: I33e98eec7b293fcf0d8826f89c287a3b870758f2
2017-07-18 17:21:28 -07:00
Roozbeh Pournader
e2393ae726 Merge "Make strike-through respect kerning at boundaries" 2017-07-14 02:17:43 +00:00
Roozbeh Pournader
1378a9d72c Make strike-through respect kerning at boundaries
Also clean up lower-level drawing of strike-through in Cavas.cpp.

We still cannot use the strike-through information from the font
since Skia doesn't provide it, so we are going with the default
values.

Test: Manual
Test: bit CtsTextTestCases:*
Test: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 32907446
Change-Id: Iee6f8102a35eba0ff4127dbbef189529ab573e6d
2017-07-13 13:21:00 -07:00
Seigo Nonaka
6fef520af5 Merge "Implement family fallback." 2017-07-13 20:02:29 +00:00
Seigo Nonaka
0d253e46aa Implement family fallback.
Introduce new attribute "fallbackFor" to font element.
By specifying name of the family to this attribute, that font is used
when the developer specifies the font family.
For example, if fonts.xml has the following family entry,
  <family lang="ja">
    <font fallbackFor="serif">NotoSerifJP-Regular.ttf</font>
    <font>NotoSansJP-Regular.ttf</font>
  </family>
the Japanese text is rendered by NotoSansJP-Regular.ttf by default.
Then, if developer specifies fontFamily="serif" in TextView, the Japanese
text is rendered by NotoSerifJP-Regular.ttf.

Bug: 37328609
Bug: 31491668
Test: bit FrameworksCoreTests:android.graphics.TypefaceSystemFallbackTest

Change-Id: I2744db7384c8056795e841c88b387545434131f4
2017-07-13 10:47:48 -07:00
TreeHugger Robot
3542ec3724 Merge "Revert "AAPT2: Auto-version adaptive-icon XML"" 2017-07-12 19:52:13 +00:00
Greg Daniel
1f01222bfe Merge "Update to use GrBackendTexture/RT instead of Descriptors" 2017-07-12 18:30:37 +00:00
Greg Daniel
ac2d232f21 Update to use GrBackendTexture/RT instead of Descriptors
Test: manual testing

Change-Id: Ide727a39e2c49f226c8d432608e0072214249451
2017-07-12 11:48:00 -04:00
Leon Scroggins III
f51a80d2b0 Remove more references to kIndex_8
Test: Covered by existing tests. No actual change in behavior, since
kIndex_8 is not being used anyway.

Bug: 62483967

Change-Id: I317e3a814dbd102925fe412d2e19111b0af3af38
2017-07-12 11:27:19 -04:00
Adam Lesinski
bb94f32a00 Revert "AAPT2: Auto-version adaptive-icon XML"
This reverts commit 5b7337f77c.

Bug: 63579299
Test: none
Change-Id: Ib617c4edfc16eeae3507b59b2debeae4f8bbf9a5
2017-07-12 07:42:01 -07:00
Romain Guy
26b6a64953 Use EGL_EXT_gl_colorspace_scrgb instead of *_linear
Since hwui output non-linear scRGB data in wide-gamut, use
the scRGB-nl extension instead of scRGB.

Bug: 62951776
Test: Manual, CtsGraphicsTestCases
Change-Id: Ifdb288e777d12b790b93624ccea9b4f1f6966e52
2017-07-11 09:48:28 -07:00
Adam Lesinski
fba0cf2950 AAPT2: Fix processing of quotes in XML
When processing attributes in XML, quotes can't be used to mark a
section as whitespace preserving, so the assumption should be that the
entire string is whitespace preserving, which makes quote characters
literals.

Bug: 62840718
Bug: 62840406
Test: make aapt2_tests
Change-Id: I4afff02148b5b8e78833abf1f323c2f5325d6155
2017-07-07 13:23:55 -07:00
TreeHugger Robot
3a38fb3e5c Merge "Add missing notifyPixelsChanged" 2017-07-07 03:07:26 +00:00
John Reck
abbedfc84f Add missing notifyPixelsChanged
Fixes: 63400947
Test: CTS test PixelCopyTest#testReuseBitmap
Change-Id: Iad6fe331f84415528c1858a1fdbf26bce784cd53
2017-07-06 23:01:39 +00:00
John Reck
f211cc462e Update LeakChecker debug log
Test: manual
Change-Id: I3c2f8c77dba2955d5cebb1c3d511411350e18850
2017-07-06 12:52:51 -07:00
John Reck
34781b2530 Move frame history into jank tracker
Test: hwui_unit_tests & manual
Change-Id: If761947652750640268217cd8cd97c8382441b44
2017-07-05 16:48:09 -07:00
John Reck
7075c79209 Split out jank data from policy
Move ProfileData out to its own file with helper
accessors. This keeps policy (what is/isn't jank)
outside of the data storage.

Also use lambdas to iterate over the histogram
to make it nicer for dumping & proto-ifying.

Test: hwui_unit_tests pass & jank data still dumps

Change-Id: I88488369ec77590a2867f51128e65bb786aa34e6
2017-07-05 14:04:51 -07:00
Adam Lesinski
2fa4a346ec Merge "AAPT2: Auto-version adaptive-icon XML" 2017-06-30 01:12:35 +00:00
John Reck
0fb794b13e Merge "Merge "Selectively disable filtering if estimated safe" into oc-dev am: 38c97237e3 am: dfce81961d" into oc-dr1-dev-plus-aosp
am: 2b17d4d4c0

Change-Id: Ie041acbd829b618e3a6d69de0462165c334816f7
2017-06-29 02:34:40 +00:00
John Reck
d814ac8e70 Merge "Selectively disable filtering if estimated safe" into oc-dev am: 38c97237e3
am: dfce81961d

Change-Id: I8bf7663f2f5aecf22fc83304e09dc7d7f5cc1028
2017-06-29 02:20:55 +00:00
John Reck
dfce81961d Merge "Selectively disable filtering if estimated safe" into oc-dev
am: 38c97237e3

Change-Id: Ic3be7167429e8cd6a291ac0465e883522afcf9e3
2017-06-29 02:13:18 +00:00
Adam Lesinski
5b7337f77c AAPT2: Auto-version adaptive-icon XML
Auto version adaptive-icon XML to v26.

This change makes the logic for generating versioned resources
simpler by changing the comparison function of ResTable_config
to evaluate the sdkVersion property last, making configurations
that differ only in sdkVersion next to each other in a sorted vector.

Bug: 62316340
Test: manual (verified output of tools/aapt2/integration-tests/AppOne)
Change-Id: I977d45821722a65d2135efb4693304eacc565c9a
2017-06-28 11:20:17 -07:00
John Reck
7bf96a0a6f Selectively disable filtering if estimated safe
If the output matches the source rect then use
GL_NEAREST instead of GL_FILTER. This is a more
pixel-exact capture.

Bug: 38242146
Test: CtsUiRendering & CtsViewTestCases:.PixelCopyTest passes on fugu
Change-Id: I9f57a4124374568f83d45fdc8f83cc767ded888a
2017-06-28 18:13:19 +00:00
Sean Lu
2307bb2acb Merge "[Resources] house keeping in TypeList" am: ff2e03cfce am: 516bd5f862 am: 2d604852ce
am: 5386fcf965

Change-Id: Iafa12b6189d9b97354adcff2a481602db9522c48
2017-06-27 00:33:00 +00:00
Sean Lu
5386fcf965 Merge "[Resources] house keeping in TypeList" am: ff2e03cfce am: 516bd5f862
am: 2d604852ce

Change-Id: I983ab5312b484a8d3f8adafd693f2435c460ab5a
2017-06-26 23:09:29 +00:00
Sean Lu
516bd5f862 Merge "[Resources] house keeping in TypeList"
am: ff2e03cfce

Change-Id: I22b0a87776d794f23f70f2f9d8d885761c0b8d14
2017-06-26 22:59:35 +00:00
Mike Reed
46199f8bcf relax expected tile modes
Skia reserves the right to optimize 1xN or Nx1 shaders to change the
tilemode, since for a dimension of 1, all modes give the same result.

Test: hwui_unit_tests

Change-Id: I832865dab67b8ae3bdfaea8f9d04bdd64e4a60c6
2017-06-26 13:09:25 -04:00
Sean Lu
83df8423e9 [Resources] house keeping in TypeList
Symptom: Type was freed but still may be access
Root Cause: TypeList not cleared
Solution: clear the TypeList
Project: AOSP
Note: None
Test: Yes

Change-Id: I00225165a30d15a299b7a483ea393b4447d2a3fc
2017-06-26 18:25:37 +08:00
Romain Guy
bd98e00d43 Merge "Merge "Add support for RGBA_F16 readbacks" into oc-dr1-dev am: 43e02a3ec5" into oc-dr1-dev-plus-aosp
am: 375206c86d

Change-Id: I920cea7cedfd1a91ce7cdaf8d89c3ad45884b030
2017-06-19 21:14:29 +00:00
Romain Guy
88e060f881 Add support for RGBA_F16 readbacks
WCG windows render into RGBA16F surfaces, we need to give the readback
API the ability to read the raw source data for testing.

Bug: 62728191
Test: CtsViewTestCases
Change-Id: I93ead84207dab38fba02d4419b5ae18df9555f8e
2017-06-16 18:07:54 -07:00
Derek Sollenberger
c970184c15 Merge "Revert buffer age workaround for Adreno GPUs." 2017-06-15 12:54:23 +00:00
Romain Guy
1d2ac86f98 Merge "Use RGBA16F layers when wide color gamut rendering is on" into oc-dr1-dev am: 9ae7bb7aa3
am: feb1609657

Change-Id: Icc5ea6789affa4c8cf09051add0ed78fe2a2e9d1
2017-06-14 23:06:18 +00:00
TreeHugger Robot
9ae7bb7aa3 Merge "Use RGBA16F layers when wide color gamut rendering is on" into oc-dr1-dev 2017-06-14 22:50:43 +00:00
Romain Guy
07ae505d40 Use RGBA16F layers when wide color gamut rendering is on
Layers created using View.setLayerType() or Canvas.saveLayer() need
to be RGBA16F/scRGB-nl when within a window that requested wide color
gamut rendering.

Bug: 29940137
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases, hwui_unit_tests
Change-Id: I42fd6355448c92041491a7109e3ac8a153d38bf9
2017-06-14 13:44:08 -07:00
John Reck
7a3433a991 Merge "Add a workaround for simulate secondary display" into oc-dev am: 31443a17e8 am: f0d3971021
am: 2d41b97bc3

Change-Id: I4de4d39d14746691ca74e13918f3ae06476b91bc
2017-06-14 20:43:12 +00:00
John Reck
2d41b97bc3 Merge "Add a workaround for simulate secondary display" into oc-dev am: 31443a17e8
am: f0d3971021

Change-Id: I5ee14c0887eaeac267c815851ae6f9e8ee47d80f
2017-06-14 20:31:11 +00:00
John Reck
94ed3c84d6 Merge "Add a workaround for simulate secondary display" into oc-dev
am: 31443a17e8

Change-Id: Ib248882df61f0d45b7687726c1a57de6c289a9b5
2017-06-14 20:27:09 +00:00
John Reck
f0d3971021 Merge "Add a workaround for simulate secondary display" into oc-dev
am: 31443a17e8

Change-Id: Ic63e4f48ec55bce9f51089bc41481ab8805ae8c7
2017-06-14 20:25:03 +00:00
Derek Sollenberger
b5a12bd1b9 Revert buffer age workaround for Adreno GPUs.
We now have a fix in the driver so we don't need this workaround
any more.

Test: hwuimacro savelayer2 --onscreen
Bug: 31957043
Change-Id: I8d8a4abcfa809d0cdab3bf63d7f8255febf2aa06
2017-06-14 15:23:19 -04:00
John Reck
a896306c38 Add a workaround for simulate secondary display
To workaround a deadlock caused by bufferqueue locks
we force RenderThread over to use async mode which
we enable via eglSwapInterval(0)

Bug: 38372997
Test: steps in the bug
Change-Id: Ia305f73abbdd64ab0c25d1f7d32792cc6295a0ce
2017-06-14 10:50:14 -07:00
Roozbeh Pournader
554585e08d Merge "Get underline position and thickness from the font" 2017-06-09 21:44:59 +00:00
Jorim Jaggi
f852cee52a Merge "Properly run window animations at vsync-sf (1/2)" into oc-dev am: d1f55f6302
am: 8fee9425e4

Change-Id: I0e88c75cea5b39aadd829470c1b299cf10444e5a
2017-06-09 04:24:38 +00:00
Jorim Jaggi
8fee9425e4 Merge "Properly run window animations at vsync-sf (1/2)" into oc-dev
am: d1f55f6302

Change-Id: Ibc28f6019637dbc9696c62f1ad1ce4679954fbd5
2017-06-09 04:16:28 +00:00
Jorim Jaggi
9f23608173 Merge "Properly run window animations at vsync-sf (1/2)" into oc-dev
am: d1f55f6302

Change-Id: Ibbb9214593ee1b5dd51a0b0da8815c270b875257
2017-06-09 04:15:12 +00:00
Jorim Jaggi
34a0cdb98e Properly run window animations at vsync-sf (1/2)
- Add new Choreographer instance that runs on vsync-sf
- Use this new Choreographer for WindowAnimator, and remove all
the hacks around it

Test: Open apps and close apps, notice no stutter
Test: Screen zoom animations
Test: go/wm-smoke
Bug: 36631902
Change-Id: I988ae25645effc3ac20efa7cb9b68f23444da0d0
2017-06-08 17:22:43 -07:00
Roozbeh Pournader
ca8a04a366 Get underline position and thickness from the font
Previously, font underline position and thickness were fixed in Android.
Although a custom font may have specified a different value, such a value
would never be used. Now we use the values from the font if they are
provided and fall back to the old default values only if needed.

Bug: 62353930

Test: adb shell am instrument -w -e package android.graphics com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: cts-tradefed run cts-dev --module CtsTextTestCases
Test: Manual
Change-Id: I6bf21000dd69a2780c894b231638bc0c122e41f4
2017-06-08 14:13:57 -07:00
TreeHugger Robot
12741cec2d Merge "Implement CacheManager for the Skia pipelines." 2017-06-06 20:37:08 +00:00
Derek Sollenberger
f9e45d1d81 Implement CacheManager for the Skia pipelines.
The core of the implementation is complete and provides heuristic
cache sizing based on the size of the surface being used. This CL
will also be used to add the following features in the future...

1) Support Vulkan pipeline reporting on the size of the surface.
2) Complete the VectorDrawableAtlas stub code
3) Automatic purging of stale resources for low memory devices.

Test: hwui_unit_tests (new test added) and CtsUiRendering
Bug: 62260637
Change-Id: Ib85159cca28b646fe249f2190b07f1b7e0f50d8f
2017-06-06 14:19:37 -04:00
Chris Craik
bde482c78c Merge "Temporarily enable HWUI opengl validation" 2017-06-05 21:57:50 +00:00
TreeHugger Robot
aeb22da1bd Merge "Implement HW Bitmap for Skia pipeline" 2017-06-02 22:06:37 +00:00