From 1a732211990d88549e0ee18afc087f068d22069e Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Wed, 13 Mar 2019 15:24:18 -0400 Subject: Make Paint default to filtering Bitmaps Bug: 77949917 Test: I5737be68dccdc5ebb38291bf3515ae25553dcfc2 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. Change-Id: I62c726a0ba281de239092f066a3df041ecbcee5b --- graphics/java/android/graphics/Paint.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'graphics/java/android') diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java index 79ee4a9c2746..650865d442c2 100644 --- a/graphics/java/android/graphics/Paint.java +++ b/graphics/java/android/graphics/Paint.java @@ -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. -- cgit v1.2.3-59-g8ed1b