4903 Commits

Author SHA1 Message Date
Chris Craik
55709fc1c7 am 55b883b0: am 30c990c3: Merge "Draw Operation merging" into jb-mr2-dev
* commit '55b883b0a960b37aa453253f3ccb614dd95c221c':
  Draw Operation merging
2013-04-15 14:34:35 -07:00
Chris Craik
30c990c361 Merge "Draw Operation merging" into jb-mr2-dev 2013-04-15 21:27:11 +00:00
Chris Craik
527a3aace1 Draw Operation merging
Merge simple bitmap draw operations and text operations to avoid
issuing individual gl draws for each operation. Merging other ops to
be done eventually.

The methods are different - the bitmap merging generates a single
mesh for reused, unclipped images (esp. repeated images in a listview)

The text approach queries just defers the normal font rendering until
the last drawText in the sequence that can share the same shader.

Patches are sorted and merged, but don't yet have a multiDraw
implementation. For now, the pretending-to-merge gives better sorting
behavior by keeping similar patches together.

Change-Id: Ic300cdab0a53814cf7b09c58bf54b1bf0f58ccd6
2013-04-15 13:53:02 -07:00
Romain Guy
5069101c08 am 5141bf80: am 80fccb4d: Merge "There should be a mandatory coder\'s license. Bug #8586560" into jb-mr2-dev
* commit '5141bf801e9d58e618c76e4cdc042218b24193fc':
  There should be a mandatory coder's license. Bug #8586560
2013-04-12 18:05:48 -07:00
Romain Guy
80fccb4dda Merge "There should be a mandatory coder's license. Bug #8586560" into jb-mr2-dev 2013-04-13 00:37:37 +00:00
Dianne Hackborn
11dc37686f am 18e99d1d: am 15fed390: Merge "Add new resources trace, also trace apk dex loading." into jb-mr2-dev
* commit '18e99d1d5f7bb2e35fb9f5c3edbb4265d66e3d93':
  Add new resources trace, also trace apk dex loading.
2013-04-12 17:06:37 -07:00
Dianne Hackborn
15fed390c4 Merge "Add new resources trace, also trace apk dex loading." into jb-mr2-dev 2013-04-12 23:58:50 +00:00
Romain Guy
4abab937bf There should be a mandatory coder's license.
Bug #8586560

And I don't deserve to pass the test.

Change-Id: Ic7886205511f16145a925fc860e4a03dfaf473d5
2013-04-12 16:51:21 -07:00
Romain Guy
0f6ba07732 am 543c5dcf: am efcb252f: Merge "Properly computer gradient textures width" into jb-mr2-dev
* commit '543c5dcfcb93925a5b9ac073eedb0bd813b2ebe0':
  Properly computer gradient textures width
2013-04-12 16:49:14 -07:00
Romain Guy
95aeff8f11 Properly computer gradient textures width
Only on devices that do not have the npot extension

Change-Id: I472a13dc707d2abaf5fcc06f99c9da343b333558
2013-04-12 16:32:05 -07:00
Dianne Hackborn
f7be4800df Add new resources trace, also trace apk dex loading.
Change-Id: Ia48566efb21ee018659bd976ddb3a0f4997b9a3a
2013-04-12 14:53:10 -07:00
Romain Guy
e48da96ab5 resolved conflicts for merge of 886e1204 to master
Change-Id: Id002d2ae799c6946672335f122ecbfa07d9c0bc1
2013-04-12 11:00:21 -07:00
Romain Guy
cf51a41998 Introduce PixelBuffer API to enable PBOs
PBOs (Pixel Buffer Objects) can be used on OpenGL ES 3.0 to perform
asynchronous texture uploads to free up the CPU. This change does not
enable the use of PBOs unless a specific property is set (Adreno drivers
have issues with PBOs at the moment, Mali drivers work just fine.)

This change also cleans up Font/FontRenderer a little bit and improves
performance of drop shadows generations by using memcpy() instead of
a manual byte-by-byte copy.

