Commit Graph

7 Commits

Author SHA1 Message Date
Mathias Agopian ff2ed70fa3 color blindness enhancement
This is an attempt at improving the experience of
users with color vision impairement.

At this time this feature can only be enabled for
debugging:

  adb shell service call SurfaceFlinger 1014 i32 PARAM

  with PARAM:
   0 : disabled
   1 : protanomaly/protanopia simulation
   2 : deuteranomaly/deuteranopia simulation
   3 : tritanopia/tritanomaly simulation
  11, 12, 13: same as above w/ attempted correction/enhancement

The enhancement algorithm tries to spread the "error"
such that tones that would otherwise appear similar can be
distinguished.

Bug: 9465644

Change-Id: I860f7eed0cb81f54ef9cf24ad78155b6395ade48
2013-09-04 22:11:15 -07:00
Mathias Agopian 49457ac092 Encapsulate textures into their own Texture class
the main reason for doing this is so that we can have
access to informations about a texture (like its dimension)
close to where we generate and use shaders in ES 2.0.
Previously, there wasn't any way to get to a texture's size
from a RenderEngine implementation.

Bug: 8679321

Change-Id: I388b338a70d07e3e8177dde248710ea1e4c82dff
2013-08-16 16:29:02 -07:00
Mathias Agopian e0ec2a9568 Merge "Fix ES2 composition on some devices" into klp-dev 2013-08-15 23:12:26 +00:00
Mathias Agopian 2eaefe198a Simplify handling of opaque layers in shader generation
just ensure the alpha value is 1.0 in the opaque case
when reading the color from the texture or the
global color.

Bug: 8679321

Change-Id: Ia38b30e97c3bce5a2d534a40c0d66e0bfc3ea40d
2013-08-15 15:11:01 -07:00
Mathias Agopian 458197de00 Fix ES2 composition on some devices
- turns out fragment shaders don't have default precision by default
- GLES 1.x extensions that became core in GLES 2.0 don't always work
  as extensions in GLES 2.0 (!)

Bug: 8679321
Change-Id: I5a4a93e158247910399325a965af5d2e3bbece9b
2013-08-15 14:56:51 -07:00
Andy McFadden 892f22dcb9 Initialize mIndent
Bug 10334731

Change-Id: Ia3aa118a1516cc480b0d85179b78c4447f982dd6
2013-08-15 10:05:01 -07:00
Mathias Agopian 3f84483382 SurfaceFlinger now uses GLES 2.x when available
Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
2013-08-13 16:07:45 -07:00