Commit Graph

49028 Commits

Author SHA1 Message Date
Mathias Agopian 1d4d8f94e2 improve mat44 implementation
this will make it easier to create matrices of different sizes

Change-Id: I2c1771ba0823c42d737762e2dfc2cd47eb302767
2013-09-03 16:38:49 -07:00
Mathias Agopian 9b5534b0e5 Merge changes I8283a989,I64add89a into klp-dev
* changes:
  switch to use mat4
  vector and matrix classes for graphics use
2013-08-31 01:30:10 +00:00
Jesse Hall 87967c1869 Merge "Force async behavior for the virtual display output BufferQueue" into klp-dev 2013-08-30 21:14:55 +00:00
Jesse Hall 8db92553e9 Force async behavior for the virtual display output BufferQueue
Bug: 10551087
Change-Id: I40bbb2b87d64420939a0ea309254f281437dab56
2013-08-29 16:09:11 -07:00
Mathias Agopian 19733a3279 minor clean-up of the GLESRenderer
Change-Id: I978dea25b7687fbbbb283f09c24e115d9bad49a2
2013-08-28 18:13:56 -07:00
Mathias Agopian 931bda1c47 reset the gl viewport at each frame for each display
Bug: 10097128, 9506003
Change-Id: Ie0403a631e339a9134216224f3366f46ece58b53
2013-08-28 18:11:46 -07:00
Mathias Agopian 672ddf2b58 remove adreno 130 workaround support
Change-Id: I8ea5ee65d405114b30cfaa44e1a0c971d1ef2a61
2013-08-28 15:27:30 -07:00
Mathias Agopian f4486c6ea4 try to keep omap4 alive
Bug: 10527646
Change-Id: Iec572a910e932115cf4f2e1215142b10cd91bd6f
2013-08-28 15:22:29 -07:00
Mathias Agopian a8c386f1c3 switch to use mat4
Change-Id: I8283a989cfd2b74d53958150bc90298bc083fee7
2013-08-26 20:42:07 -07:00
Mathias Agopian 595ea77f6b vector and matrix classes for graphics use
- this implements vec2, vec3, vec4, which are float vectors
of size 2, 3 and 4 respectively.

the code allows easy instantiation of vectors of a different
type via the tvec{2|3|4}<T> template classes.

- this also implements mat4 which is a float 4x4 matrix. the
tmat44<T> template class allows easy instantiation of a
4x4 matrix of a different value_type.

The vector types have some minimal support for the
glsl style swizzled access; for instance:

  vec4 u;
  vec3 v = u.xyz;

only .x, .xy, .xyz and their .stpq / .rgba equivalent are
supported.

most operators are supported on both vector and matrices:
arithmetic, unary, compound assignment and comparison
(bit-wise operators NOT supported).

- operations available on vectors include:
dot, length, distance, normalize and cross

- operations available on matrices include:
transpose, inverse, trace

- and a few utilities to create matrices:
ortho, frustum, lookAt

Change-Id: I64add89ae90fa78d3f2f59985b63495575378635
2013-08-26 20:41:13 -07:00
Mathias Agopian f2e4fcd96c Merge changes I34935d21,If423cd29 into klp-dev
* changes:
  handle several vsync signal correctly
  only use format compatible with CPU consumers
