On some cases (noticed from log) that there is a crash in
libhwui.so, future debug log shows that the light center position
values are nan, causing an out of bound access in hull function
in SpotShadow.cpp for parameter retPoly which assume to be of
maximum length of pointsLength only but not the case when all
points are nan.
More log shows that a Snapshot was created (new) without
mRelativeLightCenter begin set, and Layer.cpp trying to
use it by calling updateLightPosFromRenderer. Those values
are random values in stack which causing math calc based on
that value returning nan also.
Initialize mRelativeLightCenter to 0 in Snapshot.cpp to avoid the
problem.
Change-Id: I9e24f6f1f856d053d09db1b1aae100f219f2a6de
fixes: 29771171
This is a regression from HWUI_NEW_OPS, a roundOut
was missing in the new path that was in the old one
Change-Id: Ibf223d550bb5525781864dd9b7f7cd6d73adb98b
Fixes: 29072773
By using computeFrameTime AnimationContext would
potentially end up modifying the latest vsync if
a very-slow frame was received from the UI thread.
This could potentially desync animations that were
RT & UI thread 'synchronized', but more significantly
it would confuse the swap chain which tries to only
draw one frame per vsync causing unneccessary frame
drops.
Change-Id: Ibd2ec3157ce32fee1eec8d56837c45a35e622895
Align x offset and width to 32, y offset and height to 4.
It improves the font texture upload performance.
Change-Id: I967eeed90658f2ce1eb08cb2740d5dc34c72f40b
bug:29127615
Primarily fixes case where 0 dimensioned layers could be
created/updated. Additionally, adds more logging in incomplete
framebuffer cases, if they still occur.
Change-Id: Ib90dbbafd6905aca3c8f46e64064e13a308f713d
am: e4e240f13f
* commit 'e4e240f13f6c64049ef346b27d1cf78699fa800e':
HWUI: do not call glCopyTexSubImage2D on empty area.
Change-Id: Ica6dcf88c3fea43f07352f460343d97599280cdc
Previous check .isEmpty() is not sufficient, because getWidth() may have
value 0.5, so technically it is not empty, but when this size is passed
to texture calls it is converted to uint_32 and it becomes zero.
bug:28941093
Change-Id: Ia7c2bf0340466d5376f235fb5da54ad2ddfa0a03
am: 21a608f27f
* commit '21a608f27f1f7b9c0fcfbb982f290fed29cc1817':
HWUI: do nothing in case of empty layer
Change-Id: I264e20e2290f474636a21eb7322377e308d316c2
When mutating vector drawables, we need to not only copy over
the VD tree structure, but also the properties of the VD tree,
such as alpha.
Bug: 28974071
Change-Id: I265e7e3cb92455b876cae248bcb9811230cb34f9
Bug: 28667141
saveLayer clips the layer to the size it needs to
be and will translate content if necessary, but
the drawLayerOp that results from that was not
translated to handle the shifted draw content.
This fixes that
Change-Id: I3c9ffd5d0282fa1b958bced94c25e9744281e9be
Interleaving text and shadow rendering resulted in issuing draw commands from FontRenderer::renderDropShadow.
bug: 28528923
Change-Id: Ife2677f58180aaf10ec74d7c6efe5c44fe248daa
am: b2e36d7939
* commit 'b2e36d7939610de538a6ec95a821b61b365b3073':
Use LUT for computing final shadow alpha
Change-Id: Ia17e3b93e9ade0633aee5a1e9edd60b92dd1e062