292366 Commits

Author SHA1 Message Date
Romain Guy
21986f2ae7 Merge "Linear blending, step 1" 2016-10-12 15:52:14 +00:00
Wale Ogunwale
02319a6192 Associate WindowToken object with only one display at a time
WindowTokens were global objects that contained windows that could
be on multiple displays. This model does not work with the
WindowContainer hierarachy as children (window tokens) can not have
mulitple parents (displays).
We now:
- Track the mapping of binder tokens to window tokens per display
instead of globally . So, you can have a binder token map to
individual WindowToken objects per display.
- WMS.addWindowToken is used to create a WindowToken that clients
can then later add windows to. However, when addWindowToken is called
we don't know the display the client(s) would like to add window to.
So, we track binder tokens that we are allowed to add window for in
the RootWindowContainer and create a window token for the binder on
a specific display when we try to add a window.

Bug: 30060889
Test: Manual testing and existing tests pass.
Change-Id: I81a52a32b01c33ed32169d2da0506b688ea9bc8a
2016-10-12 13:29:33 +00:00
Michal Karpinski
5f9b85ff4c Merge "Extending DNS event reporting" 2016-10-12 11:33:33 +00:00
Daichi Hirono
4dd323b2d3 Rename AppFuseTest in perf test package to AppFusePerfTest.
Previously we have two AppFuseTest class in the normal test and the perf
test. The CL renames the one in the perf test to different name.

Bug: 31982374
Test: adb shell am instrument -w com.android.mtp.perftests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I6272d7f78cead0bfeee7cf83ed50c77658caa1c0
2016-10-12 16:09:10 +09:00
Erik Wolsheimer
5890f31b01 Merge "Change 2nd and later burn-in protection intervals to 2 mins" into cw-f-dev am: 56746f9830
am: c806566082

Change-Id: I9afc090a0d5c845e19a78e3af7c452d3f470fa88
2016-10-12 05:21:05 +00:00
Erik Wolsheimer
2167f75734 Change 2nd and later burn-in protection intervals to 2 mins am: 3b3940d381
am: 5b9d419965

Change-Id: I8435f5cf90814965db8df492dbea5cfa3f3e76cb
2016-10-12 05:20:08 +00:00
Erik Wolsheimer
c806566082 Merge "Change 2nd and later burn-in protection intervals to 2 mins" into cw-f-dev
am: 56746f9830

Change-Id: I89b58af12ee5940ad3f4cbb93f9777eeb641df86
2016-10-12 05:13:00 +00:00
Erik Wolsheimer
5b9d419965 Change 2nd and later burn-in protection intervals to 2 mins
am: 3b3940d381

Change-Id: I65eb928e9d76df790826cd021753c240e957cdad
2016-10-12 05:12:55 +00:00
TreeHugger Robot
56746f9830 Merge "Change 2nd and later burn-in protection intervals to 2 mins" into cw-f-dev 2016-10-12 05:03:55 +00:00
TreeHugger Robot
a1ac4f8a5c Merge "Fix contentDescription for NightDisplayTile" 2016-10-12 03:16:03 +00:00
Erik Wolsheimer
3b3940d381 Change 2nd and later burn-in protection intervals to 2 mins
BUG: 31855095
Change-Id: I969e24d2db882109855b74430b806247c4fbf6cb
2016-10-11 19:25:17 -07:00
TreeHugger Robot
a8e1bac691 Merge "Fix imports in android.text package." 2016-10-12 02:11:09 +00:00
Alan Viverette
ec726547c9 Merge "Add note about density scaling behavior to setImageURI" into nyc-mr1-dev am: d35d3c98e4 am: 250262a313
am: 56d5f228da

Change-Id: Ifd03c7f941da39b36b2c7a12dc1c776a19fb2e97
2016-10-12 01:49:20 +00:00
Alan Viverette
aeee6a78e0 Add note about density scaling behavior to setImageURI am: ac21e56f63 am: 74c6d9bd3f
am: 0754f59c4a

Change-Id: Ie22b497eed13c815d40e004db6e19a9875f5168f
2016-10-12 01:48:23 +00:00
Alan Viverette
56d5f228da Merge "Add note about density scaling behavior to setImageURI" into nyc-mr1-dev am: d35d3c98e4
am: 250262a313

Change-Id: I61df0091ee1785947cb01fde77bda1a5a0460e31
2016-10-12 01:42:54 +00:00
Alan Viverette
0754f59c4a Add note about density scaling behavior to setImageURI am: ac21e56f63
am: 74c6d9bd3f

Change-Id: I5b6f9d978d61aedac2c53dcf75dea449468d3c7b
2016-10-12 01:42:06 +00:00
Alan Viverette
250262a313 Merge "Add note about density scaling behavior to setImageURI" into nyc-mr1-dev
am: d35d3c98e4

Change-Id: Id6921412886e72fb70fdbb0b23806c88a6638ae4
2016-10-12 01:36:36 +00:00
Alan Viverette
74c6d9bd3f Add note about density scaling behavior to setImageURI
am: ac21e56f63

