3936 Commits

Author SHA1 Message Date
Stephen Hines
e3f9cc6761 Don't wait forever if there are no commands to execute.
BUG=5614887

This fixes a timing issue where we could calculate a delay of 0 (indicating
wait forever) when we have no pending commands to actually execute. In such
cases, we should just break out of the playback loop.

This also fixes a small issue with returning whether or not to redraw.

Change-Id: Id1e481679341773256b7287062c68925e2bc8f9e
2012-01-26 17:32:09 -08:00
Stephen Hines
109116bb2f Fix bugs with unsigned rsAtomicCas/Max/Min.
BUG=5888007

rsAtomicMax/Min did not have proper semantics for unsigned integers. They were
always using signed comparisons. rsAtomicCas had the wrong function signature
in our math library, leading to no way to properly link/execute it.

Change-Id: I336cdd8cd9f2d8093f12e101b55b2797515f039b
2012-01-25 18:17:34 -08:00
Romain Guy
eb9a5367e8 First pass at implementing Canvas.drawPosText() in GL
Change-Id: Ia3ac347e95d57eb86c63045156c8dbc0572b03cb
2012-01-17 17:39:26 -08:00
Stephen Hines
d36f7d2495 Merge "Add support for new root.expand() calls." 2012-01-13 13:57:24 -08:00
Glenn Kasten
1e80869133 Get AID_GRAPHICS from right place
Change-Id: I97b1754dc7260fec083275c71a8f71ebfb2cefa8
2012-01-13 13:45:39 -08:00
Stephen Hines
6b4cf07cab Add support for new root.expand() calls.
BUG=5444144

Change-Id: I9ab942561a03e9f837a3199457259bb3e07ac76f
2012-01-12 18:56:43 -08:00
Mathias Agopian
0db7590ed2 remove dead/usnused code
Change-Id: I6fa2bc6ee01790abd2c1533f043d61a5e5c8d26e
2012-01-11 22:03:41 -08:00
Steve Block
ec193dec4d Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE
See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
2012-01-09 21:36:22 +00:00
Steve Block
3762c31172 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-01-08 13:19:13 +00:00
Steve Block
8564c8da81 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
2012-01-06 10:07:54 +00:00
Fabrice Di Meglio
d4a69b4a1c Merge "Fix bug #5753006 Garbled Labels in Maps" 2012-01-05 15:18:52 -08:00
Steve Block
bd47cac4df Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE" 2012-01-05 14:07:02 -08:00
Fabrice Di Meglio
c511bee87c Fix bug #5753006 Garbled Labels in Maps
- it was a regression introduced into this CL: https://android-git.corp.google.com/g/#/c/154240/5
- basically needed to set the GlyphID encoding to the Skia Paint as we are now using glyphID resulting
from the Harfbuzz shaping
- also define GlyphID encoding as the default on the Paint class

Change-Id: Idb7c2c57ac67595425ce3be9421258962690fcdd
2012-01-05 13:30:54 -08:00
Glenn Kasten
a8719ad9d5 Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros" 2012-01-05 07:38:29 -08:00
Glenn Kasten
e80a4ccd2b Use the standard CC_LIKELY and CC_UNLIKELY macros
Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose.  So rename the private
uses to use the standard names.

In addition, AudioFlinger was relying on the macro expanding to extra ( ).

Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
2012-01-05 07:33:45 -08:00
Steve Block
6215d3ff4b Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-01-04 20:05:49 +00:00
Steve Block
5baa3a62a9 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2012-01-03 22:38:27 +00:00
Romain Guy
82bc7a7727 Properly restore the GL scissor after a GL draw functor
Bug #5781254

Change-Id: I1dc4809563a793b6b579814951d4d73b4c34bf32
2012-01-03 14:14:55 -08:00
Chet Haase
0faa055639 Merge "De-allocate caches for large glyphs when trimming memory" 2011-12-17 10:20:14 -08:00
Chet Haase
9a8245629d De-allocate caches for large glyphs when trimming memory
Currently, font renderers eliminate some texture caches when
memory is trimmed. This change makes it go further by eliminating the
large-glyph caches for all font renderers. These caches are
only allocated as needed, but continue to consume large amounts of
memory (CPU and GPU) after that allocation. De-allocating this memory
on a trim operation should prevent background apps from holding onto
this memory in the possible case that they have allocated it by drawing
large glyphs.

Change-Id: Id7a3ab49b244e036b442d87252fb40aeca8fdb26
2011-12-16 15:44:59 -08:00
Jeff Brown
1b67852823 Merge "Fix invalid madvise() during concurrent alloc/dealloc of MemoryDealer" 2011-12-16 14:35:16 -08:00
Chet Haase
0904c203c4 Merge "Fix issues from recent glyph caching change" 2011-12-16 06:49:59 -08:00
Chet Haase
2a47c14e2a Fix issues from recent glyph caching change
There were 2 issues remaining after a recent change to support
glyph caching from multiple textures:
- memory in the GPU for all textures was being allocated automatically.
This is now lazy, being allocated only when those textures are first
needed.
- filtering (applied when a rendered object is transformed) was ignoring
the new multiple-texture structure. Filtering should be applied correctly
whenever we change textures.

