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

Commit 81dd9d0c authored by Leon Scroggins's avatar Leon Scroggins Committed by Automerger Merge Worker
Browse files

Merge "Do not turn on dithering by default" into sc-dev am: 98177904

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15502988

Change-Id: Idc5e45728de25305fa678e4db3d2a19145310b81
parents f08acfef 98177904
Loading
Loading
Loading
Loading
+5 −11
Original line number Original line Diff line number Diff line
@@ -254,12 +254,6 @@ public class Paint {
    static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
    static final int HIDDEN_DEFAULT_PAINT_FLAGS = DEV_KERN_TEXT_FLAG | EMBEDDED_BITMAP_TEXT_FLAG
            | FILTER_BITMAP_FLAG;
            | FILTER_BITMAP_FLAG;


    /**
     * These flags are always set on a reset paint or a new paint instantiated using
     * {@link #Paint()}.
     */
    private static final int DEFAULT_PAINT_FLAGS = ANTI_ALIAS_FLAG | DITHER_FLAG;

    /**
    /**
     * Font hinter option that disables font hinting.
     * Font hinter option that disables font hinting.
     *
     *
@@ -577,12 +571,12 @@ public class Paint {
     * On devices running {@link Build.VERSION_CODES#Q} and above,
     * On devices running {@link Build.VERSION_CODES#Q} and above,
     * {@code FILTER_BITMAP_FLAG} is set by this constructor, and it can be
     * {@code FILTER_BITMAP_FLAG} is set by this constructor, and it can be
     * cleared with {@link #setFlags} or {@link #setFilterBitmap}.
     * cleared with {@link #setFlags} or {@link #setFilterBitmap}.
     * On devices running {@link Build.VERSION_CODES#S} and above, {@code ANTI_ALIAS_FLAG} and
     * On devices running {@link Build.VERSION_CODES#S} and above, {@code ANTI_ALIAS_FLAG}
     * {@code DITHER_FLAG} are set by this constructor, and they can be cleared with
     * is set by this constructor, and it can be cleared with {@link #setFlags} or
     * {@link #setFlags} or {@link #setAntiAlias} and {@link #setDither}, respectively.</p>
     * {@link #setAntiAlias}.</p>
     */
     */
    public Paint() {
    public Paint() {
        this(DEFAULT_PAINT_FLAGS);
        this(ANTI_ALIAS_FLAG);
    }
    }


    /**
    /**
@@ -627,7 +621,7 @@ public class Paint {
    /** Restores the paint to its default settings. */
    /** Restores the paint to its default settings. */
    public void reset() {
    public void reset() {
        nReset(mNativePaint);
        nReset(mNativePaint);
        setFlags(HIDDEN_DEFAULT_PAINT_FLAGS | DEFAULT_PAINT_FLAGS);
        setFlags(HIDDEN_DEFAULT_PAINT_FLAGS | ANTI_ALIAS_FLAG);


        // TODO: Turning off hinting has undesirable side effects, we need to
        // TODO: Turning off hinting has undesirable side effects, we need to
        //       revisit hinting once we add support for subpixel positioning
        //       revisit hinting once we add support for subpixel positioning