On GL ES 2.0 devices, or when PBOs are disabled, a PixelBuffer instance
behaves like a simple byte array. The extra APIs introduced for PBOs
(map/unmap and bind/unbind) are pretty much no-ops for CPU pixel
buffers and won't introduce any significant overhead.

This change also fixes a bug with text drop shadows: if the drop
shadow is larger than the max texture size, the renderer would leave
the GL context in a bad state and generate 0x501 errors. This change
simply skips drop shadows if they are too large.

Change-Id: I2700aadb0c6093431dc5dee3d587d689190c4e23
2013-04-11 14:07:34 -07:00
Chet Haase
c4c8f2d82e am 78b24b6f: am dacd4751: Merge "Fix Contacts animation jank" into jb-mr2-dev
* commit '78b24b6f03f467a59afd6797b4c03224fe3af767':
  Fix Contacts animation jank
2013-04-10 11:01:31 -07:00
Chet Haase
dacd475163 Merge "Fix Contacts animation jank" into jb-mr2-dev 2013-04-10 17:49:56 +00:00
Chet Haase
58d110afa0 Fix Contacts animation jank
The last frame of an animation stays stuck on the screen for a couple of frames.
Specifically, the "Quick Contact" animation that animates the picture
closed (fades/scales it away) animates all the way to the end... then hangs there
briefly before being taken down.

The problem is a rendering bug where we correctly detect that a DisplayList
has nothing to draw (since the last frame is completely transparent, alpha==0),
but incorrectly ignore the fact that we cleared the transparent-background
window prior to not-drawing that DisplayList. When we detect that there's
nothing to draw, we don't bother swapping buffers. So even though we drew
the right thing (clearing the buffer), we didn't actually post the buffer to the
screen.

This change factors in both the clear and the draw to decide when to swap buffers.

Issue #8564865 Quick contact close animation jank redux

Change-Id: Ib922cff88a94f025b62f7461c1a29e96fe454838
2013-04-10 07:43:29 -07:00
Ying Wang
28af35e8cd resolved conflicts for merge of a976bddd to master
Change-Id: I64e1cbfb0eee891ce4d1eee40eefdcedcc501f7f
2013-04-09 23:21:42 -07:00
Ying Wang
d8b26d6c42 Merge "Add liblog" into jb-mr2-dev 2013-04-10 05:16:14 +00:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Romain Guy
6c825d49b7 am 52706c6c: am 4a745e78: Merge "Change the dither texture\'s swizzling" into jb-mr2-dev
* commit '52706c6cc0d8ded20cfa8d46f200ca38f1009468':
  Change the dither texture's swizzling
2013-04-09 14:26:10 -07:00
Romain Guy
032d47af73 Change the dither texture's swizzling
This is a more elegant way to sample from a float alpha texture.
Instead of sampling from the red channel in the fragment shader
we can set the alpha channel swizzle to redirect it to the
red channel. This lets us sample from the alpha channel in the
fragment shader and get the correct value.

Change-Id: I95bbf7a82964e1bf42c0fee1b782b6bdbbcef618
2013-04-09 10:12:47 -07:00
Michael Wright
8775af6319 am aaddfacf: am bdb706e4: Merge "Pipe through device resolution information" into jb-mr2-dev
* commit 'aaddfacf962655d82f3ad64723ea408f949a2b79':
  Pipe through device resolution information
2013-04-05 15:46:40 -07:00
Romain Guy
6adbb90335 am 5ea0465d: am 8299f683: Merge "Use float textures to render gradients when possible" into jb-mr2-dev
* commit '5ea0465d4550944e2e5ac953a5c18ef31f31ec4d':
  Use float textures to render gradients when possible
