Commit Graph

49274 Commits

Author SHA1 Message Date
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
John Reck
e9b2dfe3fd Add libpng include path
Forward compatibility change

Change-Id: Iae792715d9a9aea34f53cd6383981371835c4a31
2013-08-26 16:48:46 -07:00
Mathias Agopian
d3cf96416e am 288b94b4: am f2e4fcd9: Merge changes I34935d21,If423cd29 into klp-dev
* commit '288b94b4abb42c534def97e955c6ae77e79afe6c':
  handle several vsync signal correctly
  only use format compatible with CPU consumers
2013-08-26 15:17:19 -07:00
Mathias Agopian
1057bbe72e am db54dbe3: am ed127ea3: Merge "make sure SF initialization is ran at target priority and correct thread group" into klp-dev
* commit 'db54dbe37228fd6e16fec02ce35d6b5a54015dca':
  make sure SF initialization is ran at target priority and correct thread group
2013-08-26 15:17:19 -07:00
Mathias Agopian
64ca284d91 am 01ff3d6f: am bcab7b17: fix DimLayer in GLES2.0 SF
* commit '01ff3d6fde685193955874643d26ec4e799aa3a8':
  fix DimLayer in GLES2.0 SF
2013-08-26 15:17:18 -07:00
Mathias Agopian
288b94b4ab am f2e4fcd9: Merge changes I34935d21,If423cd29 into klp-dev
* commit 'f2e4fcd96c11861bd0af1a9525344c1b691c9de9':
  handle several vsync signal correctly
  only use format compatible with CPU consumers
2013-08-26 15:03:24 -07:00
Mathias Agopian
db54dbe372 am ed127ea3: Merge "make sure SF initialization is ran at target priority and correct thread group" into klp-dev
* commit 'ed127ea3834045597a072dcf31877ff3084582ff':
  make sure SF initialization is ran at target priority and correct thread group
2013-08-26 15:03:23 -07:00
Mathias Agopian
01ff3d6fde am bcab7b17: fix DimLayer in GLES2.0 SF
* commit 'bcab7b17b1c5476935a6f2f916922b4eb57991a4':
  fix DimLayer in GLES2.0 SF
2013-08-26 15:03:19 -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
02a72bc071 am 14641f7f: (-s ours) am 464febc4: Remove input flinger stubs. (DO NOT MERGE)
* commit '14641f7f308870a7c526a57aeb79786b438b4794':
  Remove input flinger stubs.  (DO NOT MERGE)
2013-08-22 19:36:01 -07:00
Jeff Brown
14641f7f30 am 464febc4: Remove input flinger stubs. (DO NOT MERGE)
* commit '464febc44908fb4a8fca9e513ba8469750dde838':
  Remove input flinger stubs.  (DO NOT MERGE)
2013-08-22 19:34:04 -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
be0b32a132 am 052f9b2f: am 39bfc698: Merge "Add ability to test supported content types to MediaDrm" into klp-dev
* commit '052f9b2fadcb0585aab688e9ff1015534fbbb6a7':
  Add ability to test supported content types to MediaDrm
2013-08-22 16:17:13 -07:00
Jeff Tinker
052f9b2fad am 39bfc698: Merge "Add ability to test supported content types to MediaDrm" into klp-dev
* commit '39bfc6989259c5d24fd43f3d7fa7e967a4b17aac':
  Add ability to test supported content types to MediaDrm
2013-08-22 16:13:15 -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
3b15290d9c am 169636c6: am b6aea00c: Merge "Surface: Fix controlledByApp parameter" into klp-dev
* commit '169636c62bd6c434ecc6fa60359baa3789f840b8':
  Surface: Fix controlledByApp parameter
2013-08-22 12:30:08 -07:00
Eino-Ville Talvala
169636c62b am b6aea00c: Merge "Surface: Fix controlledByApp parameter" into klp-dev
* commit 'b6aea00c7843705fdc6d265d7e15b3df52e86009':
  Surface: Fix controlledByApp parameter
2013-08-22 12:26:51 -07:00
Eino-Ville Talvala
b6aea00c78 Merge "Surface: Fix controlledByApp parameter" into klp-dev 2013-08-22 19:23:27 +00:00
Todd Poynor
cf80873586 libbatteryservice: add interface to read individual battery properties
Change-Id: I089eb6348053a8a9c8bca59e57ed97b4af14825a
2013-08-22 01:57:19 +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
Mathias Agopian
c7fbebe87e am 0a289c9c: am 4ceff3d5: screenshot layers wouldn\'t work in some cases
* commit '0a289c9cc8733a893ea145ddbbcc322dc92ea1c8':
  screenshot layers wouldn't work in some cases
2013-08-21 16:01:35 -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
0a289c9cc8 am 4ceff3d5: screenshot layers wouldn\'t work in some cases
* commit '4ceff3d5efd27c164788bb2b3f0fd17c691a0204':
  screenshot layers wouldn't work in some cases
2013-08-21 15:59:20 -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
a8113c12cc am 072ca28d: am 56968ec0: Merge "dumpstate: Fix wifi list of networks dump" into klp-dev
* commit '072ca28d7860829083f17d9e24863329010536cf':
  dumpstate: Fix wifi list of networks dump
2013-08-21 12:41:51 -07:00
Dmitry Shmidt
072ca28d78 am 56968ec0: Merge "dumpstate: Fix wifi list of networks dump" into klp-dev
* commit '56968ec0bfbe70b76193a2614a23beacfc9cf9dc':
  dumpstate: Fix wifi list of networks dump
2013-08-21 12:38:25 -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
75860753bc am b383438b: am a525483d: Merge "Fix a bug where non-cropped layer could be scaled incorrectly" into klp-dev
* commit 'b383438b97643060e7ff5e737f0439418bd0ce3e':
  Fix a bug where non-cropped layer could be scaled incorrectly
2013-08-21 11:59:15 -07:00
Mathias Agopian
b383438b97 am a525483d: Merge "Fix a bug where non-cropped layer could be scaled incorrectly" into klp-dev
* commit 'a525483dc73df39a72c9b4865102a86704b3622c':
  Fix a bug where non-cropped layer could be scaled incorrectly
2013-08-21 11:56:48 -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
68df058934 am 5bc0c358: am d2cf8c2f: Merge "Provide HWC prepare with a valid output buffer" into klp-dev
* commit '5bc0c358a80f3c0e762b489e8bfb5888444159a6':
  Provide HWC prepare with a valid output buffer
2013-08-21 07:44:13 -07:00
Jesse Hall
2bb83067e3 am 68c4d784: am 7127d17d: Merge "Fix HWComposer dumping of float source crops" into klp-dev
* commit '68c4d784abbc43f3f47679e301385b01b824c8ed':
  Fix HWComposer dumping of float source crops
2013-08-21 07:44:13 -07:00
Jesse Hall
5bc0c358a8 am d2cf8c2f: Merge "Provide HWC prepare with a valid output buffer" into klp-dev
* commit 'd2cf8c2f07b4285a224acd262e6f052c37dbc0b0':
  Provide HWC prepare with a valid output buffer
2013-08-21 07:41:23 -07:00
Jesse Hall
68c4d784ab am 7127d17d: Merge "Fix HWComposer dumping of float source crops" into klp-dev
* commit '7127d17db148ad388a4eb3c152d4c257c6015476':
  Fix HWComposer dumping of float source crops
2013-08-21 07:41:23 -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
a482ef802e am 7c696162: am 32551478: Merge "Fix virtual displays for HWC 1.0" into klp-dev
* commit '7c696162017ab99fcffc08b08cb6de6e63c321b9':
  Fix virtual displays for HWC 1.0
2013-08-21 07:35:41 -07:00
Andy McFadden
7c69616201 am 32551478: Merge "Fix virtual displays for HWC 1.0" into klp-dev
* commit '32551478fc5417d3b7b5e33a202eb6ca66061f7d':
  Fix virtual displays for HWC 1.0
2013-08-21 07:33:46 -07: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
a4175dc084 am 7775925c: am 4f4f0943: SurfaceFlinger now runs in the process\'s main thread
* commit '7775925c9021e188bcba0884d4124616a7c58dcd':
  SurfaceFlinger now runs in the process's main thread
2013-08-20 14:39:45 -07:00