2207 Commits

Author SHA1 Message Date
John Reck
5bb2fdb425 Merge "Fix memory corruption in SpotShadow" am: 8c85c00b5e
am: 8c8353a8c3

* commit '8c8353a8c3152bc3ee4b74815d64c65c2c9d1991':
  Fix memory corruption in SpotShadow
2015-11-11 18:08:15 +00:00
Keith Mok
a1f5631340 Fix memory corruption in SpotShadow
The array list is too small and causing stack corruption

Change-Id: I0e34dad39357fb63977d2ce6f183ced7b6a632be
2015-11-11 08:49:20 -08:00
John Reck
1b85ce17a3 Merge "Fix HWUI Path Cache dangling pointer" am: 37bf3ec9d2
am: 7516d4d866

* commit '7516d4d8667957688433b02b2f4985f1b3ab36ad':
  Fix HWUI Path Cache dangling pointer
2015-11-10 23:31:11 +00:00
John Reck
37bf3ec9d2 Merge "Fix HWUI Path Cache dangling pointer" 2015-11-10 23:20:03 +00:00
Digish Pandya
2e4f67c388 Fix HWUI Path Cache dangling pointer
When precache, PathTexture is added to PathCache, and it is released after drawn if we want to clean it.
But the PathCache LRU still holds the entry of the PathTexture object. When trim the cache in
the end of each frame, LRU finds that its mListener is not NULL and invoke the functor, however,
mListerer points to the released PathTexture object and is a dangling pointer, thus leads to crash.
Smart pointer don't help here since they only manage scopes, while PathTexture is also controled by
its cleanup field.
The fix is to also remove the LRU entry of PathTexture*, it will also release the texture object
and there won't be texture leaks.

Change-Id: Iaa0621df5dc71532e9e75b38ad94384353930b95
2015-11-09 14:22:25 +05:30
Teng-Hui Zhu
83ea5b7b22 When the incoming light source is invalid, don't generate any shadow
b/25417885

Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507
2015-11-05 15:48:35 -08:00
Chris Craik
1c3dd0519a Merge "Revert "Remove -ffast-math from libhwui makefile"" into mnc-dr-dev am: 0cf48e9120 am: 17fc83cbde
am: c06ccd77c1

* commit 'c06ccd77c129cdf198c64babdfd8d289aa8ff908':
  Revert "Remove -ffast-math from libhwui makefile"
2015-11-05 20:37:23 +00:00
Tenghui Zhu
dfaf23f846 Merge "When the incoming light source is invalid, don\'t generate any shadow" into mnc-dr-dev am: 76d20b4a5c am: 1c7fbe0efb
am: d829ab7683

* commit 'd829ab76831a0c323f669385c54f666f8a91e4f1':
  When the incoming light source is invalid, don't generate any shadow
2015-11-05 20:27:43 +00:00
Chris Craik
0cf48e9120 Merge "Revert "Remove -ffast-math from libhwui makefile"" into mnc-dr-dev 2015-11-05 20:21:45 +00:00
Tenghui Zhu
76d20b4a5c Merge "When the incoming light source is invalid, don't generate any shadow" into mnc-dr-dev 2015-11-05 20:05:37 +00:00
Chris Craik
e0fa7476a5 Revert "Remove -ffast-math from libhwui makefile"
This reverts commit e02ec7c37a92fd63748a610bac6a23d0409788cf.

Change-Id: Iea7fadf04c4ffa62be28f783342ae749f89bf931
2015-11-05 17:58:28 +00:00
Teng-Hui Zhu
cf22d184a3 When the incoming light source is invalid, don't generate any shadow
b/25417885

Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507
2015-11-04 17:04:18 -08:00
Chris Craik
34e9b5b2e4 Merge "Early return when the scale is 0." into mnc-dr-dev am: 10eb6ab94b am: 8b581e2bc7
am: a853bb450c

* commit 'a853bb450ce7e6f06220a86dcc171a837d30511b':
  Early return when the scale is 0.
