6151 Commits

Author SHA1 Message Date
Chris Craik
e938707a64 am 78558652: am e46cfca2: Merge "hwui: Caches: use mBoundTextures only for GL_TEXTURE_2D" into lmp-dev
* commit '785586526d97aab356acbcb4d8b4a79904ff3424':
  hwui: Caches: use mBoundTextures only for GL_TEXTURE_2D
2014-09-09 21:55:44 +00:00
Chris Craik
b2201151f3 Merge "hwui: Caches: use mBoundTextures only for GL_TEXTURE_2D" into lmp-dev 2014-09-09 20:03:09 +00:00
Fred Fettinger
70735bd5dd hwui: Caches: use mBoundTextures only for GL_TEXTURE_2D
bug:17441218

GLConsumer uses glBindTexture() directly instead of going through
Caches::bindTexture(). This can cause libhwui to draw with the wrong
texture bound in the following case which involves 2 TextureViews:

Frame 1:
GLConsumer::updateTexImage() calls glBindTexture(GL_TEXTURE_EXTERNAL_OES, 1)
HWUI renders TextureView A:
    calls Caches::bindTexture(GL_TEXTURE_EXTERNAL_OES, 1) and draws

Frame 2:
GLConsumer::updateTexImage() calls glBindTexture(GL_TEXTURE_EXTERNAL_OES, 1)
GLConsumer::updateTexImage() calls glBindTexture(GL_TEXTURE_EXTERNAL_OES, 2)
HWUI renders TextureView A:
    calls Caches::bindTexture(GL_TEXTURE_EXTERNAL_OES, 1) and draws
HWUI renders TextureView B:
    calls Caches::bindTexture(GL_TEXTURE_EXTERNAL_OES, 2) and draws

In this case, HWUI will incorrectly draw TextureView A using texture 2 on
frame 2, because mBoundTextures[0]=1, even though the texture currently
bound to GL_TEXTURE_EXTERNAL_OES is 2.

Since GLConsumer is always used with a target of GL_TEXTURE_EXTERNAL_OES,
work around this problem by having mBoundTextures[] store only the
textures bound to the target GL_TEXTURE_2D. This is the common case
where the extra performance is needed. Since it's legal to have
different textures bound to GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES
on one texture unit, Caches::bindTexture() does not need to clear
mBoundTextures[mTextureUnit] when target != GL_TEXTURE_2D.

Change-Id: I8bc54ab8adcfacad7f3ed17a31236dc7a86c967a
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
2014-09-09 20:00:52 +00:00
Chris Craik
a23fc5877b am 70cf8fba: am c9071002: Merge "Fix tessellation bounds computation" into lmp-dev
* commit '70cf8fba276269c6d162819bf4cbcdf06f6d22ea':
  Fix tessellation bounds computation
2014-09-09 18:47:43 +00:00
Chris Craik
69fb8a2399 Merge "Fix tessellation bounds computation" into lmp-dev 2014-09-09 18:34:08 +00:00
Dan Albert
20ec4fa229 resolved conflicts for merge of 6c585756 to lmp-dev-plus-aosp
Change-Id: I5a25f2bac44ac5efcd7462af91005e09680a1d96
2014-09-08 22:25:54 -07:00
Dan Albert
2ffa4aabd7 Merge "Use char16_t for char things." 2014-09-09 04:30:35 +00:00
Chris Craik
21bcfc4ff8 Fix tessellation bounds computation
bug:17401066

