3022 Commits

Author SHA1 Message Date
Shih-wei Liao
2fd2c894e9 Fix b/2943524: On-device linking the rs_cl.
Change-Id: I1b1e76ec94a26e0bc86d997d2584c8a015c57de1
2011-01-26 04:03:30 -08:00
Romain Guy
5742a27710 am b6110a1e: Merge "Make sure the opaque bitmap is opaque. GL doesn\'t like being lied to. Bug #3382992" into honeycomb
* commit 'b6110a1ef41337a5f3042c7e08b63274cee4faf6':
  Make sure the opaque bitmap is opaque. GL doesn't like being lied to. Bug #3382992
2011-01-25 22:56:10 -08:00
Romain Guy
f90f8171e6 Make sure the opaque bitmap is opaque. GL doesn't like being lied to.
Bug #3382992

The result still looks wrong but it works as designed, unfortunately.

Change-Id: I6108e199fa336cb01faaabf6c75faa3b71c2339b
2011-01-25 22:53:24 -08:00
Ritu Srivastava
2d9299b39d fix failing thread object run
A previously exited Thread object refuses to run again, if the
thread-id of the caller, conincides with the thread-id it previously
used in the worker thread. Hence reset the previously used worker
thread-id to -1 when it exits.

 Signed-off-by: Ritu Srivastava <rsrivast@sta.samsung.com>

Change-Id: I873925c312a43ec8a16392b98cc959042ff6bfd2

Signed-off-by: Madan Ankapura <mankapur@sta.samsung.com>
2011-01-25 21:48:54 -08:00
Jason Sams
1afbf54dd1 Migrating functions for on device linking.
Change-Id: I41dc1551ada53370f2b06c49cc76089b1e72ac5b
2011-01-25 21:33:44 -08:00
Mathias Agopian
df8368925a am 239fd805: Merge "fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)" into gingerbread
* commit '239fd805ef7c0e4116b0a89e20caaf287e91f017':
  fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
2011-01-25 14:46:40 -08:00
Mathias Agopian
af4fa5d83d am 1955a5c9: Merge "partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)" into gingerbread
* commit '1955a5c9da421dc89bb1a1dd3d3193159192cde9':
  partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)
2011-01-25 14:46:35 -08:00
Mathias Agopian
88bccab35c am d3fcd0a1: Merge "minor clean-up. SurfaceFlinger doesn\'t need libpixelflinger.so. (DO NOT MERGE)" into gingerbread
* commit 'd3fcd0a1c923498921107bb44fbc8b24582a170a':
  minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
2011-01-25 14:46:22 -08:00
Mathias Agopian
21956040a7 fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.

The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.

This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.

Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
2011-01-25 14:19:13 -08:00
Mathias Agopian
68d3478860 partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)
We used to guarantee that a layer in SurfaceFlinger would never be
destroyed before all references (to its ISurface) on the client
side would be released. At some point, this guarantee got
relaxed to allow to free gralloc resources sooner. This last
change was incorrect, because:
- in implementations with reference-counting the gralloc resources
wouldn't be released anyways, until all the mapping were gone
- in implementations without ref counting, the client side
would most likely crash or do something bad
- it also caused the SharedBufferStack slot to be reallocated
to another surface, which could be problematic if the client
continued to use the surface after the window manager destroyed it.

So, we essentially reinstate the guarantee that layers won't be
destroyed until after all references to their ISurface are
released.

NOTE: This doesn't entirely fix 3306150 because there is another
problem there where the Browser continues to use a surface after it
has been destroyed.

also improve SurfaceFlinger 'dumpsys' log

list the purgatory, which shows windows that have been closed,
but for which the client still has references.
2011-01-25 14:19:13 -08:00
Mathias Agopian
728d849fc9 minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
2011-01-25 14:18:15 -08:00
Romain Guy
8699aa3a2f am 2bd78c9a: Merge "Remove debugging log left by mistake." into honeycomb
* commit '2bd78c9a9b15d1c5c06d838c1fca77d9748e1c41':
  Remove debugging log left by mistake.
2011-01-25 11:03:55 -08:00
Romain Guy
2bd78c9a9b Merge "Remove debugging log left by mistake." into honeycomb 2011-01-25 11:01:55 -08:00
Romain Guy
8d2959ddff Remove debugging log left by mistake.
Change-Id: I7d5165b4b682714940cea9886abeedd3f4858057
2011-01-25 11:03:00 -08:00
Jason Sams
0ac3046426 am 03855bbe: Fix bug 3385881 Launch signals and threads are not always matched in index. Threads grab launch indexes as they start which may not be the order in which they were launched.
* commit '03855bbe4a55668d6834514f83f8c2276e9dc594':
  Fix bug 3385881 Launch signals and threads are not always matched in index.  Threads grab launch indexes as they start which may not be the order in which they were launched.
2011-01-25 00:40:34 -08:00
Jason Sams
03855bbe4a Fix bug 3385881
Launch signals and threads are not always
matched in index.  Threads grab launch indexes
as they start which may not be the order in which
they were launched.