2015-11-04 19:46:47 +00:00
Chris Craik
289c3ba2c4 Merge "Remove -ffast-math from libhwui makefile" into mnc-dr-dev am: c4aaf0f4b8 am: 62b16e2e10
am: 1938c39f77

* commit '1938c39f77a52c1058e7b2434bdc5d08ed9053b9':
  Remove -ffast-math from libhwui makefile
2015-11-04 19:40:04 +00:00
Chris Craik
10eb6ab94b Merge "Early return when the scale is 0." into mnc-dr-dev 2015-11-04 19:28:39 +00:00
Teng-Hui Zhu
cdce35a7e8 Early return when the scale is 0.
b/24534579

Change-Id: Ib3581ec99387ca70ca036026f64857a49657d94b
(cherry picked from commit 8d0ec389531d071529fb0a800f10733b057205d9)
2015-11-04 18:31:50 +00:00
John Reck
392b0926aa Merge "Revert "Use clang for libhwui"" into mnc-dr-dev am: 1e1fbd804b am: f8635c2e04
am: 26f50df754

* commit '26f50df75477a18e40c6da59a15cc2bd4b441239':
  Revert "Use clang for libhwui"
2015-11-04 18:21:35 +00:00
Chris Craik
e02ec7c37a Remove -ffast-math from libhwui makefile
bug:25417885

Change-Id: I8244bd28c2d46fc449398b9bf5104bf7cbaded8a
2015-11-04 10:14:57 -08:00
John Reck
492a56cc93 Revert "Use clang for libhwui"
Bug 25462107

This reverts commit d354fd2c66855d116440eb4c936317f124241225.

Change-Id: Ib7c50b5becf247f837f3cc20f9128d9411d22563
2015-11-04 15:21:35 +00:00
Tenghui Zhu
0cda530e0e Merge "Use clang for libhwui" into mnc-dr-dev am: 61c93eb16d am: a66dc6e159
am: a32f221db0

* commit 'a32f221db0361c9047fd61373fbf815c37d958f8':
  Use clang for libhwui
2015-11-03 19:55:52 +00:00
Chris Craik
d354fd2c66 Use clang for libhwui
bug:25417885

Change-Id: I0ef8034d79ba3682925e3c2a4b7ccd833fd4f156
2015-11-03 10:34:28 -08:00
Stephen Hines
697e3dd6b9 am ee144b1e: resolved conflicts for bd57dac5 to stage-aosp-master
* commit 'ee144b1e60a88e8f097113e046813f0b61c38b9b':
  Don't unregister Fonts from renderer at destruction
2015-10-03 00:46:17 +00:00
Stephen Hines
ee144b1e60 resolved conflicts for bd57dac5 to stage-aosp-master
Change-Id: I5107af13712d7cc908d8699e5c15a002f0a3ec85
2015-10-02 17:34:05 -07:00
Chris Craik
bd57dac5d5 Merge "Don't unregister Fonts from renderer at destruction" 2015-10-02 22:30:09 +00:00
Chris Craik
148c78f825 Don't unregister Fonts from renderer at destruction
bug:24584749

Fonts are only destroyed when the renderer is destroyed, this prevents
modifying the FontRenderer's LruCache while it's being iterated through
in FontRenderer::~FontRenderer.

Change-Id: I0e2c9f87981bfa50454ec8689df05851839e288e
2015-10-02 14:21:46 -07:00
Sergio Giro
31e5ded687 am 6706b71d: am 86e67d70: Merge "frameworks/base: delete TinyHashMap"
* commit '6706b71d7cfb9a916fd482189c04a0d59c19c103':
  frameworks/base: delete TinyHashMap
2015-10-01 10:22:39 +00:00
Sergio Giro
6706b71d7c am 86e67d70: Merge "frameworks/base: delete TinyHashMap"
* commit '86e67d708d738807c843850a3b6c9170e514ff8f':
  frameworks/base: delete TinyHashMap
2015-10-01 10:16:44 +00:00
Sene Gales
1673035f05 frameworks/base: delete TinyHashMap
In DeferredDisplayList use std::unordered_map instead of TinyHashMap