Change-Id: I4a85ae20023dd0589227ca7684a965a246f451fd
2016-10-12 01:36:33 +00:00
Julia Reynolds
ed105f5aa1 Merge "Stop posting config asynchronously." into nyc-mr1-dev am: 6c816c6707 am: 331eea4900
am: 1326f35397

Change-Id: I747d6c79821b0305869d828e1c2e37f648c9472d
2016-10-12 01:31:32 +00:00
Julia Reynolds
0a55c4e94f Stop posting config asynchronously. am: 3ebe72b26a am: 532ebb02a7
am: 86628d4f12

Change-Id: Ie4aebb5290fd214ab5698021052040c19d919755
2016-10-12 01:30:40 +00:00
Julia Reynolds
1326f35397 Merge "Stop posting config asynchronously." into nyc-mr1-dev am: 6c816c6707
am: 331eea4900

Change-Id: Ica84c11c5edecc2deee90cfd580f60198aefcc9a
2016-10-12 01:25:06 +00:00
TreeHugger Robot
d35d3c98e4 Merge "Add note about density scaling behavior to setImageURI" into nyc-mr1-dev 2016-10-12 01:24:55 +00:00
Julia Reynolds
86628d4f12 Stop posting config asynchronously. am: 3ebe72b26a
am: 532ebb02a7

Change-Id: I7698cde7696c967f9cd8659b3da50dbc9b4ea2bc
2016-10-12 01:24:02 +00:00
Julia Reynolds
331eea4900 Merge "Stop posting config asynchronously." into nyc-mr1-dev
am: 6c816c6707

Change-Id: I1e30c8b770d6f3c719c3fcb2964c8ab30fa79542
2016-10-12 01:18:37 +00:00
Julia Reynolds
532ebb02a7 Stop posting config asynchronously.
am: 3ebe72b26a

Change-Id: If0ebacf0a128d56c70178a03c1c2532d984c796e
2016-10-12 01:18:33 +00:00
TreeHugger Robot
6c816c6707 Merge "Stop posting config asynchronously." into nyc-mr1-dev 2016-10-12 01:10:58 +00:00
Kevin Hufnagle
62bdd956ee Merge "docs: Removed "Accessibility" page from "Pure Android" design docs" into nyc-dev am: 2acaf0a120 am: 2f54d4301d am: c9267a1f36 am: de7f56a58a
am: 1372dc2718

Change-Id: I799e69e916b06009e137f8d3188a9403080cc071
2016-10-12 00:56:43 +00:00
Kevin Hufnagle
249f363b60 docs: Removed "Accessibility" page from "Pure Android" design docs am: 1965375aa5 am: 36838b070c am: ee80c871d1 am: 6795dae4ce
am: 6acfd8a6c9

Change-Id: Ic6d380288f140203ab832381d26a71f383aacb57
2016-10-12 00:55:46 +00:00
TreeHugger Robot
e92c3f6398 Merge "power: PowerHAL support for HIDL interfaces." 2016-10-12 00:54:26 +00:00
Romain Guy
253f2c213f Linear blending, step 1
NOTE: Linear blending is currently disabled in this CL as the
      feature is still a work in progress

Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.

The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:

- Using hardware conversions when sampling from OpenGL textures
  or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
  colors to and from sRGB
- Using Skia's color spaces

Any type of processing on colors must roughly ollow these steps:

[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]

For the sRGB color space, the conversion functions are defined as
follows:

OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055

EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)

The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:

- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)

The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().

Here is a fairly exhaustive list of modifications implemented
in this CL:

- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
  to disable linear blending. This is only for GLES 2.0 GPUs
  with no hardware sRGB support. This flag is currently assumed
  to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
  This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
  why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
  of the source pixel. The asumption is that a bright pixel will be
  blended on a dark background and the other way around. The source
  alpha is gamma corrected to thicken dark on bright and thin
  bright on dark to match the intended design of fonts. This also
  matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
  could not be sampled in sRGB without a yet-to-be-defined GL
  extension
- The last column of color matrices is converted to linear space
  because its value are added to linear colors

Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures

Test: Manual testing while work in progress
Bug: 29940137

Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
2016-10-11 17:47:58 -07:00
Kevin Hufnagle
1372dc2718 Merge "docs: Removed "Accessibility" page from "Pure Android" design docs" into nyc-dev am: 2acaf0a120 am: 2f54d4301d am: c9267a1f36
am: de7f56a58a

Change-Id: Ide2f950b47c9c7a414d47bcc56c7ea8976e2a714
2016-10-12 00:46:36 +00:00
Christopher Tate
ae8f377e1f Merge "Respect restoreAnyVersion=true in full-data restore path" into nyc-mr1-dev am: cef0c6b5a5 am: 37f54083f0
am: e5854d943c

Change-Id: I59856f5181e27b1810d49d9e49a450c51703f3df
2016-10-12 00:46:06 +00:00
Kevin Hufnagle
6acfd8a6c9 docs: Removed "Accessibility" page from "Pure Android" design docs am: 1965375aa5 am: 36838b070c am: ee80c871d1
am: 6795dae4ce