2013-04-05 15:46:37 -07:00
Michael Wright
bdb706e48d Merge "Pipe through device resolution information" into jb-mr2-dev 2013-04-05 21:43:31 +00:00
Romain Guy
8299f683f3 Merge "Use float textures to render gradients when possible" into jb-mr2-dev 2013-04-05 21:31:57 +00:00
Romain Guy
b488004289 Use float textures to render gradients when possible
Float textures offer better precision for dithering.

In addition this change removes two uniforms from gradient shaders.
These uniforms were used to dither gradients but their value is
a build time constant. Instead we hardcode the value directly in
the shader source at compile time.

Change-Id: I05e9fd3eef93771843bbd91b453274452dfaefee
2013-04-05 14:17:17 -07:00
Jeff Brown
ae9d6aa6d9 am 4c2a7b23: am 4a706bc6: Merge "Correctly manage the lifecycle of IME InputChannels." into jb-mr2-dev
* commit '4c2a7b23f5f012cf00357035f840a32d4da20eb5':
  Correctly manage the lifecycle of IME InputChannels.
2013-04-05 14:09:41 -07:00
Jeff Brown
4a706bc6f1 Merge "Correctly manage the lifecycle of IME InputChannels." into jb-mr2-dev 2013-04-05 20:57:01 +00:00
Jeff Brown
1951ce86c2 Correctly manage the lifecycle of IME InputChannels.
InputChannels are normally duplicated when sent to a remote process
over Binder but this does not happen if the recipient is running within
the system server process.  This causes problems for KeyGuard because the
InputMethodManagerService may accidentally dispose the channel
that KeyGuard is using.

Fixed the lifecycle of InputChannels that are managed by the IME
framework.  We now return a duplicate of the channel to the application
and then take care to dispose of the duplicate when necessary.
In particular, InputBindResult disposes its InputChannel automatically
when returned through Binder (using PARCELABLE_WRITE_RETURN_VALUE).

Bug: 8493879
Change-Id: I08ec3d13268c76f3b56706b4523508bcefa3be79
2013-04-04 22:45:12 -07:00
Michael Wright
c6091c64c9 Pipe through device resolution information
Bug: 8424494
Change-Id: Iafeeee0d5cd29342c1cdc86b9616222aaa5d1b94
2013-04-04 18:10:37 -07:00
Romain Guy
f7648b7f24 am 21af446c: am a151ef8c: Merge "First OpenGL ES 3.0 based optimization" into jb-mr2-dev
* commit '21af446ce9704bdc465bf15755148c5de50ea019':
  First OpenGL ES 3.0 based optimization
2013-04-04 16:01:59 -07:00
Romain Guy
a151ef8c66 Merge "First OpenGL ES 3.0 based optimization" into jb-mr2-dev 2013-04-04 22:51:38 +00:00
Chris Craik
59f5015fc3 am 233f6730: am de4f8c38: Merge "Traverse layers in update order" into jb-mr2-dev
* commit '233f67302e7d35242613c5d4502459b085868595':
  Traverse layers in update order
2013-04-04 15:35:06 -07:00
Chris Craik
de4f8c3872 Merge "Traverse layers in update order" into jb-mr2-dev 2013-04-04 22:27:00 +00:00
Chris Craik
1206b9bba9 Traverse layers in update order
bug:8540150

Layers now require traversal in update order, as it will be child
first, then parent for layer-in-layer

Fixes issue with deferred layer playback not flushing in order, and
thus child not painting before parent

Also fixes DisplayList to only be cleared after flush in deferred list

Change-Id: I2f284d00079cdb20798aeef6a1c94e823940db40
2013-04-04 14:55:43 -07:00
Romain Guy
0908764b2b First OpenGL ES 3.0 based optimization
This change uses a new OpenGL ES 3.0 feature to upload less data when
the font cache needs to be update. This can result in significant
performance improvements on device with large textures or with locales
that use a lot of glyphs (CJK for instance.)

