Loading core/java/android/view/ViewConfiguration.java +5 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ public class ViewConfiguration { * @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 Loading core/java/android/widget/TextView.java +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.widget; import android.view.ViewConfiguration; import com.android.internal.util.FastMath; import com.android.internal.widget.EditableInputConnection; Loading Loading @@ -3954,6 +3955,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override protected void onDraw(Canvas canvas) { if (mCurrentAlpha <= ViewConfiguration.ALPHA_THRESHOLD_INT) return; restartMarqueeIfNeeded(); // Draw the background for this view Loading Loading @@ -7047,6 +7050,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override protected float getLeftFadingEdgeStrength() { if (mCurrentAlpha <= ViewConfiguration.ALPHA_THRESHOLD_INT) return 0.0f; if (mEllipsize == TextUtils.TruncateAt.MARQUEE) { if (mMarquee != null && !mMarquee.isStopped()) { final Marquee marquee = mMarquee; Loading @@ -7073,6 +7077,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override protected float getRightFadingEdgeStrength() { if (mCurrentAlpha <= ViewConfiguration.ALPHA_THRESHOLD_INT) return 0.0f; if (mEllipsize == TextUtils.TruncateAt.MARQUEE) { if (mMarquee != null && !mMarquee.isStopped()) { final Marquee marquee = mMarquee; Loading libs/hwui/OpenGLRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -455,7 +455,7 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top, #endif // Clear the FBO glScissor(0.0f, 0.0f, bounds.getWidth(), bounds.getHeight()); glScissor(0.0f, 0.0f, bounds.getWidth() + 1.0f, bounds.getHeight() + 1.0f); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); Loading libs/hwui/Rect.h +4 −4 Original line number Diff line number Diff line Loading @@ -149,10 +149,10 @@ struct Rect { } void snapToPixelBoundaries() { left = floor(left); top = floor(top); right = ceil(right); bottom = ceil(bottom); left = floorf(left); top = floorf(top); right = ceilf(right); bottom = ceilf(bottom); } void dump() const { Loading Loading
core/java/android/view/ViewConfiguration.java +5 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ public class ViewConfiguration { * @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 Loading
core/java/android/widget/TextView.java +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.widget; import android.view.ViewConfiguration; import com.android.internal.util.FastMath; import com.android.internal.widget.EditableInputConnection; Loading Loading @@ -3954,6 +3955,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override protected void onDraw(Canvas canvas) { if (mCurrentAlpha <= ViewConfiguration.ALPHA_THRESHOLD_INT) return; restartMarqueeIfNeeded(); // Draw the background for this view Loading Loading @@ -7047,6 +7050,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override protected float getLeftFadingEdgeStrength() { if (mCurrentAlpha <= ViewConfiguration.ALPHA_THRESHOLD_INT) return 0.0f; if (mEllipsize == TextUtils.TruncateAt.MARQUEE) { if (mMarquee != null && !mMarquee.isStopped()) { final Marquee marquee = mMarquee; Loading @@ -7073,6 +7077,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override protected float getRightFadingEdgeStrength() { if (mCurrentAlpha <= ViewConfiguration.ALPHA_THRESHOLD_INT) return 0.0f; if (mEllipsize == TextUtils.TruncateAt.MARQUEE) { if (mMarquee != null && !mMarquee.isStopped()) { final Marquee marquee = mMarquee; Loading
libs/hwui/OpenGLRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -455,7 +455,7 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top, #endif // Clear the FBO glScissor(0.0f, 0.0f, bounds.getWidth(), bounds.getHeight()); glScissor(0.0f, 0.0f, bounds.getWidth() + 1.0f, bounds.getHeight() + 1.0f); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); Loading
libs/hwui/Rect.h +4 −4 Original line number Diff line number Diff line Loading @@ -149,10 +149,10 @@ struct Rect { } void snapToPixelBoundaries() { left = floor(left); top = floor(top); right = ceil(right); bottom = ceil(bottom); left = floorf(left); top = floorf(top); right = ceilf(right); bottom = ceilf(bottom); } void dump() const { Loading