Change-Id: I1ff42c3df5d7ebb46de6329ebd11ef67a5fc58ca
2011-01-25 00:34:34 -08:00
Jason Sams
cf20b3aec1 am 887a834c: Merge "Attempt to fix 3333866 Missing memory barrier when the non-locking past path is hit." into honeycomb
* commit '887a834c4737bed055bacbc91cc0dd42bd25546c':
  Attempt to fix 3333866 Missing memory barrier when the non-locking past path is hit.
2011-01-25 00:26:14 -08:00
Jason Sams
887a834c47 Merge "Attempt to fix 3333866 Missing memory barrier when the non-locking past path is hit." into honeycomb 2011-01-25 00:23:41 -08:00
Romain Guy
50dc05e5ad am c6a0944c: Merge "Fix display list support for shapes." into honeycomb
* commit 'c6a0944c80b3a9bcea00ce9b5d3a605eaadabb49':
  Fix display list support for shapes.
2011-01-24 22:15:53 -08:00
Romain Guy
82d41a5153 Fix display list support for shapes.
Change-Id: I8b4c9e9ec36266a83c0a53ba3fb6e45d61bbd6d9
2011-01-24 21:53:42 -08:00
Romain Guy
7b4950ae35 am 169fafe6: Merge "Fix rendering issues with animated layers. Bug #3385247" into honeycomb
* commit '169fafe6797dc4c7ae17eba29b72034be6c9c8ec':
  Fix rendering issues with animated layers. Bug #3385247
2011-01-24 20:47:19 -08:00
Romain Guy
8168396d1a Fix rendering issues with animated layers.
Bug #3385247

- The layer's alpha was interpreted in the wrong range 0..255 instead of 0..1
- 9-patches would not correctly dirty the layer region, the generated mesh
  was incorrect

Change-Id: I4916249bedcdb0794929f3796bd17854971efc88
2011-01-24 20:40:18 -08:00
Romain Guy
4e1db6dadd am 2ff6d705: Merge "Enable partial invalidates when rendering with OpenGL." into honeycomb
* commit '2ff6d70521fe1f537f8ebd631f0b9b3aa8becf94':
  Enable partial invalidates when rendering with OpenGL.
2011-01-24 18:39:57 -08:00
Romain Guy
2ff6d70521 Merge "Enable partial invalidates when rendering with OpenGL." into honeycomb 2011-01-24 18:38:00 -08:00
Romain Guy
7d7b5490a0 Enable partial invalidates when rendering with OpenGL.
Change-Id: Ie8be06c4776b815e8737753eb8003b4fd8936130
2011-01-24 18:39:56 -08:00
Jason Sams
fcecc244a7 Attempt to fix 3333866
Missing memory barrier when the non-locking past
path is hit.

Change-Id: I80db7df547c1ce35ed85ba117519b12679cc42ef
2011-01-24 17:33:21 -08:00
Jason Sams
45a8835203 am a4967fac: Merge "Cleanup script init to fix bogus log printing and reduce memory churn." into honeycomb
* commit 'a4967facf4b496fbc39adeb240182dad6c7dad6a':
  Cleanup script init to fix bogus log printing and reduce memory churn.
2011-01-24 17:32:55 -08:00
Jason Sams
a4967facf4 Merge "Cleanup script init to fix bogus log printing and reduce memory churn." into honeycomb 2011-01-24 17:30:38 -08:00
Stephen Hines
f2401bddcd am 3dd0908a: Merge "Add missing functions to math library." into honeycomb
* commit '3dd0908a65095cb6946001ae3039ab87a47b4f33':
  Add missing functions to math library.
2011-01-24 16:16:35 -08:00
Stephen Hines
7e893e1ddf Add missing functions to math library.
This also updates the math test suite to exercise all the basic operator
functions (except __udivsi3 which may not be 100% necessary). There is also a
small fix for rsQuaternionMultiply().

Change-Id: Id157e6d5ebe2e20c17e8ea7b13ffaa74c241838c
b: 3203577
2011-01-24 13:56:30 -08:00
Chet Haase
2acb67ec9f am 67005b05: Merge "Use optimized display lists for all hwaccelerated rendering" into honeycomb
* commit '67005b05cc76a38a5b3bf6e83957dd03619e9126':
  Use optimized display lists for all hwaccelerated rendering
2011-01-24 11:15:51 -08:00
Chet Haase
daf98e941e Use optimized display lists for all hwaccelerated rendering
Previously, display lists were used only if hardware acceleration
was enabled for an application (hardwareAccelerated=true) *and* if
setDrawingCacheEnabled(true) was called. This change makes the framework
use display lists for all views in an application if hardware acceleration
is enabled.

In addition, display list renderering has been optimized so that
any view's recreation of its own display list (which is necessary whenever
the visuals of that view change) will not cause any other display list
in its parent hierarchy to change. Instead, when there are any visual
changes in the hierarchy, only those views which need to have new
display list content will recreate their display lists.

This optimization works by caching display list references in each
parent display list (so the container of some child will refer to its
child's display list by a reference to the child's display list). Then when
a view needs to recreate its display list, it will do so inside the same
display list object. This will cause the content to get refreshed, but not
the reference to that content. Then when the view hierarchy is redrawn,
it will automatically pick up the new content from the old reference.

