Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 735821fc authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Simplify black texture fragment shader."

parents 5fdc0c73 9db91243
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -99,7 +98,8 @@ public class NinePatchDrawable extends Drawable {
        mPadding = state.mPadding;
        mTargetDensity = res != null ? res.getDisplayMetrics().densityDpi
                : state.mTargetDensity;
        if (DEFAULT_DITHER != state.mDither) {
        //noinspection PointlessBooleanExpression
        if (state.mDither != DEFAULT_DITHER) {
            // avoid calling the setter unless we need to, since it does a
            // lazy allocation of a paint
            setDither(state.mDither);
+2 −2
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ const char* gFS_Fast_SingleModulateTexture =
        "}\n\n";
const char* gFS_Fast_SingleA8Texture =
        "\nvoid main(void) {\n"
        "    gl_FragColor = vec4(0.0, 0.0, 0.0, texture2D(sampler, outTexCoords).a);\n"
        "    gl_FragColor = texture2D(sampler, outTexCoords);\n"
        "}\n\n";
const char* gFS_Fast_SingleModulateA8Texture =
        "\nvoid main(void) {\n"
@@ -162,7 +162,7 @@ const char* gFS_Main_FetchTexture[2] = {
};
const char* gFS_Main_FetchA8Texture[2] = {
        // Don't modulate
        "    fragColor = vec4(0.0, 0.0, 0.0, texture2D(sampler, outTexCoords).a);\n",
        "    fragColor = texture2D(sampler, outTexCoords);\n",
        // Modulate
        "    fragColor = color * texture2D(sampler, outTexCoords).a;\n"
};