Towards deprecation of BasicHashTable

Change-Id: I91b8d5dc80444c88fecff9c362fa610cca253973
2015-09-30 20:37:01 +01:00
Chris Craik
7da9d7fae6 am 9c45aa8f: am ca3c865d: am 892768fb: am 0b804542: Merge "Constrain drawBitmap matrix-to-rect optimization" into mnc-dev
* commit '9c45aa8f0db8e3c5370172018e162b7ecaf9ea4a':
  Constrain drawBitmap matrix-to-rect optimization
2015-08-19 01:43:41 +00:00
Chris Craik
fc7f6197cb am 0b804542: Merge "Constrain drawBitmap matrix-to-rect optimization" into mnc-dev
* commit '0b8045425ff58f992046ff2be35bc91001dabf7b':
  Constrain drawBitmap matrix-to-rect optimization
2015-08-19 01:41:25 +00:00
Chris Craik
892768fb3e am 0b804542: Merge "Constrain drawBitmap matrix-to-rect optimization" into mnc-dev
* commit '0b8045425ff58f992046ff2be35bc91001dabf7b':
  Constrain drawBitmap matrix-to-rect optimization
2015-08-19 00:54:00 +00:00
Chris Craik
e688bf7203 Constrain drawBitmap matrix-to-rect optimization
bug:22962165

Optimization is not valid if matrix would flip image.

Change-Id: Ieee42390517bd3466b7d94596f0fbbe192ab757e
2015-08-18 14:53:47 -07:00
Chris Craik
e3f0a881c2 Merge "Make the value for shadowRadius less than 1.0 work" 2015-08-14 22:02:19 +00:00
Andreas Gampe
ea30eb29f8 Hwui: Remove unused variables
For build-system CFLAGS clean-up, remove unused variables.

Bug: 18632512

(cherry picked from commit cb4af9b10ab17187288d8f5ccb4cc1e465be9a51)

Change-Id: Ic58bedc84234325512193991fc64315e3aad6f9e
2015-08-12 18:05:35 -07:00
Andreas Gampe
fea85a33b7 Hwui: Remove unused variables
For build-system CFLAGS clean-up, remove unused variables.

Bug: 18632512

(cherry picked from commit cb4af9b10ab17187288d8f5ccb4cc1e465be9a51)

Change-Id: Ic58bedc84234325512193991fc64315e3aad6f9e
2015-08-12 16:30:32 -07:00
John Reck
17dafd6033 am 906c8dea: am bc04d3ac: Merge "animateNoDamage failed to remove from current frame list"
* commit '906c8dea2ec6ae404ae6d7870c0a0cb2289f3d04':
  animateNoDamage failed to remove from current frame list
2015-08-04 21:14:45 +00:00
John Reck
d56554e82b am 906c8dea: am bc04d3ac: Merge "animateNoDamage failed to remove from current frame list"
* commit '906c8dea2ec6ae404ae6d7870c0a0cb2289f3d04':
  animateNoDamage failed to remove from current frame list
2015-08-04 21:13:23 +00:00
John Reck
666f319443 am 2fa3eec0: am 93c14069: Merge "hwui: add extension to support unpack operations in OpenGL ES 2.0"
* commit '2fa3eec0e1807f6a45b71a41624698e8cc949026':
  hwui: add extension to support unpack operations in OpenGL ES 2.0
2015-08-04 20:53:55 +00:00
John Reck
bc04d3acba Merge "animateNoDamage failed to remove from current frame list" 2015-08-04 20:52:40 +00:00
John Reck
b47ea9b2ed am 2fa3eec0: am 93c14069: Merge "hwui: add extension to support unpack operations in OpenGL ES 2.0"
* commit '2fa3eec0e1807f6a45b71a41624698e8cc949026':
  hwui: add extension to support unpack operations in OpenGL ES 2.0
2015-08-04 20:51:42 +00:00
John Reck
a975a84498 am 70e5db94: Merge "Fix crash in kModeProcessNoContext" into mnc-dev
* commit '70e5db9413f82bf1f000bd99b3d2dbecf6e4ab04':
  Fix crash in kModeProcessNoContext