2013-08-24 00:12:42 +00:00
Mathias Agopian ed127ea383 Merge "make sure SF initialization is ran at target priority and correct thread group" into klp-dev 2013-08-24 00:12:05 +00:00
Mathias Agopian 9414d67f46 make sure SF initialization is ran at target priority and correct thread group
SF can spawn threads (indirectly) during initialization
and we want those to be spawned at URGENT_DISPLAY_PRIORITY
(in theory they should set their own, but some code lives
in vendor libraries and doesn't).

Bug: 10430209
Change-Id: I5b3a8f979297de287614c8eafd8267bef1176e4b
2013-08-23 17:10:32 -07:00
Mathias Agopian bcab7b17b1 fix DimLayer in GLES2.0 SF
DimLayer state wasn't initialized properly.

Bug: 10442967
Change-Id: I384c1d85c58c96ae29d5daa1fabee9f4ce003501
2013-08-23 16:12:34 -07:00
Jeff Brown 464febc449 Remove input flinger stubs. (DO NOT MERGE)
Bug: 10446930
Change-Id: I4dd46f539cd2a2e324dfc83b45ba2787f7404a4a
2013-08-22 18:40:07 -07:00
Jeff Tinker 39bfc69892 Merge "Add ability to test supported content types to MediaDrm" into klp-dev 2013-08-22 23:08:09 +00:00
Eino-Ville Talvala b6aea00c78 Merge "Surface: Fix controlledByApp parameter" into klp-dev 2013-08-22 19:23:27 +00:00
Mathias Agopian bef42c50eb handle several vsync signal correctly
Change-Id: I34935d2197ce8e914fef2f110896e47b44225ad2
2013-08-21 17:45:46 -07:00
Mathias Agopian 0f288fcc9c only use format compatible with CPU consumers
EGL now picks the buffer format out of a small set
of formats compatible with CPU consumers instead of
using the EGL_NATIVE_VISUAL_ID.

Bug: 10194508
Change-Id: If423cd29601b7a3ace8670f4c73004132cfc4b31
2013-08-21 16:36:34 -07:00
Jeff Tinker 611d3d4816 Add ability to test supported content types to MediaDrm
bug: 10244066
Change-Id: I6666d0dbfdc6e791deb9a82c918255af4fa19816
2013-08-21 16:00:06 -07:00
Mathias Agopian 4ceff3d5ef screenshot layers wouldn't work in some cases
specifically when the display size and the screenshot window
size didn't match, the buffer would be rejected.
We simply fix this by setting the scalling mode to
"SCALE_TO_WINDOW".

Bug: 9992306
Change-Id: Ib821767899af330bb70d3cbbfa7d41b02794a075
2013-08-21 15:25:50 -07:00
Dmitry Shmidt 56968ec0bf Merge "dumpstate: Fix wifi list of networks dump" into klp-dev 2013-08-21 19:35:25 +00:00
Eino-Ville Talvala 7895e90e29 Surface: Fix controlledByApp parameter
Bug: 10425641
Change-Id: I1a47e2ce4ecbdb8e67030a5d9ddf6604c5e2497d
2013-08-21 12:05:42 -07:00
Mathias Agopian a525483dc7 Merge "Fix a bug where non-cropped layer could be scaled incorrectly" into klp-dev 2013-08-21 18:55:19 +00:00
Dmitry Shmidt 1d6b97c869 dumpstate: Fix wifi list of networks dump
Bug: 9056601

Change-Id: Ia0adb67afdf3d478033d0ee34bbb95e621e2fe51
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-08-21 10:58:29 -07:00
Jesse Hall d2cf8c2f07 Merge "Provide HWC prepare with a valid output buffer" into klp-dev 2013-08-21 14:38:51 +00:00
Jesse Hall 7127d17db1 Merge "Fix HWComposer dumping of float source crops" into klp-dev 2013-08-21 14:37:51 +00:00
Andy McFadden 32551478fc Merge "Fix virtual displays for HWC 1.0" into klp-dev 2013-08-21 14:31:35 +00:00
Mathias Agopian 0e8f1443b8 Fix a bug where non-cropped layer could be scaled incorrectly
If a layer is not cropped but its bounds are outside of the
viewport (i.e.: clipped), the crop rectangle passed to
hw composer would be invalid because it started invalid
in the first place (to indicate "no crop").

Bug: 10410944
Change-Id: I4ae4d49a1adef0be7fa4304ecf84b1a5b7d03fe0
2013-08-20 21:46:45 -07:00
Jesse Hall 028dc8f2d7 Provide HWC prepare with a valid output buffer
We weren't dequeing and setting the output buffer until just before
set(). This didn't allow HWC to make decisions in prepare() based on
the output buffer format, dimensions, etc.

Now we dequeue the output buffer at the beginning of the composition
loop and provide it to HWC in prepare. In GLES-only rendering, we may
have to cancel the buffer and acquire a new one if GLES requests a
buffer with properties different than the one we already dequeued.

Bug: 10365313
Change-Id: I96b4b0a851920e4334ef05080d58097d46467ab8
2013-08-20 16:35:32 -07:00
Jesse Hall 353ddc6e77 Fix HWComposer dumping of float source crops
Change-Id: I45a9344b5fab17ccb54bebd01382d738a03860e6
2013-08-20 16:11:50 -07:00
Andy McFadden 22a99f0fc2 Fix virtual displays for HWC 1.0
We weren't swapping the buffers.

Bug 10366404

Change-Id: I43eb7648231bedf24899da6fc0d9acc09e0b047e
2013-08-20 16:04:47 -07:00
Mathias Agopian 4f4f094348 SurfaceFlinger now runs in the process's main thread
it used to spawn its own thread and return the main thread
to the binder thread pool -- this was confusing the naming
of things in the kernel.

Bug: 10331839

Change-Id: I2d13a6d73409a38109300fcbe6a04b4c41cb5d00
2013-08-20 11:16:45 -07:00
Andy McFadden 8b308ed70e Fix build
Neglected the "checkbuild"-built tests.

Change-Id: I202692f1a6d1e306c88e820c959d07d16e7c6a00
2013-08-19 08:56:07 -07:00
Andy McFadden 90f59bf9eb Merge "Re-enable frame dropping for non-auto timestamps" into klp-dev 2013-08-19 14:27:28 +00:00
Jesse Hall 7c6278de6e Merge "Use new HWC display type/count constants." into klp-dev 2013-08-18 04:31:24 +00:00
Mathias Agopian 0f05a92664 Merge "Encapsulate textures into their own Texture class" into klp-dev 2013-08-17 00:40:19 +00: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
Andy McFadden 3c25621ad7 Re-enable frame dropping for non-auto timestamps
This change adds an entire field to note whether the timestamp was
auto-generated by Surface or supplied by the application.

The value is used when deciding whether or not to drop frames based
on buffer presentation timestamps.  If a desired presentation time
was set explicitly, BufferQueue will use that value to decide if a
frame should be dropped.  If the timestamp was generated by Surface
at the time the buffer was queued, the timestamp is ignored.

Bug 10151804

Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
2013-08-16 15:15:16 -07:00
Jesse Hall a33b62cc47 Merge "Replace sRGB_888 with sRGB_X_8888" into klp-dev 2013-08-16 21:50:22 +00:00
Jesse Hall 9e663de4fe Use new HWC display type/count constants.
Change-Id: I774d0c68906ac6dc69268f708c30a6b0868b8816
2013-08-16 14:28:37 -07:00
Igor Murashkin e60a0b1e6a Merge "gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired" into klp-dev 2013-08-16 21:02:02 +00:00
Jesse Hall bc2a90b024 Replace sRGB_888 with sRGB_X_8888
Bug: 10357459
Change-Id: I3a1d92cce2c9d3e930408129fb20887276fffddc
2013-08-16 07:50:11 -07:00
Jesse Hall e048a4374c Merge "Add support for EGL_KHR_gl_colorspace" into klp-dev 2013-08-15 23:17:49 +00: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 6db4ff6218 Disable GLES 2.x rendering
Bug 10340705

Change-Id: I91f3baf0d79655d8d031c100d0b116f745c2fbef
2013-08-15 10:39:11 -07:00
Andy McFadden 892f22dcb9 Initialize mIndent
Bug 10334731

Change-Id: Ia3aa118a1516cc480b0d85179b78c4447f982dd6
2013-08-15 10:05:01 -07:00
Igor Murashkin a5b7513711 gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired
- Return NOT_ENOUGH_DATA instead of INVALID_OPERATION when too many
  buffers have already been locked.
- INVALID_OPERATION is nominally used when something irrecoverable happens,
  but in this case the client just needs to call unlockBuffer to go back into a
  good state.

Bug: 10333400
Change-Id: I3a034d77de85741429f832a90eedd670afa1dc94
2013-08-14 20:17:17 -07:00