Loading core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -17474,6 +17474,7 @@ package android.graphics { method public void setFloatUniform(@NonNull String, @NonNull float[]); method public void setInputColorFilter(@NonNull String, @NonNull android.graphics.ColorFilter); method public void setInputShader(@NonNull String, @NonNull android.graphics.Shader); method public void setInputXfermode(@NonNull String, @NonNull android.graphics.RuntimeXfermode); method public void setIntUniform(@NonNull String, int); method public void setIntUniform(@NonNull String, int, int); method public void setIntUniform(@NonNull String, int, int, int); Loading @@ -17492,7 +17493,9 @@ package android.graphics { method public void setFloatUniform(@NonNull String, float, float, float, float); method public void setFloatUniform(@NonNull String, @NonNull float[]); method public void setInputBuffer(@NonNull String, @NonNull android.graphics.BitmapShader); method @FlaggedApi("com.android.graphics.hwui.flags.runtime_color_filters_blenders") public void setInputColorFilter(@NonNull String, @NonNull android.graphics.ColorFilter); method public void setInputShader(@NonNull String, @NonNull android.graphics.Shader); method @FlaggedApi("com.android.graphics.hwui.flags.runtime_color_filters_blenders") public void setInputXfermode(@NonNull String, @NonNull android.graphics.RuntimeXfermode); method public void setIntUniform(@NonNull String, int); method public void setIntUniform(@NonNull String, int, int); method public void setIntUniform(@NonNull String, int, int, int); Loading @@ -17512,6 +17515,7 @@ package android.graphics { method public void setFloatUniform(@NonNull String, @NonNull float[]); method public void setInputColorFilter(@NonNull String, @NonNull android.graphics.ColorFilter); method public void setInputShader(@NonNull String, @NonNull android.graphics.Shader); method public void setInputXfermode(@NonNull String, @NonNull android.graphics.RuntimeXfermode); method public void setIntUniform(@NonNull String, int); method public void setIntUniform(@NonNull String, int, int); method public void setIntUniform(@NonNull String, int, int, int); graphics/java/android/graphics/RuntimeColorFilter.java +17 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,23 @@ public class RuntimeColorFilter extends ColorFilter { nativeUpdateChild(getNativeInstance(), filterName, colorFilter.getNativeInstance()); } /** * Assigns the uniform xfermode to the provided xfermode parameter. If the shader program does * not have a uniform xfermode with that name then an IllegalArgumentException is thrown. * * @param xfermodeName name matching the uniform declared in the AGSL program * @param xfermode filter passed into the AGSL program for sampling */ public void setInputXfermode(@NonNull String xfermodeName, @NonNull RuntimeXfermode xfermode) { if (xfermodeName == null) { throw new NullPointerException("The xfermodeName parameter must not be null"); } if (xfermode == null) { throw new NullPointerException("The xfermode parameter must not be null"); } nativeUpdateChild(getNativeInstance(), xfermodeName, xfermode.createNativeInstance()); } /** @hide */ @Override protected long createNativeInstance() { Loading graphics/java/android/graphics/RuntimeShader.java +44 −0 Original line number Diff line number Diff line Loading @@ -18,10 +18,13 @@ package android.graphics; import android.annotation.ColorInt; import android.annotation.ColorLong; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.util.ArrayMap; import android.view.Window; import com.android.graphics.hwui.flags.Flags; import libcore.util.NativeAllocationRegistry; /** Loading Loading @@ -525,6 +528,45 @@ public class RuntimeShader extends Shader { discardNativeInstance(); } /** * Assigns the uniform color filter to the provided color filter parameter. If the shader * program does not have a uniform color filter with that name then an IllegalArgumentException * is thrown. * * @param filterName name matching the uniform declared in the AGSL program * @param colorFilter filter passed into the AGSL program for sampling */ @FlaggedApi(Flags.FLAG_RUNTIME_COLOR_FILTERS_BLENDERS) public void setInputColorFilter(@NonNull String filterName, @NonNull ColorFilter colorFilter) { if (filterName == null) { throw new NullPointerException("The filterName parameter must not be null"); } if (colorFilter == null) { throw new NullPointerException("The colorFilter parameter must not be null"); } nativeUpdateChild(mNativeInstanceRuntimeShaderBuilder, filterName, colorFilter.getNativeInstance()); } /** * Assigns the uniform xfermode to the provided xfermode parameter. If the shader program does * not have a uniform xfermode with that name then an IllegalArgumentException is thrown. * * @param xfermodeName name matching the uniform declared in the AGSL program * @param xfermode filter passed into the AGSL program for sampling */ @FlaggedApi(Flags.FLAG_RUNTIME_COLOR_FILTERS_BLENDERS) public void setInputXfermode(@NonNull String xfermodeName, @NonNull RuntimeXfermode xfermode) { if (xfermodeName == null) { throw new NullPointerException("The xfermodeName parameter must not be null"); } if (xfermode == null) { throw new NullPointerException("The xfermode parameter must not be null"); } nativeUpdateChild(mNativeInstanceRuntimeShaderBuilder, xfermodeName, xfermode.createNativeInstance()); } /** @hide */ @Override Loading Loading @@ -552,5 +594,7 @@ public class RuntimeShader extends Shader { int value4, int count); private static native void nativeUpdateShader( long shaderBuilder, String shaderName, long shader); private static native void nativeUpdateChild( long shaderBuilder, String childName, long child); } graphics/java/android/graphics/RuntimeXfermode.java +17 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,23 @@ public class RuntimeXfermode extends Xfermode { nativeUpdateChild(mBuilderNativeInstance, filterName, colorFilter.getNativeInstance()); } /** * Assigns the uniform xfermode to the provided xfermode parameter. If the shader program does * not have a uniform xfermode with that name then an IllegalArgumentException is thrown. * * @param xfermodeName name matching the uniform declared in the AGSL program * @param xfermode xfermode function passed into the AGSL program for sampling */ public void setInputXfermode(@NonNull String xfermodeName, @NonNull RuntimeXfermode xfermode) { if (xfermodeName == null) { throw new NullPointerException("The xfermodeName parameter must not be null"); } if (xfermode == null) { throw new NullPointerException("The xfermode parameter must not be null"); } nativeUpdateChild(mBuilderNativeInstance, xfermodeName, xfermode.createNativeInstance()); } /** @hide */ public long createNativeInstance() { return nativeCreateNativeInstance(mBuilderNativeInstance); Loading libs/hwui/jni/RuntimeEffectUtils.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ void UpdateChild(JNIEnv* env, SkRuntimeEffectBuilder* builder, const char* child SkFlattenable* childEffect) { SkRuntimeShaderBuilder::BuilderChild builderChild = builder->child(childName); if (builderChild.fChild == nullptr) { ThrowIAEFmt(env, "unable to find shader named %s", childName); ThrowIAEFmt(env, "unable to find child named %s", childName); return; } Loading Loading
core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -17474,6 +17474,7 @@ package android.graphics { method public void setFloatUniform(@NonNull String, @NonNull float[]); method public void setInputColorFilter(@NonNull String, @NonNull android.graphics.ColorFilter); method public void setInputShader(@NonNull String, @NonNull android.graphics.Shader); method public void setInputXfermode(@NonNull String, @NonNull android.graphics.RuntimeXfermode); method public void setIntUniform(@NonNull String, int); method public void setIntUniform(@NonNull String, int, int); method public void setIntUniform(@NonNull String, int, int, int); Loading @@ -17492,7 +17493,9 @@ package android.graphics { method public void setFloatUniform(@NonNull String, float, float, float, float); method public void setFloatUniform(@NonNull String, @NonNull float[]); method public void setInputBuffer(@NonNull String, @NonNull android.graphics.BitmapShader); method @FlaggedApi("com.android.graphics.hwui.flags.runtime_color_filters_blenders") public void setInputColorFilter(@NonNull String, @NonNull android.graphics.ColorFilter); method public void setInputShader(@NonNull String, @NonNull android.graphics.Shader); method @FlaggedApi("com.android.graphics.hwui.flags.runtime_color_filters_blenders") public void setInputXfermode(@NonNull String, @NonNull android.graphics.RuntimeXfermode); method public void setIntUniform(@NonNull String, int); method public void setIntUniform(@NonNull String, int, int); method public void setIntUniform(@NonNull String, int, int, int); Loading @@ -17512,6 +17515,7 @@ package android.graphics { method public void setFloatUniform(@NonNull String, @NonNull float[]); method public void setInputColorFilter(@NonNull String, @NonNull android.graphics.ColorFilter); method public void setInputShader(@NonNull String, @NonNull android.graphics.Shader); method public void setInputXfermode(@NonNull String, @NonNull android.graphics.RuntimeXfermode); method public void setIntUniform(@NonNull String, int); method public void setIntUniform(@NonNull String, int, int); method public void setIntUniform(@NonNull String, int, int, int);
graphics/java/android/graphics/RuntimeColorFilter.java +17 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,23 @@ public class RuntimeColorFilter extends ColorFilter { nativeUpdateChild(getNativeInstance(), filterName, colorFilter.getNativeInstance()); } /** * Assigns the uniform xfermode to the provided xfermode parameter. If the shader program does * not have a uniform xfermode with that name then an IllegalArgumentException is thrown. * * @param xfermodeName name matching the uniform declared in the AGSL program * @param xfermode filter passed into the AGSL program for sampling */ public void setInputXfermode(@NonNull String xfermodeName, @NonNull RuntimeXfermode xfermode) { if (xfermodeName == null) { throw new NullPointerException("The xfermodeName parameter must not be null"); } if (xfermode == null) { throw new NullPointerException("The xfermode parameter must not be null"); } nativeUpdateChild(getNativeInstance(), xfermodeName, xfermode.createNativeInstance()); } /** @hide */ @Override protected long createNativeInstance() { Loading
graphics/java/android/graphics/RuntimeShader.java +44 −0 Original line number Diff line number Diff line Loading @@ -18,10 +18,13 @@ package android.graphics; import android.annotation.ColorInt; import android.annotation.ColorLong; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.util.ArrayMap; import android.view.Window; import com.android.graphics.hwui.flags.Flags; import libcore.util.NativeAllocationRegistry; /** Loading Loading @@ -525,6 +528,45 @@ public class RuntimeShader extends Shader { discardNativeInstance(); } /** * Assigns the uniform color filter to the provided color filter parameter. If the shader * program does not have a uniform color filter with that name then an IllegalArgumentException * is thrown. * * @param filterName name matching the uniform declared in the AGSL program * @param colorFilter filter passed into the AGSL program for sampling */ @FlaggedApi(Flags.FLAG_RUNTIME_COLOR_FILTERS_BLENDERS) public void setInputColorFilter(@NonNull String filterName, @NonNull ColorFilter colorFilter) { if (filterName == null) { throw new NullPointerException("The filterName parameter must not be null"); } if (colorFilter == null) { throw new NullPointerException("The colorFilter parameter must not be null"); } nativeUpdateChild(mNativeInstanceRuntimeShaderBuilder, filterName, colorFilter.getNativeInstance()); } /** * Assigns the uniform xfermode to the provided xfermode parameter. If the shader program does * not have a uniform xfermode with that name then an IllegalArgumentException is thrown. * * @param xfermodeName name matching the uniform declared in the AGSL program * @param xfermode filter passed into the AGSL program for sampling */ @FlaggedApi(Flags.FLAG_RUNTIME_COLOR_FILTERS_BLENDERS) public void setInputXfermode(@NonNull String xfermodeName, @NonNull RuntimeXfermode xfermode) { if (xfermodeName == null) { throw new NullPointerException("The xfermodeName parameter must not be null"); } if (xfermode == null) { throw new NullPointerException("The xfermode parameter must not be null"); } nativeUpdateChild(mNativeInstanceRuntimeShaderBuilder, xfermodeName, xfermode.createNativeInstance()); } /** @hide */ @Override Loading Loading @@ -552,5 +594,7 @@ public class RuntimeShader extends Shader { int value4, int count); private static native void nativeUpdateShader( long shaderBuilder, String shaderName, long shader); private static native void nativeUpdateChild( long shaderBuilder, String childName, long child); }
graphics/java/android/graphics/RuntimeXfermode.java +17 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,23 @@ public class RuntimeXfermode extends Xfermode { nativeUpdateChild(mBuilderNativeInstance, filterName, colorFilter.getNativeInstance()); } /** * Assigns the uniform xfermode to the provided xfermode parameter. If the shader program does * not have a uniform xfermode with that name then an IllegalArgumentException is thrown. * * @param xfermodeName name matching the uniform declared in the AGSL program * @param xfermode xfermode function passed into the AGSL program for sampling */ public void setInputXfermode(@NonNull String xfermodeName, @NonNull RuntimeXfermode xfermode) { if (xfermodeName == null) { throw new NullPointerException("The xfermodeName parameter must not be null"); } if (xfermode == null) { throw new NullPointerException("The xfermode parameter must not be null"); } nativeUpdateChild(mBuilderNativeInstance, xfermodeName, xfermode.createNativeInstance()); } /** @hide */ public long createNativeInstance() { return nativeCreateNativeInstance(mBuilderNativeInstance); Loading
libs/hwui/jni/RuntimeEffectUtils.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ void UpdateChild(JNIEnv* env, SkRuntimeEffectBuilder* builder, const char* child SkFlattenable* childEffect) { SkRuntimeShaderBuilder::BuilderChild builderChild = builder->child(childName); if (builderChild.fChild == nullptr) { ThrowIAEFmt(env, "unable to find shader named %s", childName); ThrowIAEFmt(env, "unable to find child named %s", childName); return; } Loading