Loading libs/hwui/jni/Shader.cpp +6 −3 Original line number Original line Diff line number Diff line Loading @@ -228,9 +228,12 @@ static jlong RuntimeShader_create(JNIEnv* env, jobject, jlong shaderFactory, jlo static jlong RuntimeShader_createShaderFactory(JNIEnv* env, jobject, jstring sksl) { static jlong RuntimeShader_createShaderFactory(JNIEnv* env, jobject, jstring sksl) { ScopedUtfChars strSksl(env, sksl); ScopedUtfChars strSksl(env, sksl); sk_sp<SkRuntimeEffect> effect = std::get<0>(SkRuntimeEffect::Make(SkString(strSksl.c_str()))); auto result = SkRuntimeEffect::Make(SkString(strSksl.c_str())); ThrowIAE_IfNull(env, effect); sk_sp<SkRuntimeEffect> effect = std::get<0>(result); if (!effect) { const auto& err = std::get<1>(result); doThrowIAE(env, err.c_str()); } return reinterpret_cast<jlong>(effect.release()); return reinterpret_cast<jlong>(effect.release()); } } Loading tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class ColorFiltersMutateActivity extends Activity { static final String sSkSL = static final String sSkSL = "uniform float param1;\n" "uniform float param1;\n" + "void main(float x, float y, inout half4 color) {\n" + "void main(float2 xy, inout half4 color) {\n" + "color = half4(color.r, half(param1), color.b, 1.0);\n" + "color = half4(color.r, half(param1), color.b, 1.0);\n" + "}\n"; + "}\n"; Loading Loading
libs/hwui/jni/Shader.cpp +6 −3 Original line number Original line Diff line number Diff line Loading @@ -228,9 +228,12 @@ static jlong RuntimeShader_create(JNIEnv* env, jobject, jlong shaderFactory, jlo static jlong RuntimeShader_createShaderFactory(JNIEnv* env, jobject, jstring sksl) { static jlong RuntimeShader_createShaderFactory(JNIEnv* env, jobject, jstring sksl) { ScopedUtfChars strSksl(env, sksl); ScopedUtfChars strSksl(env, sksl); sk_sp<SkRuntimeEffect> effect = std::get<0>(SkRuntimeEffect::Make(SkString(strSksl.c_str()))); auto result = SkRuntimeEffect::Make(SkString(strSksl.c_str())); ThrowIAE_IfNull(env, effect); sk_sp<SkRuntimeEffect> effect = std::get<0>(result); if (!effect) { const auto& err = std::get<1>(result); doThrowIAE(env, err.c_str()); } return reinterpret_cast<jlong>(effect.release()); return reinterpret_cast<jlong>(effect.release()); } } Loading
tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class ColorFiltersMutateActivity extends Activity { static final String sSkSL = static final String sSkSL = "uniform float param1;\n" "uniform float param1;\n" + "void main(float x, float y, inout half4 color) {\n" + "void main(float2 xy, inout half4 color) {\n" + "color = half4(color.r, half(param1), color.b, 1.0);\n" + "color = half4(color.r, half(param1), color.b, 1.0);\n" + "}\n"; + "}\n"; Loading