Cherry pick of b561f39d01c211425bfefaaa7b31ebe097e7ba79 from AOSP master.
Due to precision loss of float math, we sometimes get 1.000001f for
dotProduct. This causes NaN result from acosf() and floor() funcs.
At the moment, this does not cause any problems on ARM, as casting
NaN to int results in 0. On mips however (possibly on x86), such cast
gives INT_MAX, so crash occurs when trying to use the resulting value.
Change-Id: I8e0285a0306a65b8469d9f4885c19665066fc4c8
SkiaCanvasProxy was being created with an identity transform, ignoring
any transform that may have been applied in Java (or C++) to the
android graphics Canvas it was proxy for. This CL makes sure the
DisplayListCanvas transform is propagated to the Proxy every time
asSkCanvas() is called.
We could instead move the code to the SkiaCanvasProxy constructor
if we got rid of the cached proxy on DisplayListCanvas; nobody's
using the proxy heavily enough that that should be a performance
hit at this time.
BUG:21945972
R=djsollen@google.com
Change-Id: I99ed1563802a2449bb9939cb67976cd60dd8611c
Bug: 21857172
willHaveFunctor was assuming that either mStagingDisplayList
or mDisplayList would be non-null but this isn't true. Both
can be null in some scenarios (notably after a trimMemory)
Change-Id: Ia2915b84cfc907ec9c7cbec54ed6dc26283ec998
Bug: 18052916
Tweaked colors, merged some categories
Reduced significance of fast frames
Increased visual weight of janky frames
Change-Id: I5b4e86164c4d51debad7de0e0f8715dda34c7a60
bug:20063841
Restores old SkShader matrix behavior from before the Glop refactor.
Many drawing operations draw without sending the canvas transform to
the GL shader. In such cases, we need to adapt the matrix sent to the
SkShader logic to invert the canvas transform that's built into
the mesh.
Change-Id: I42b6f59df36ce46436322b95bf9ad2140795ee58
bug:21431334
Should be explicitly passing target through, to ensure
GL_EXTERNAL_OES textures are bound correctly.
Change-Id: I997672ae292ea7fc016c02a59a3c7c8358ecfe0b
bug:14297149
SaveLayer's performance cost is high, and proportional to the surface
being projected onto. Since ripples (even unbounded ones) are now
always projected to the arbitrary background content behind them, this
cost is especially important to avoid.
This removes the last semi-secret, saveLayer from the projected
ripple implementation.
Also fixes the HW test app to correctly demonstrate this projection
masking behavior.
Additionaly, alters PathTessellator to gracefully handle
counter-clockwise paths, and simplifies the work done by
ShadowTessellator to ensure all of its paths are counterclockwise.
Change-Id: Ibe9e12812bd10a774e20b1d444a140c368cbba8c