Now correctly accounts for scale, both in hairline case (where scale
needs to be accounted for), and in standard case (where scale
shouldn't be applied, since bounds are in local space)

Change-Id: I597a20834dce42ddb741b46e4c1a4f3169a48ccc
2014-09-08 18:43:30 -07:00
Dan Albert
be23d47d1c Make string literal concatenation play nice with C++11.
In C++11 mode, "foo"MACRO_THAT_EXPANDS_TO_STRING gets lexed as a user
defined literal. Add space around the macro.

Change-Id: I24fbe1fda483db4a8c606e80dbe17430ad070dc2
2014-09-08 18:38:35 -07:00
Dan Albert
f348c15ecf Use char16_t for char things.
When compiling in C++ mode, the compiler will complain about conversions
from uint16_t to char16_t. Be consistent in using char16_t for strings.

Change-Id: I052b6176ced635162920b31560052d9a64f92764
2014-09-08 18:30:08 -07:00
Chris Craik
edc121c249 am 63fe87ff: am 2d0c82ad: Merge "Don\'t track TextureLayer lifecycles in RenderState" into lmp-dev
* commit '63fe87ffece32b234323322621467b6bbb3b1b6f':
  Don't track TextureLayer lifecycles in RenderState
2014-09-09 00:04:27 +00:00
Chris Craik
8a226d24b8 Don't track TextureLayer lifecycles in RenderState
bug:17208461

They are destroyed via finalizer-enqueued destroy method, so it's not
valid to check that they've been destroyed at gl context destruction
time.

Change-Id: I670f69825547facd5f31d44acb406418881fee00
2014-09-08 16:44:47 -07:00
Chris Craik
7273458a14 am f3f42ada: am 8bc6e915: Merge "Fix save count offsetting within DisplayList chunks" into lmp-dev
* commit 'f3f42ada99cb0fcd9901714221ca09f18e512f89':
  Fix save count offsetting within DisplayList chunks
2014-09-08 18:36:38 +00:00
Chris Craik
5f5df97df9 Merge "Fix save count offsetting within DisplayList chunks" into lmp-dev 2014-09-08 17:09:01 +00:00
Chris Craik
c166b6c4fc Fix save count offsetting within DisplayList chunks
bug:17388541
Change-Id: I7cb1139b8cd30f72ae7c6de2074c3c5865b8f309
2014-09-05 19:55:30 -07:00
John Reck
ab95330acf am bf6afec1: am fd289c1c: Merge "Disable RT-anim for AnimatorSet" into lmp-dev
* commit 'bf6afec12bf123684c7e4893465dd8e1d13817bd':
  Disable RT-anim for AnimatorSet
2014-09-06 00:39:35 +00:00
John Reck
3207ffe120 Merge "Disable RT-anim for AnimatorSet" into lmp-dev 2014-09-06 00:22:25 +00:00
John Reck
f5945a0c8b Disable RT-anim for AnimatorSet
Bug: 17317184

 Unfortunately this will disable *all* RT animations in a scene,
 but we don't have more selective targetting currently

Change-Id: I57e1c0ae43957f45229473bdcdaf34c05825fab7
2014-09-05 15:58:26 -07:00
John Reck
07d90c4866 am fa097eea: am 4a94f088: Merge "Fix race condition" into lmp-dev
* commit 'fa097eea8620158eef3592376afbcadca39b2e74':
  Fix race condition
2014-09-05 22:56:49 +00:00
Chris Craik
33f71d9b32 am 7ec137b7: am 6f6a8f2c: Merge "Add shadow/clipping properties to HierarchyViewer" into lmp-dev
* commit '7ec137b7f9edb41117f822ef16bdaf5accbcc31c':
  Add shadow/clipping properties to HierarchyViewer
2014-09-05 22:56:41 +00:00
Chris Craik
8db569764f am d6d88a21: am cde5e68d: Merge "Additional layer logging, and added mutex" into lmp-dev
* commit 'd6d88a21cfd226440b6e7f1f758a30d39b932a9e':
  Additional layer logging, and added mutex
2014-09-05 22:40:00 +00:00
John Reck
4e849178ef Merge "Fix race condition" into lmp-dev 2014-09-05 22:38:42 +00:00
Chris Craik
83eb430270 Merge "Add shadow/clipping properties to HierarchyViewer" into lmp-dev 2014-09-05 22:36:41 +00:00
John Reck
ec845a215e Fix race condition
Bug: 17372309

 AnimationContext::startFrame() happens both with and without
 the UI thread lock. Pass the TraversalMode into it so
 that ThreadedRenderer's subclass can correctly decide
 when it is safe to push over mPendingAnimatingRenderNodes, as doing
 so outside of the lock is Very Bad.

Change-Id: Ife5dd3a2b46b0a207cd9234c159a674afdbf5efd
2014-09-05 15:23:38 -07:00
Chris Craik
5c75c52e04 Add shadow/clipping properties to HierarchyViewer
bug:15777980

Change-Id: Ic3d24326f585d2d2b9889486f0ed322eb98b5af8
2014-09-05 15:23:08 -07:00
Chris Craik
599e254ea3 Additional layer logging, and added mutex
bug:17208461
Change-Id: I006d432a3b633235dde0b81ad2bf28b835b5335f
2014-09-05 15:17:11 -07:00
John Reck
4655420ba8 am 35137dd1: am 5347ddea: Merge "Yet more layer tracking logging" into lmp-dev
* commit '35137dd1bf8f0a46702b2927035401c2ab78685c':
  Yet more layer tracking logging
2014-09-05 02:12:04 +00:00
John Reck
6dad93eff6 Merge "Yet more layer tracking logging" into lmp-dev 2014-09-05 01:06:08 +00:00
John Reck
443a714fa7 Yet more layer tracking logging
Bug: 17208461

Change-Id: I55e7d0921eb565867e966d68b798b7b92c391b55
2014-09-04 17:40:05 -07:00
Chris Craik
600dc4393a am 323e213d: am b25a4d5f: Merge "Prioritize reveal clipping over Outline clipping" into lmp-dev
* commit '323e213d0aff4e4120ce183ac4c38d63b593ecee':
  Prioritize reveal clipping over Outline clipping
2014-09-04 21:26:02 +00:00
Chris Craik
2d3f9033f8 Merge "Prioritize reveal clipping over Outline clipping" into lmp-dev 2014-09-04 21:06:10 +00:00
Chris Craik
e83cbd4518 Prioritize reveal clipping over Outline clipping
bug:15780987
bug:17350602

Also update docs around clipping nesting behavior,
and some Z ordering behavior.

Change-Id: Iaa204350a0adfdcbd8c4b821fb4a9c0ae22f2613
2014-09-04 14:05:10 -07:00
Derek Sollenberger
8aed5f9032 am f19b8f33: am 5f535ec1: Merge "Remove invalid premul step from HWUI\'s matrix color filter." into lmp-dev
* commit 'f19b8f33d19a6aa35360d6f7d3bfdac97e9d09f6':
  Remove invalid premul step from HWUI's matrix color filter.
2014-09-04 15:19:12 +00:00
Derek Sollenberger
e23b8dd58f Merge "Remove invalid premul step from HWUI's matrix color filter." into lmp-dev 2014-09-04 15:01:28 +00:00
John Reck
cc7c225f1b am 7499abd2: am 73339a99: Fix some wrong-thread issues around animator management
* commit '7499abd2d4604e0bdbeb91ed6c7e0155fb51dc6b':
  Fix some wrong-thread issues around animator management
2014-09-04 00:59:19 +00:00
John Reck
e2478d45cc Fix some wrong-thread issues around animator management
Bug: 17372309

 Fixes a case where UI thread and RT thread both used the same method
 which wasn't safe for either of them.

 Adds additional assertions & logging in unusual circumstances to
 try and track down where the issue is occuring from.

Change-Id: I93d31a6fd0c5927259b67bdf96a475944226eee6
2014-09-03 17:37:59 -07:00
John Reck
842bb5be58 am 0f6c29dc: am ef908af6: Merge "Have destroy call freePrefetchedLayers" into lmp-dev
* commit '0f6c29dc47d4a9607e79480460a67837c527fd56':
  Have destroy call freePrefetchedLayers
2014-09-03 18:33:24 +00:00
John Reck
17035b0211 Have destroy call freePrefetchedLayers
Bug: 17208461

 There's a potential race condition between HardwareRenderer.destroy()
 being called (which calls destroyCanvasAndSurface()) and the renderer
 being finalized (which is what calls freePrefetchedLayers), during which
 time it's possible we get a TRIM_MEMORY_COMPLETE and destroy the EGL
 context.

 Fix this race condition by moving stopDrawing() and freePrefetchedLayers()
 into destroyCanvasAndSurface() where they should have been in the first
 place.

 Also, if we hit the assertion failure, dump the current state of
 Caches to try and provide more context for the failure.

Change-Id: Ife0ba3562041e8b08e87e3e13640472b3004eed6
2014-09-03 11:13:53 -07:00
John Reck
89cff0fde7 am 1c33dc49: am efb75031: Merge "Implement TODO" into lmp-dev
* commit '1c33dc49d8ab4ecac90794090bba191e42bd6c04':
  Implement TODO
2014-09-03 05:49:53 +00:00
John Reck
3d3f5f8c68 Merge "Implement TODO" into lmp-dev 2014-09-02 22:58:51 +00:00
John Reck
1661715d40 Implement TODO
Change-Id: I551ad0dab6356baa4c7787718b54d5b7337a3f26
2014-09-02 15:44:14 -07:00
Chris Craik
de33841317 am 0d1a3fd3: am f9b26725: Merge "Fix precision issues for roundrect clipping" into lmp-dev
* commit '0d1a3fd3b846d858c321c634b605fd9fc63b57cd':
  Fix precision issues for roundrect clipping
2014-09-02 19:54:24 +00:00
Chris Craik
0fd79c955b Merge "Fix precision issues for roundrect clipping" into lmp-dev 2014-09-02 19:25:09 +00:00
ztenghui
e358dd6ac0 am f431aeab: am bb63ef12: Merge "Fix the (0,0) vector case for extra vertices computation" into lmp-dev
* commit 'f431aeab0db82bc7fdd0c50446990c4b7496609b':
  Fix the (0,0) vector case for extra vertices computation
2014-09-02 16:38:12 +00:00
ztenghui
26131368ec Fix the (0,0) vector case for extra vertices computation
TODO: Figure out why we have collided vertices from input polygon.

b/17340792

Change-Id: I6636ff957ef17514bd11cf290ccc0a2c302aca0b
2014-09-01 17:23:27 -07:00
Chris Craik
68a73e8700 Fix precision issues for roundrect clipping
bug:16984008
Change-Id: I941232d569293717f6bcd249d9e01f72a7409d2e
2014-08-29 17:06:27 -07:00
Adam Lesinski
d299fef90c am a7e85db1: am fe622efc: Merge "Add test to ensure themes get copied from separate resource tables" into lmp-dev
* commit 'a7e85db12557c0480e3836c414519b28331d502c':
  Add test to ensure themes get copied from separate resource tables
2014-08-29 23:53:37 +00:00
ztenghui
28b4a5d058 am 04834f4d: am b379a6e9: Merge "Ambient shadow tessellation improvement." into lmp-dev
* commit '04834f4d8f6d2a4d803b59a22f5b6d3b8dd97369':
  Ambient shadow tessellation improvement.
2014-08-29 23:53:32 +00:00
Adam Lesinski
9d75e95f9b Merge "Add test to ensure themes get copied from separate resource tables" into lmp-dev 2014-08-29 21:38:02 +00:00
ztenghui
cbf4c08796 Merge "Ambient shadow tessellation improvement." into lmp-dev 2014-08-29 21:36:03 +00:00