3896 Commits

Author SHA1 Message Date
Romain Guy
39d252a663 Various OpenGL optimizations
Change-Id: Ib0742c96f10f5f50e7e5148b742c31b6c232d127
2011-12-12 18:14:06 -08:00
Romain Guy
f44e66fcf7 Remove leftover debugging code
Change-Id: I1589af7991da36744071d5081daa24ebae5b4dfd
2011-12-12 16:50:13 -08:00
Romain Guy
3e263fac8c Keep shaders to render properly
I don't know who's to blame, SGX or Tegra2 but one of those two GPUs is not
following the OpenGL ES 2.0 spec.

Change-Id: I2624e0efbc9c57d571c55c8b440a5e43f08a54f2
2011-12-12 16:47:48 -08:00
Romain Guy
6752d0ab02 Mark color uniform fetched after fetching it
Change-Id: I10e8027018608070a536eb8b51c7a4272e37006c
2011-12-12 12:15:17 -08:00
Romain Guy
24edca8b52 Code cleanup
Change-Id: If92e3addfc4d8546a60edcdea60a1fc89c27b680
2011-12-09 13:08:06 -08:00
Romain Guy
05bbde70fd Free up resources by deleting shaders early on
Change-Id: I29a39775732c0a48d3e6823f7afa3e741cae8541
2011-12-09 12:55:37 -08:00
Mathias Agopian
4a46ee57f1 Merge "Improve the VSYNC api a bit." 2011-12-07 14:15:21 -08:00
Mathias Agopian
6779df2c28 Improve the VSYNC api a bit.
- add the ability to set the vsync delivery rate, when the rate is
set to N>1 (ie: receive every N vsync), SF process' is woken up for
all of vsync, but clients only see the every N events.

- add the concept of one-shot vsync events, with a call-back
to request the next one. currently the call-back is a binder IPC.

Change-Id: I09f71df0b0ba0d88ed997645e2e2497d553c9a1b
2011-12-06 22:43:10 -08:00
Stephen Hines
f7f930480c Merge "NULL should not be const for RS." 2011-12-06 18:33:35 -08:00
Stephen Hines
4d322043ab NULL should not be const for RS.
Change-Id: I24d96843c40f822bf064a0fa1fc0440b6bf0518d
2011-12-06 16:47:32 -08:00
Romain Guy
9c4b79af22 Discard framebuffer rendering queues when discarding layers
Bug #5581817

Change-Id: Ie30700a29059d2ea60eb7bd3f8bd20ac48a149ab
2011-12-06 16:37:10 -08:00
Romain Guy
7da48db9c5 Merge "Clip text correctly Bug #5706056" 2011-12-05 11:56:09 -08:00
Romain Guy
8f9a9f61ab Clip text correctly
Bug #5706056

A newly introduced optimization relied on the display list renderer
to properly measure text to perform fast clipping. The paint used
to measure text needs to have AA and glyph id encoding set to return
the correct results. Unfortunately these properties were set by
the GL renderer and not by the display list renderer. This change
simply sets the properties in the display list renderer instead.

This change also improves the error message printed out when the
application attempts to use a bitmap larger than the max texture
size.

Change-Id: I4d84e1c7d194aed9ad476f69434eaa2c8f3836a8
2011-12-05 11:53:26 -08:00
Ben Cheng
f0fef4f17b am f1a4c48b: am e21dabf6: Merge "Initialize bwr.read_buffer in IPCThreadState::talkWithDriver." into ics-mr1
* commit 'f1a4c48b886d53e2afceb0620215e3792af79fd5':
  Initialize bwr.read_buffer in IPCThreadState::talkWithDriver.
2011-12-01 22:08:20 -08:00
Ben Cheng
e21dabf654 Merge "Initialize bwr.read_buffer in IPCThreadState::talkWithDriver." into ics-mr1 2011-12-01 22:05:07 -08:00
Romain Guy
cac5fd3e09 Faster text clipping
Change-Id: I03a00c4261d81a416b1ad7b86ce2d432c71908b4
2011-12-01 20:08:50 -08:00
Ben Cheng
0450570879 Initialize bwr.read_buffer in IPCThreadState::talkWithDriver.
I/valgrind( 1309): ==1310== Syscall param
ioctl(BINDER_WRITE_READ).read_buffer points to uninitialised byte(s)
I/valgrind( 1309): ==1310==    at 0x480E670: __ioctl (__ioctl.S:10)
I/valgrind( 1309): ==1310==  Address 0xbda651b4 is on thread 1's stack