2015-08-04 19:48:30 +00:00
John Reck
95cd24bb9d Fix crash in kModeProcessNoContext
Bug: 22931143
Change-Id: I9897a28b1edd006aee67ae2343874ad92bbd15a0
2015-08-04 18:19:11 +00:00
Ye Ouyang
68eb3b22b0 animateNoDamage failed to remove from current frame list
runRemainingAnimations is used to animate the available animation handle
which were not yet run, it actually animate those animation handle and
removes from the list by notifyAnimationsRan(). In case if these animation
handles are not removed, it leads to the Fatal Assert of runRemainingAnimations.

Some usecases causes the addition of animation handle when there is
no animators, in these cases this check prevents execution of
notifyAnimationsRan() leads to Fatal Assert crash of runRemainingAnimations.

Allowing the animation to happen irrespective of animators solves the problem.

Change-Id: Ifa72286cdc6ff785fcc999f3b951dd787e7003e9
2015-08-04 10:42:32 -05:00
xiaozhengdong
d538d30e2f hwui: add extension to support unpack operations in OpenGL ES 2.0
OpenGL ES 3.0+ lets us specify the row length for unpack operations
such as glTexSubImage2D(). This allows us to upload a sub-rectangle
of a texture. Also, the GL_EXT_unpack_subimage extension can also
support this feature in OpenGL ES 2.0

Change-Id: Id43c2c55c5eaefbace67087c955f0b4324fb2c35
Signed-off-by: xiaozhengdong <xiaozhengdong@xiaomi.com>
2015-08-04 19:46:01 +08:00
John Reck
2e529712e6 am c03ab87a: Merge "Disable skipping frames on empty damage" into mnc-dev
* commit 'c03ab87ac9f721ff22bfe5e9c0cd0e5be64f261e':
  Disable skipping frames on empty damage
2015-08-04 01:00:24 +00:00
John Reck
6d4d0db312 Disable skipping frames on empty damage
Bug: 22592975

Optimization added in MNC is not quite correct, occasionally
it will fail to repaint when it was supposed to leading
to buffer corruption. Disable the optimization for now.

Change-Id: I34dfdfb357eda298198043ded7335d4588a003fd
2015-08-03 22:47:49 +00:00
Chris Craik
7dfb1d9931 am 730c0f65: Merge "Fix stencil mask usage in HWUI" into mnc-dev
* commit '730c0f6591b1c99699e9d0ecf36d696f7d87629f':
  Fix stencil mask usage in HWUI
2015-07-30 19:37:15 +00:00
Chris Craik
fa51a0e1ce Fix stencil mask usage in HWUI
bug:21588246

Ensure we always set the mask before clearing, and removes
some unneeded optimizations around mask usage in
debug (overdraw) mode.

Change-Id: I71ed06c16f8d9f158953d5aa160098514f0f7f00
2015-07-30 11:06:53 -07:00
John Reck
c5d3dde6c7 am 8b1154c4: Merge "Move updateMatrix() call to animateCommon" into mnc-dev
* commit '8b1154c487c25388107dc024376435f3b0ae2385':
  Move updateMatrix() call to animateCommon
2015-07-24 00:02:23 +00:00
John Reck
49dec430e8 Move updateMatrix() call to animateCommon
Bug: 22667315

HWUI internally always assumes that RenderNode->properties()
has a fully-baked matrix. However, RenderThread animations violate
this and will perform an update of that matrix after they run. This
was missing in the fallback scenario where an animation was
running on a View that is detached from the tree.

If a RenderThread animation is started on an attached view, it becomes
detached, and is then re-attached it will crash in the staging
properties push. The fix for this is to move the call to updateMatrix
from animate() to animateCommon() so that the animateNoDamage()
path will similarly perform the necessary matrix update.

Change-Id: I4c899a6f68659342a6515f1d7f20d3c4af65caf0
2015-07-23 22:37:21 +00:00