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

Commit 99473d17 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Reland "Make Paint default to filtering Bitmaps"

Bug: 77949917
Test: Iac4922cfa86c0c2b3b6c88b39d9b702ab046cd34

In P, the switch to Skia HW rendering lost a feature of HWUI's old
renderer: using a Paint with a BitmapShader resulted in filtering the
Bitmap, regardless of whether FILTER_BITMAP_FLAG was set.

This somewhat restores that behavior, in that it results in filtering
BitmapShaders so long as the client doesn't explicitly turn it off. This
also means that it continues to be possible to get a pixellated drawing
if the client *does* explicitly turn it off.

This reverts commit 1b6927db. Original
CL was reverted due to a broken CTS test, which will be updated along
with this.

Change-Id: I61394b4ca6b93ba8405a0127b9c308444abfcbc2
parent ea5c6480
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -229,7 +229,8 @@ public class Paint {
    public static final int VERTICAL_TEXT_FLAG = 0x1000;

    // These flags are always set on a new/reset paint, even if flags 0 is passed.
    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;

    /**
     * Font hinter option that disables font hinting.