Change-Id: I02893df7b5786b6b2dbd9659f5706d7171295ab2
2011-12-01 17:11:32 -08:00
Stephen Hines
976ae27270 Add support for handling a bitcode wrapper to librs.
BUG=5425905

Change-Id: I75676060703df6d9043b287fea900c4379455ee2
2011-12-01 16:37:00 -08:00
Romain Guy
d21b6e1fe3 Optimize away unnecessary state changes
Change-Id: I0f6816f9f6234853575ecee5033186ad19e76380
2011-11-30 20:21:23 -08:00
Mathias Agopian
993b2099ce am 55d3880e: am bb1e7d43: Merge changes I7e973a35,Ib3386fcc into ics-mr1
* commit '55d3880eed3450748eb7b97281e030902ee29c2a':
  SurfaceTexture: add EGL_KHR_fence_sync option
  SurfaceTexture: add a blit-to-FBO test
2011-11-30 10:50:52 -08:00
Jamie Gennis
77cec6132a SurfaceTexture: add EGL_KHR_fence_sync option
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.

Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
2011-11-29 17:09:01 -08:00
Jamie Gennis
d6c938f04e SurfaceTexture: add a blit-to-FBO test
This change adds a test for blitting (via GL rendering) from a
SurfaceTexture to an FBO.

Change-Id: Ib3386fcc3f37153277f3e37a26347441bb80ab58
2011-11-29 14:52:36 -08:00
Mathias Agopian
79f39eb460 Add support for sending VSYNC events to the framework
use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.

Bug: 1475048
Change-Id: Ia720f64d1b950328b47b22c6a86042e481d35f09
2011-11-29 13:10:25 -08:00
Mathias Agopian
f9e88fbee0 Fix build.
Revert "Add support for sending VSYNC events to the framework"

This reverts commit f3918c5bd4bc9f02f74da42995564150ca2dd382.

Change-Id: I998e3e1aa3fa310829ae973b64fe11b01f6f468f
2011-11-29 13:07:40 -08:00
Mathias Agopian
aa2892edc7 Merge changes If4126023,Iacda2386,I1eb691f7,Ib56139f8
* changes:
  Add support for sending VSYNC events to the framework
  BitTube::read now handles EAGAIN
  split ComposerService out of SurfaceComposerClient.h
  rewrite SF's message loop on top of Looper
2011-11-29 11:47:03 -08:00
Mathias Agopian
f3918c5bd4 Add support for sending VSYNC events to the framework
use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.

Bug: 1475048
Change-Id: If4126023fc9c067e56087ec7d16a8fd542ce1794
2011-11-29 11:44:05 -08:00
Mathias Agopian
bb9ba8bae5 BitTube::read now handles EAGAIN
Change-Id: Iacda2386342ba0727bbf278f6c597488d5467bb8
2011-11-29 11:42:59 -08:00
Romain Guy
cb52d67600 am 02e88f23: am 46685db9: Merge "Fix crash in existing applications Bug #5659476" into ics-mr1
* commit '02e88f23a65c602e83d7a46c0925e653b948e418':
  Fix crash in existing applications Bug #5659476
2011-11-28 16:11:27 -08:00
Romain Guy
46685db957 Merge "Fix crash in existing applications Bug #5659476" into ics-mr1 2011-11-28 16:06:52 -08:00
Chet Haase
d3ea6b40bb am 38928899: am 8990cb57: Merge "Fix flashing wifi dialog after rotating back from landscape." into ics-mr1
* commit '3892889952b0ad3fa0b095c96d8ae2ae110585e2':
  Fix flashing wifi dialog after rotating back from landscape.
2011-11-28 15:47:16 -08:00
Mathias Agopian
3f15700a01 split ComposerService out of SurfaceComposerClient.h
Change-Id: I1eb691f7ca263d5895d871ab675bb5826e0323c6
2011-11-28 15:21:57 -08:00
Chet Haase
08837c246c Fix flashing wifi dialog after rotating back from landscape.
There was an error in some of the OpenGL layer logic such that we would
occasionally set up a layer for rendering and then not clean up when it was
done. This caused future OpenGL rendering to go into that layer instead of
to the buffers being displayed on the screen, resulting in artifacts including
flashes and displaying of stale content. This happened specifically when
using the wifi settings dialog with the InputMethod keyboard displayed,
but it was probably visible in other situations as well.

Issue #5628248: Flickering/flashing after entering password for WiFi

