Loading graphics/java/android/graphics/drawable/RippleShader.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ final class RippleShader extends RuntimeShader { + " vec4 waveColor = vec4(in_color.rgb * waveAlpha, waveAlpha);\n" + " vec4 sparkleColor = vec4(in_sparkleColor.rgb * in_sparkleColor.a, " + "in_sparkleColor.a);\n" + " float mask = in_hasMask == 1. ? sample(in_shader, p).a > 0. ? 1. : 0. : 1.;\n" + " float mask = in_hasMask == 1. ? in_shader.eval(p).a > 0. ? 1. : 0. : 1.;\n" + " return mix(waveColor, sparkleColor, sparkleAlpha) * mask;\n" + "}"; private static final String SHADER = SHADER_UNIFORMS + SHADER_LIB + SHADER_MAIN; Loading libs/hwui/effects/StretchEffect.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ static const SkString stretchShader = SkString(R"( ); coord.x = outU; coord.y = outV; return sample(uContentTexture, coord); return uContentTexture.eval(coord); })"); static const float ZERO = 0.f; Loading tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ public class ColorFiltersMutateActivity extends Activity { "uniform shader bitmapShader;\n" + "uniform float param1;\n" + "half4 main(float2 xy) {\n" + " return half4(sample(bitmapShader, xy).rgb, param1);\n" + " return half4(bitmapShader.eval(xy).rgb, param1);\n" + "}\n"; BitmapsView(Context c) { Loading tests/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ public class RippleActivity extends Activity { + " d = rand(float2(x, y)) > density ? d : d * .2;\n" + " d = d * rand(float2(fraction, x * y));\n" + " float alpha = 1. - pow(fraction, 3.);\n" + " return float4(sample(in_paintColor, p).rgb, d * alpha);\n" + " return float4(in_paintColor.eval(p).rgb, d * alpha);\n" + "}"; RippleView(Context c) { Loading tests/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -532,6 +532,6 @@ public class StretchShaderActivity extends Activity { + " uv.y = outV;\n" + " coord.x = uv.x * viewportWidth;\n" + " coord.y = uv.y * viewportHeight;\n" + " return sample(uContentTexture, coord);\n" + " return uContentTexture.eval(coord);\n" + "}"; } Loading
graphics/java/android/graphics/drawable/RippleShader.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ final class RippleShader extends RuntimeShader { + " vec4 waveColor = vec4(in_color.rgb * waveAlpha, waveAlpha);\n" + " vec4 sparkleColor = vec4(in_sparkleColor.rgb * in_sparkleColor.a, " + "in_sparkleColor.a);\n" + " float mask = in_hasMask == 1. ? sample(in_shader, p).a > 0. ? 1. : 0. : 1.;\n" + " float mask = in_hasMask == 1. ? in_shader.eval(p).a > 0. ? 1. : 0. : 1.;\n" + " return mix(waveColor, sparkleColor, sparkleAlpha) * mask;\n" + "}"; private static final String SHADER = SHADER_UNIFORMS + SHADER_LIB + SHADER_MAIN; Loading
libs/hwui/effects/StretchEffect.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ static const SkString stretchShader = SkString(R"( ); coord.x = outU; coord.y = outV; return sample(uContentTexture, coord); return uContentTexture.eval(coord); })"); static const float ZERO = 0.f; Loading
tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ public class ColorFiltersMutateActivity extends Activity { "uniform shader bitmapShader;\n" + "uniform float param1;\n" + "half4 main(float2 xy) {\n" + " return half4(sample(bitmapShader, xy).rgb, param1);\n" + " return half4(bitmapShader.eval(xy).rgb, param1);\n" + "}\n"; BitmapsView(Context c) { Loading
tests/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ public class RippleActivity extends Activity { + " d = rand(float2(x, y)) > density ? d : d * .2;\n" + " d = d * rand(float2(fraction, x * y));\n" + " float alpha = 1. - pow(fraction, 3.);\n" + " return float4(sample(in_paintColor, p).rgb, d * alpha);\n" + " return float4(in_paintColor.eval(p).rgb, d * alpha);\n" + "}"; RippleView(Context c) { Loading
tests/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -532,6 +532,6 @@ public class StretchShaderActivity extends Activity { + " uv.y = outV;\n" + " coord.x = uv.x * viewportWidth;\n" + " coord.y = uv.y * viewportHeight;\n" + " return sample(uContentTexture, coord);\n" + " return uContentTexture.eval(coord);\n" + "}"; }