Change-Id: I5c8eb8d46c73cd01782a353fc79b11cacc2146ab
2011-12-15 15:43:02 -08:00
Romain Guy
8f85e80b64 Generate even fewer GL commands
Change-Id: I0f4dcacb03ef5ee7f6ebd501df98bfead5f0a7f8
2011-12-14 19:23:32 -08:00
Ji-Hwan Lee
c17d9b75b6 Fix invalid madvise() during concurrent alloc/dealloc of MemoryDealer
Currently, madvise(MADV_REMOVE) is called after deallocation.
Another thread might allocate (and even write) the same region between
deallocation and madvise(), in which case the new thread will fail to read
what it have written.  So, call deallocate() after madvise(MADV_REMOVE).

Bug: 5654596
Change-Id: I26f36cd6013de499090768a0ddc68206a4a68219
2011-12-15 04:37:22 +09:00
Romain Guy
2d4fd36484 Reduce the number of active texture changes
Change-Id: I94046bdfe20740c26c8183822e3002d692fde7c4
2011-12-13 22:00:19 -08:00
Romain Guy
ec31f83bd3 <Insert something improper about OpenGL>
Change-Id: Ib645376093838156771588adc76a718da0ceb0db
2011-12-13 18:41:12 -08:00
Romain Guy
a1d3c91afb Further reduce the number of GL commands sent to the driver
Change-Id: Id922b2a166ea4573b767c27d3195e11c70320b23
2011-12-13 14:58:14 -08:00
Chet Haase
e829bc0f03 Merge "Make glyph cache more flexible" 2011-12-13 14:03:43 -08:00
Chet Haase
7de0cb12d0 Make glyph cache more flexible
Some GPU architectures could not handle the previous implementation
of our glyph cache. Frequent uploads would cause memory problems in the GPU
and eventually a crash due to these memory issues. The solution is to move to
a system of several, smaller caches instead of one monolythic cache for all
glyphs.

Change-Id: I0fc7a323360940d16d5a33eeb33abfab194c5920
2011-12-13 13:41:58 -08:00
Romain Guy
15bc6437f8 Reduce the number of GL commands generated by the UI
This optimization along with the previous one lets us render an
application like Gmail using only 30% of the number of GL commands
previously required

Change-Id: Ifee63edaf495e04490b5abd5433bb9a07bc327a8
2011-12-13 13:11:32 -08:00
Romain Guy
5009f65c9a Merge "Optimize state changes" 2011-12-12 20:36:22 -08:00
Romain Guy
f3a910b423 Optimize state changes
Change-Id: Iae59bc8dfd6427d0967472462cc1994987092827
2011-12-12 20:35:21 -08:00
Romain Guy
da7642b31b Merge "Minimize the amount of data uploaded to draw text" 2011-12-12 19:04:40 -08:00
Romain Guy
51fbb00966 Merge "Various OpenGL optimizations" 2011-12-12 19:04:32 -08:00
Romain Guy
d71dd367af Minimize the amount of data uploaded to draw text
Change-Id: I6313ac039291c9cd93aadafe3566ad9d60cab42d
2011-12-12 19:03:35 -08:00
Romain Guy
39d252a663 Various OpenGL optimizations
Change-Id: Ib0742c96f10f5f50e7e5148b742c31b6c232d127
2011-12-12 18:14:06 -08:00
Romain Guy
d2ea737a1f Merge "Remove leftover debugging code" 2011-12-12 16:50:55 -08:00
Romain Guy
f44e66fcf7 Remove leftover debugging code
Change-Id: I1589af7991da36744071d5081daa24ebae5b4dfd
2011-12-12 16:50:13 -08:00
Romain Guy
ebb2c6b36d Merge "Keep shaders to render properly" 2011-12-12 16:49:40 -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
Jamie Gennis
f08403ba92 am 74e0fcae: am a1dee3f5: Merge "SurfaceTexture: fix a verbose-log compile error" into ics-mr1
* commit '74e0fcaed1cd20ae8632224ff5a5404ff1a6e497':
  SurfaceTexture: fix a verbose-log compile error
2011-12-12 16:10:28 -08:00
Romain Guy
6752d0ab02 Mark color uniform fetched after fetching it
Change-Id: I10e8027018608070a536eb8b51c7a4272e37006c
2011-12-12 12:15:17 -08:00
Jamie Gennis
798b9cdf8c SurfaceTexture: fix a verbose-log compile error
Change-Id: I045231207e068d950bb0cb5085717af5d9454ed1
2011-12-09 15:07:44 -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