summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/GLES20Canvas.java15
-rw-r--r--core/java/android/widget/TextView.java5
2 files changed, 4 insertions, 16 deletions
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index 34b85d9..5b2ce60 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -42,7 +42,6 @@ import android.text.TextUtils;
class GLES20Canvas extends HardwareCanvas {
// Must match modifiers used in the JNI layer
private static final int MODIFIER_NONE = 0;
- private static final int MODIFIER_SHADOW = 1;
private static final int MODIFIER_SHADER = 2;
private final boolean mOpaque;
@@ -1307,12 +1306,6 @@ class GLES20Canvas extends HardwareCanvas {
private int setupModifiers(Paint paint) {
int modifiers = MODIFIER_NONE;
- if (paint.hasShadow) {
- nSetupShadow(mRenderer, paint.shadowRadius, paint.shadowDx, paint.shadowDy,
- paint.shadowColor);
- modifiers |= MODIFIER_SHADOW;
- }
-
final Shader shader = paint.getShader();
if (shader != null) {
nSetupShader(mRenderer, shader.native_shader);
@@ -1325,12 +1318,6 @@ class GLES20Canvas extends HardwareCanvas {
private int setupModifiers(Paint paint, int flags) {
int modifiers = MODIFIER_NONE;
- if (paint.hasShadow && (flags & MODIFIER_SHADOW) != 0) {
- nSetupShadow(mRenderer, paint.shadowRadius, paint.shadowDx, paint.shadowDy,
- paint.shadowColor);
- modifiers |= MODIFIER_SHADOW;
- }
-
final Shader shader = paint.getShader();
if (shader != null && (flags & MODIFIER_SHADER) != 0) {
nSetupShader(mRenderer, shader.native_shader);
@@ -1341,8 +1328,6 @@ class GLES20Canvas extends HardwareCanvas {
}
private static native void nSetupShader(long renderer, long shader);
- private static native void nSetupShadow(long renderer, float radius,
- float dx, float dy, int color);
private static native void nResetModifiers(long renderer, int modifiers);
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index b91111d..8f073de 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -289,6 +289,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
private Spannable.Factory mSpannableFactory = Spannable.Factory.getInstance();
private float mShadowRadius, mShadowDx, mShadowDy;
+ private int mShadowColor;
+
private boolean mPreDrawRegistered;
@@ -2755,6 +2757,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mShadowRadius = radius;
mShadowDx = dx;
mShadowDy = dy;
+ mShadowColor = color;
// Will change text clip region
if (mEditor != null) mEditor.invalidateTextDisplayList();
@@ -2804,7 +2807,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_shadowColor
*/
public int getShadowColor() {
- return mTextPaint.shadowColor;
+ return mShadowColor;
}
/**