This change also fixes various unpack alignment issues. The unpack
alignment, as well as the unpack row length, is not texture specific
but a global state that affect all glTex/SubImage2D calls. Some of
them were missing the appropriate glPixelStorei() call. This could
result in corrupted textures.

Change-Id: Iefb429d4d0d0b4e0faeadf27daafee6d30a21d85
2013-04-04 12:27:54 -07:00
Romain Guy
2a54c185a6 am ae74f598: am eaadd123: Merge "Add internal API to query GL version number" into jb-mr2-dev
* commit 'ae74f59856d4f790c173857bb8024291d585861d':
  Add internal API to query GL version number
2013-04-04 11:03:19 -07:00
Romain Guy
eaadd123a7 Merge "Add internal API to query GL version number" into jb-mr2-dev 2013-04-04 17:53:06 +00:00
Romain Guy
df1dc28ba0 Add internal API to query GL version number
Change-Id: Idc02efc237b8e97445a9bab05c291bf193c7f279
2013-04-04 10:50:48 -07:00
Dan Morrill
e4d9a01bfc Phase 1 of refactoring SystemServer.
SystemServer is currently a monolithic class that brings up key system
services. This change is the first phase of refactoring it to be more
configurable. Specifically, it adds a set of on/off switches used to control
startup of individual services. Future plans include finer grained controls
and a more explicit and consistent startup sequence for these services.

Change-Id: I7299f5ce7d7b74a34eb56dffb788366fbc058532
2013-04-04 09:49:22 -07:00
Chris Craik
ff7ae2dccd Merge "Correct save/restore match up" into jb-mr2-dev 2013-04-03 20:31:49 +00:00
Chris Craik
e0b39fc18c Merge "Account for hairlines in quick rejection logic" into jb-mr2-dev 2013-04-03 19:43:47 +00:00
Chris Craik
1ed30c907f Correct save/restore match up
bug:8480642

With the additional save/restore around the operations in flush, the
stored restore batches weren't matching up to the correct saves.

Change-Id: I2f48f19009bd97289b6973283f43dc8d3e35affd
2013-04-03 12:37:35 -07:00
Chris Craik
e7c69c6fe3 Account for hairlines in quick rejection logic
bug:8531373
Change-Id: I35444014f23fc61da687694fccc0d13bce718793
2013-04-03 09:55:48 -07:00
Chris Craik
16ecda5317 Update view's alpha and layer docs
bug:8501661

Makes the performance issues and interaction with layer type/paint
more clear.

Additionally, corrects change from 47ab7d6612e2b5b8b66fb261dafef7c91264e173
to still allow displayList alpha to override layer paint

Change-Id: Ic94d75865700820489370461cd8ac9f9077a8d90
2013-04-01 17:21:35 -07:00
Romain Guy
02b49b70ed Prevent crash when a single layer is enqueued several times for updates
Bug #8504687

Change-Id: I9b01bbc4e3f37af23dfe5e68d3d03ad3d238b94a
2013-03-29 12:37:16 -07:00
Romain Guy
5399a5648f Merge "Update layers to clear them Bug #8489505" into jb-mr2-dev 2013-03-28 23:42:41 +00:00
Elliott Hughes
94eaab4a5d am 3ae30483: am a19647d3: Merge "Correct executable bit for source files [Take 2]"
* commit '3ae30483777708ff3a4f59a4fa75c6a76213cc30':
  Correct executable bit for source files [Take 2]
2013-03-28 14:29:21 -07:00
Chris Craik
dc1975ea71 Merge "Fix issues related to saveLayer/restore deferral" into jb-mr2-dev 2013-03-28 20:46:47 +00:00
Romain Guy
696dcf84a3 Update layers to clear them
Bug #8489505

A layer should be updated even with an empty deferred display list. It is
possible for a layer to request an update just to execute a clear which
will be handled by LayerRenderer::prepareDirty().

Change-Id: Iffb98bd71d6caa8d4a701df98197676f9423c0c2
2013-03-28 13:06:58 -07:00