Skip to content
Commit 6ee41101 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Add Paint#get(ShadowLayer)ColorLong

Bug: 120904891
Test: I6de01bd94fade605643af590f8d6909f09a5831e

Store Paint's colors (both the ShadowLayerColor, and the previously
uncached color that is stored in the native SkPaint) as @ColorLongs.
When setting or retrieving the int version, convert. This allows
returning the long value that was manually set, so that we return the
color in the ColorSpace that was requested.

Since the color is already stored in Java, remove nGetAlpha, and return
the alpha from the ColorLong. When setting alpha, update the cached
value, too.

Make setShadowLayer(..., @ColorInt) and setColor(@ColorInt) call the
@ColorLong versions, so they can share single JNI entry points.

Change-Id: Ifc559893dd4db2629c59b6e53f0b2166d43e6049
parent dab4ad8a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment