Loading core/java/android/view/View.java +1 −2 Original line number Diff line number Diff line Loading @@ -10128,8 +10128,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.ExportedProperty(category = "drawing") public boolean isOpaque() { return (mPrivateFlags & OPAQUE_MASK) == OPAQUE_MASK && ((mTransformationInfo != null ? mTransformationInfo.mAlpha : 1) >= 1.0f - ViewConfiguration.ALPHA_THRESHOLD); ((mTransformationInfo != null ? mTransformationInfo.mAlpha : 1.0f) >= 1.0f); } /** Loading core/java/android/view/ViewConfiguration.java +0 −18 Original line number Diff line number Diff line Loading @@ -29,24 +29,6 @@ import android.util.SparseArray; * Contains methods to standard constants used in the UI for timeouts, sizes, and distances. */ public class ViewConfiguration { /** * Expected bit depth of the display panel. * * @hide */ public static final float PANEL_BIT_DEPTH = 24; /** * Minimum alpha required for a view to draw. * * @hide */ public static final float ALPHA_THRESHOLD = 0.5f / PANEL_BIT_DEPTH; /** * @hide */ public static final float ALPHA_THRESHOLD_INT = 0x7f / PANEL_BIT_DEPTH; /** * Defines the width of the horizontal scrollbar and the height of the vertical scrollbar in * dips Loading libs/hwui/OpenGLRenderer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -45,8 +45,7 @@ namespace uirenderer { #define RAD_TO_DEG (180.0f / 3.14159265f) #define MIN_ANGLE 0.001f // TODO: This should be set in properties #define ALPHA_THRESHOLD (0x7f / PANEL_BIT_DEPTH) #define ALPHA_THRESHOLD 0 #define FILTER(paint) (paint && paint->isFilterBitmap() ? GL_LINEAR : GL_NEAREST) Loading Loading @@ -449,7 +448,7 @@ int OpenGLRenderer::saveLayer(float left, float top, float right, float bottom, int OpenGLRenderer::saveLayerAlpha(float left, float top, float right, float bottom, int alpha, int flags) { if (alpha >= 255 - ALPHA_THRESHOLD) { if (alpha >= 255) { return saveLayer(left, top, right, bottom, NULL, flags); } else { SkPaint paint; Loading libs/hwui/Program.h +2 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,8 @@ namespace uirenderer { #define PROGRAM_LOGD(...) #endif #define COLOR_COMPONENT_THRESHOLD (1.0f - (0.5f / PANEL_BIT_DEPTH)) #define COLOR_COMPONENT_INV_THRESHOLD (0.5f / PANEL_BIT_DEPTH) #define COLOR_COMPONENT_THRESHOLD 1.0f #define COLOR_COMPONENT_INV_THRESHOLD 0.0f #define PROGRAM_KEY_TEXTURE 0x1 #define PROGRAM_KEY_A8_TEXTURE 0x2 Loading libs/hwui/Properties.h +0 −3 Original line number Diff line number Diff line Loading @@ -78,9 +78,6 @@ enum DebugLevel { #define PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD "ro.text_gamma.black_threshold" #define PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD "ro.text_gamma.white_threshold" // TODO: This should be set by a system property #define PANEL_BIT_DEPTH 20 // Converts a number of mega-bytes into bytes #define MB(s) s * 1024 * 1024 Loading Loading
core/java/android/view/View.java +1 −2 Original line number Diff line number Diff line Loading @@ -10128,8 +10128,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.ExportedProperty(category = "drawing") public boolean isOpaque() { return (mPrivateFlags & OPAQUE_MASK) == OPAQUE_MASK && ((mTransformationInfo != null ? mTransformationInfo.mAlpha : 1) >= 1.0f - ViewConfiguration.ALPHA_THRESHOLD); ((mTransformationInfo != null ? mTransformationInfo.mAlpha : 1.0f) >= 1.0f); } /** Loading
core/java/android/view/ViewConfiguration.java +0 −18 Original line number Diff line number Diff line Loading @@ -29,24 +29,6 @@ import android.util.SparseArray; * Contains methods to standard constants used in the UI for timeouts, sizes, and distances. */ public class ViewConfiguration { /** * Expected bit depth of the display panel. * * @hide */ public static final float PANEL_BIT_DEPTH = 24; /** * Minimum alpha required for a view to draw. * * @hide */ public static final float ALPHA_THRESHOLD = 0.5f / PANEL_BIT_DEPTH; /** * @hide */ public static final float ALPHA_THRESHOLD_INT = 0x7f / PANEL_BIT_DEPTH; /** * Defines the width of the horizontal scrollbar and the height of the vertical scrollbar in * dips Loading
libs/hwui/OpenGLRenderer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -45,8 +45,7 @@ namespace uirenderer { #define RAD_TO_DEG (180.0f / 3.14159265f) #define MIN_ANGLE 0.001f // TODO: This should be set in properties #define ALPHA_THRESHOLD (0x7f / PANEL_BIT_DEPTH) #define ALPHA_THRESHOLD 0 #define FILTER(paint) (paint && paint->isFilterBitmap() ? GL_LINEAR : GL_NEAREST) Loading Loading @@ -449,7 +448,7 @@ int OpenGLRenderer::saveLayer(float left, float top, float right, float bottom, int OpenGLRenderer::saveLayerAlpha(float left, float top, float right, float bottom, int alpha, int flags) { if (alpha >= 255 - ALPHA_THRESHOLD) { if (alpha >= 255) { return saveLayer(left, top, right, bottom, NULL, flags); } else { SkPaint paint; Loading
libs/hwui/Program.h +2 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,8 @@ namespace uirenderer { #define PROGRAM_LOGD(...) #endif #define COLOR_COMPONENT_THRESHOLD (1.0f - (0.5f / PANEL_BIT_DEPTH)) #define COLOR_COMPONENT_INV_THRESHOLD (0.5f / PANEL_BIT_DEPTH) #define COLOR_COMPONENT_THRESHOLD 1.0f #define COLOR_COMPONENT_INV_THRESHOLD 0.0f #define PROGRAM_KEY_TEXTURE 0x1 #define PROGRAM_KEY_A8_TEXTURE 0x2 Loading
libs/hwui/Properties.h +0 −3 Original line number Diff line number Diff line Loading @@ -78,9 +78,6 @@ enum DebugLevel { #define PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD "ro.text_gamma.black_threshold" #define PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD "ro.text_gamma.white_threshold" // TODO: This should be set by a system property #define PANEL_BIT_DEPTH 20 // Converts a number of mega-bytes into bytes #define MB(s) s * 1024 * 1024 Loading