Change-Id: I38139f620b310f4309570fa7224552d2ee633999
2011-11-28 15:19:22 -08:00
Romain Guy
ff98fa5a84 Fix crash in existing applications
Bug #5659476

The FontRenderer was not cleaning up its temporary state, leading
to crashes when invoking renderDropShadow.

Change-Id: I43b24820dd5625af8c080bbe11b64de2f74164b2
2011-11-28 14:55:56 -08:00
Logan Chien
12be3fff12 Remove dead code.
Change-Id: I2838a40026291e7345b07911af3ba17278b63ffe
2011-11-27 08:42:11 +08:00
Jeff Brown
8a743d90a9 Merge "Add a basic hashtable data structure, with tests!" 2011-11-23 15:32:09 -08:00
Stephen Hines
e7d17220be Merge "Add support for handling a bitcode wrapper to librs." 2011-11-23 13:58:13 -08:00
Stephen Hines
09ee7c80ea Add support for handling a bitcode wrapper to librs.
BUG=5425905

Change-Id: I75676060703df6d9043b287fea900c4379455ee2
2011-11-22 20:10:45 -08:00
Jeff Brown
9d61edcc0f Add a basic hashtable data structure, with tests!
The basic hashtable is intended to be used to support a variety
of different datastructures such as map, set, multimap,
multiset, linkedmap, generationcache, etc.

Consequently its interface is fairly primitive.

The basic hashtable supports copy-on-write style functionality
using SharedBuffer.

The change introduces a simple generic function in TypeHelpers for
specifying hash functions.  The idea is to add template
specializations of hash_type<T> next to the relevant data structures
such as String8, String16, sp<T>, etc.

Change-Id: I2c479229e9d4527b4fbfe3b8b04776a2fd32c973
2011-11-22 17:12:22 -08:00
Robert Ly
b1e72b6826 Merge "add overview description for RS API reference" 2011-11-22 16:21:45 -08:00
Jason Sams
dd39fdfe99 Fix script init error handling.
Change-Id: I7ceb0af4dfd12db0274985ff658f678d7af829ff
2011-11-22 13:17:18 -08:00
Jeff Brown
ec99c62e8b Merge "Use libcorkscrew to format the stack trace." 2011-11-22 12:57:08 -08:00
Romain Guy
c28e574037 am a2fabf4a: am 303a0695: Merge "Draw in the correct FBO after invoking a GL functor Bug #5650514" into ics-mr1
* commit 'a2fabf4a109d46f99ff7370aa05e48c1708c2838':
  Draw in the correct FBO after invoking a GL functor Bug #5650514
2011-11-22 12:42:06 -08:00
Romain Guy
303a0695b8 Merge "Draw in the correct FBO after invoking a GL functor Bug #5650514" into ics-mr1 2011-11-22 12:33:17 -08:00
Robert Ly
77228be417 add overview description for RS API reference
Change-Id: Id5554c607ad4c435f92bfa939e4ce4833a638f62
2011-11-22 09:45:16 -08:00
Mathias Agopian
4c6d112c16 am cc4d02e0: am 07a2d831: Merge "don\'t report an error when disconnecting from an abandoned surfacetexture" into ics-mr1
* commit 'cc4d02e0cbb99341a0508838c88eeef53180fdfd':
  don't report an error when disconnecting from an abandoned surfacetexture
2011-11-21 21:08:47 -08:00
Mathias Agopian
29c18ca579 am 8390cf39: am 8646cd42: Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1
* commit '8390cf39f8a4f74f7baa91d23cba06894a3fb9b5':
  enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
2011-11-21 21:08:44 -08:00
Jamie Gennis
07f062b627 am c2597295: am 53cf2020: Merge changes I37fd43b5,I91eb29db,I0491ce35 into ics-mr1
* commit 'c25972950c2ea62fb085524dbe737c2bf0f08f4a':
  SurfaceTexture: fix a couple tests
  EGL: default to swap interval 1
  SurfaceTexture: clean up some tests
2011-11-21 21:08:21 -08:00
Jeff Brown
38a931fcd3 Use libcorkscrew to format the stack trace.
Change-Id: I3a5439ada76bc77c2dd491eaed2272e16a811cc7
2011-11-21 21:04:55 -08:00
Mathias Agopian
07a2d83190 Merge "don't report an error when disconnecting from an abandoned surfacetexture" into ics-mr1 2011-11-21 17:57:31 -08:00
Mathias Agopian
8646cd42df Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1 2011-11-21 17:57:20 -08:00