Change-Id: Ifa7bee4f7e5d10c855d3e93ae5bd116e69a6e8a4
2016-10-12 00:45:39 +00:00
Christopher Tate
e2f5283fbf Respect restoreAnyVersion=true in full-data restore path am: d990e4d3df am: f413e3f2fe
am: 182c65a41b

Change-Id: I4af6eeb29fbef7384d9764b83a8642db6b3398ec
2016-10-12 00:45:13 +00:00
Chet Haase
f2cee73de6 Merge "Fix small typo in ShortcutManager header docs" into nyc-mr1-dev am: aea27e1aea am: 8f8547f1ed
am: eb63f9f3ad

Change-Id: I11d8c63b37f03211358703cc1944c04b2686af1d
2016-10-12 00:44:18 +00:00
Chet Haase
5cde9305e4 Fix small typo in ShortcutManager header docs am: c158431f8e am: 5aa0dfcc0a
am: 3267a2462d

Change-Id: I9417c0a15bbc2125dd0c370bc09b2315706005f1
2016-10-12 00:43:30 +00:00
Kevin Hufnagle
de7f56a58a Merge "docs: Removed "Accessibility" page from "Pure Android" design docs" into nyc-dev am: 2acaf0a120 am: 2f54d4301d
am: c9267a1f36

Change-Id: I17c778c5d7fa241610177d36297877e700a5c789
2016-10-12 00:35:05 +00:00
Christopher Tate
e5854d943c Merge "Respect restoreAnyVersion=true in full-data restore path" into nyc-mr1-dev am: cef0c6b5a5
am: 37f54083f0

Change-Id: I7b7483de2ecc212df6904f92b2817370b983a1c4
2016-10-12 00:34:26 +00:00
Kevin Hufnagle
6795dae4ce docs: Removed "Accessibility" page from "Pure Android" design docs am: 1965375aa5 am: 36838b070c
am: ee80c871d1

Change-Id: I0d0a1f32cdd0761c8db3cf54f50d4a785b23b68b
2016-10-12 00:34:14 +00:00
Christopher Tate
182c65a41b Respect restoreAnyVersion=true in full-data restore path am: d990e4d3df
am: f413e3f2fe

Change-Id: I3a02404754366c21a5bebf0bc47bb69ba40fa1c1
2016-10-12 00:33:24 +00:00
Chet Haase
eb63f9f3ad Merge "Fix small typo in ShortcutManager header docs" into nyc-mr1-dev am: aea27e1aea
am: 8f8547f1ed

Change-Id: Ifa3dc3e3318f2b3f12ca3ad80f9a0c9787c82145
2016-10-12 00:32:28 +00:00
Chet Haase
3267a2462d Fix small typo in ShortcutManager header docs am: c158431f8e
am: 5aa0dfcc0a

Change-Id: Ia3a1a14cf561e6846245fa8265e96e954d8a185d
2016-10-12 00:31:31 +00:00
Kevin Hufnagle
c9267a1f36 Merge "docs: Removed "Accessibility" page from "Pure Android" design docs" into nyc-dev am: 2acaf0a120
am: 2f54d4301d

Change-Id: Ie57a23935c654bb098130daa86763fc052d657db
2016-10-12 00:26:14 +00:00
Michael Kwan
e0ed8406b4 Merge "Fix issue where icon was not centered properly." into cw-f-dev am: 6119c54b48
am: 7c4caaa9fb

Change-Id: I72b94390bbc621699cf222c4f5558658aa77ddf2
2016-10-12 00:26:06 +00:00
Kevin Hufnagle
ee80c871d1 docs: Removed "Accessibility" page from "Pure Android" design docs am: 1965375aa5
am: 36838b070c

Change-Id: Ia77cf32efbd7d48bae6c0a7c1dff0219e7a3b4e0
2016-10-12 00:25:24 +00:00
Michael Kwan
8a45c14c1a Fix issue where icon was not centered properly. am: ac29ce3fe2
am: af30fa4d62

Change-Id: I8e7e819a916381b82245e8e07684deb5f75cf94d
2016-10-12 00:25:06 +00:00
Aurimas Liutikas
4037d51b13 Fix imports in android.text package.
This change also removes trailing whitespaces.

Test: code still compiles
Change-Id: I65f79a34288d01616808fa9cd6732ae4ef0f1377
2016-10-11 17:25:05 -07:00
Christopher Tate
37f54083f0 Merge "Respect restoreAnyVersion=true in full-data restore path" into nyc-mr1-dev
am: cef0c6b5a5

Change-Id: Ia5507eaf4a1f0ded5ad26e08ee5ab52528ff02f9
2016-10-12 00:21:14 +00:00
Christopher Tate
f413e3f2fe Respect restoreAnyVersion=true in full-data restore path
am: d990e4d3df

Change-Id: Icf3e6bbfd0fa42707c317d114048d7fe66bf0844
2016-10-12 00:21:10 +00:00
Chet Haase
8f8547f1ed Merge "Fix small typo in ShortcutManager header docs" into nyc-mr1-dev
am: aea27e1aea

Change-Id: I2e2f4d46787c51617b486edb7774cdf18bcaf52f
2016-10-12 00:19:50 +00:00