Private API to turn off anti-aliasing for VectorDrawable
Bug: 69322344
Test: visual inspection on VectorDrawableTest with AA off. Jagged edges
that are otherwise smooth were spotted.
Change-Id: Ib2dfbd3a941be0b4ff92b8458346f8c8f5015a4b
This commit is contained in:
@@ -896,6 +896,13 @@ public class VectorDrawable extends Drawable {
|
||||
return mVectorState.getNativeRenderer();
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public void setAntiAlias(boolean aa) {
|
||||
nSetAntiAlias(mVectorState.mNativeTree.get(), aa);
|
||||
}
|
||||
|
||||
static class VectorDrawableState extends ConstantState {
|
||||
// Variables below need to be copied (deep copy if applicable) for mutation.
|
||||
int[] mThemeAttrs;
|
||||
@@ -2269,6 +2276,8 @@ public class VectorDrawable extends Drawable {
|
||||
@FastNative
|
||||
private static native float nGetRootAlpha(long rendererPtr);
|
||||
@FastNative
|
||||
private static native void nSetAntiAlias(long rendererPtr, boolean aa);
|
||||
@FastNative
|
||||
private static native void nSetAllowCaching(long rendererPtr, boolean allowCaching);
|
||||
|
||||
@FastNative
|
||||
|
||||
Reference in New Issue
Block a user