This optimization will not necessarily improve performance when applications
need to update the entire view hierarchy or redraw the entire screen, but it does
show significant improvements when redrawing only a portion of the screen,
especially when the regions that are not refreshed are complex and time-
consuming to redraw.

Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
2011-01-24 08:43:20 -08:00
Jason Sams
c55de66ad2 Cleanup script init to fix bogus log printing and
reduce memory churn.

Change-Id: I0bf5392102e3d59fea81f5f9f832887113602b7f
2011-01-23 17:48:45 -08:00
Romain Guy
65cd377a9f am 60c06092: Merge "Fix bitmap meshes to work in display lists." into honeycomb
* commit '60c060929f41447c5ac3a75c1cd6cfb60b139200':
  Fix bitmap meshes to work in display lists.
2011-01-23 16:35:56 -08:00
Romain Guy
a566b7c3aa Fix bitmap meshes to work in display lists.
Change-Id: Ie226d049840942d9ad9cf58e0c19132f49d62a75
2011-01-23 16:36:11 -08:00
Romain Guy
8b2f5267f1 Add support for arcs.
Change-Id: I96c057ff4eb1b464b03f132da0b85333777bee4f
2011-01-23 16:15:02 -08:00
Romain Guy
ff42d952eb am 502d41d8: Merge "Add support for arcs." into honeycomb
* commit '502d41d85958fb729a17e0651e80134e1c41c621':
  Add support for arcs.
2011-01-23 16:14:49 -08:00
Romain Guy
22fdb6f3e9 am d182046e: Merge "Add support for ovals and stroked rectangles." into honeycomb
* commit 'd182046ee67c1196e52b74dc9f3f89dcb816785d':
  Add support for ovals and stroked rectangles.
2011-01-23 14:18:57 -08:00
Romain Guy
c1cd9ba335 Add support for ovals and stroked rectangles.
Change-Id: I1292e241386763c82e6622c8f7ed90b0f5b7bd4f
2011-01-23 14:18:41 -08:00
Romain Guy
f6834478b3 Always render text underline extra.
Bug #3381287

Change-Id: Ibfbc9c51c8dccef216daccc37d835e5dbf143a6a
2011-01-23 13:32:12 -08:00
Romain Guy
73fafb382b am f6834478: Always render text underline extra. Bug #3381287
* commit 'f6834478b379856d3e5de92ddce7de0e6ba9fa4a':
  Always render text underline extra. Bug #3381287
2011-01-23 13:32:12 -08:00
Romain Guy
1b58fcf73a am 60559631: Merge "Collapse sucessive calls to restoreToCount() in display lists." into honeycomb
* commit '6055963155450dff2c287d5568a5c4390d796f3a':
  Collapse sucessive calls to restoreToCount() in display lists.
2011-01-23 12:01:15 -08:00
Romain Guy
27454a42de Collapse sucessive calls to restoreToCount() in display lists.
Change-Id: Icb3d3dc2c579436d375269a9cb0b821a931c5a79
2011-01-23 12:01:41 -08:00
Romain Guy
f632765e0c am 4cf6e2f3: Fix potential crash in display lists.
* commit '4cf6e2f34994f160e1baba205a43c12784dd3e0d':
  Fix potential crash in display lists.
2011-01-23 11:35:41 -08:00
Romain Guy
4cf6e2f349 Fix potential crash in display lists.
Change-Id: I868821cbe69f7e71d93701b9cdb528a2ef796cd4
2011-01-23 11:35:13 -08:00
Jeff Brown
c3563eb9e7 am 265cf2e7: Merge "Fix getSwitchState."
* commit '265cf2e76bef9ee369a7d43d567a22a0c39355ef':
  Fix getSwitchState.
2011-01-22 21:32:58 -08:00
Romain Guy
8b9a5ad9d5 am b2ee64ed: Merge "Fix regression with hardware layers." into honeycomb
* commit 'b2ee64edffe3dfe7316baa435566f777e657d9a0':
  Fix regression with hardware layers.
2011-01-22 00:41:16 -08:00
Romain Guy
c88e357d1e Fix regression with hardware layers.
The renderer was checking whether the layer's region is a rect to
draw it with a simple quad. This test was done against the layer's
region structure, which was cleared after generating the mesh.
Unfortunately Region::isRect() returns true when the region is
empty, which was causing the renderer to always use a quad to
draw a mesh on screen.

Change-Id: If4b874579ee0cedcb67367c9efa5c0c98ca55231
2011-01-22 00:35:23 -08:00
Romain Guy
a8fe992351 am acf36126: Merge "Log only 1 line per process when using OpenGLRenderer." into honeycomb
* commit 'acf36126e4620a0cc36d4e5b1268d15777ea4361':
  Log only 1 line per process when using OpenGLRenderer.
2011-01-21 21:18:06 -08:00
Romain Guy
acf36126e4 Merge "Log only 1 line per process when using OpenGLRenderer." into honeycomb 2011-01-21 21:15:40 -08:00