Loading api/current.txt +2 −5 Original line number Original line Diff line number Diff line Loading @@ -346,7 +346,6 @@ package android { field public static final int canRetrieveWindowContent = 16843653; // 0x1010385 field public static final int canRetrieveWindowContent = 16843653; // 0x1010385 field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230 field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230 field public static final deprecated int capitalize = 16843113; // 0x1010169 field public static final deprecated int capitalize = 16843113; // 0x1010169 field public static final int castsShadow = 16843775; // 0x10103ff field public static final int category = 16843752; // 0x10103e8 field public static final int category = 16843752; // 0x10103e8 field public static final int centerBright = 16842956; // 0x10100cc field public static final int centerBright = 16842956; // 0x10100cc field public static final int centerColor = 16843275; // 0x101020b field public static final int centerColor = 16843275; // 0x101020b Loading Loading @@ -826,7 +825,7 @@ package android { field public static final int persistent = 16842765; // 0x101000d field public static final int persistent = 16842765; // 0x101000d field public static final int persistentDrawingCache = 16842990; // 0x10100ee field public static final int persistentDrawingCache = 16842990; // 0x10100ee field public static final deprecated int phoneNumber = 16843111; // 0x1010167 field public static final deprecated int phoneNumber = 16843111; // 0x1010167 field public static final int pinned = 16843777; // 0x1010401 field public static final int pinned = 16843776; // 0x1010400 field public static final int pivotX = 16843189; // 0x10101b5 field public static final int pivotX = 16843189; // 0x10101b5 field public static final int pivotY = 16843190; // 0x10101b6 field public static final int pivotY = 16843190; // 0x10101b6 field public static final int popupAnimationStyle = 16843465; // 0x10102c9 field public static final int popupAnimationStyle = 16843465; // 0x10102c9 Loading Loading @@ -890,7 +889,7 @@ package android { field public static final int required = 16843406; // 0x101028e field public static final int required = 16843406; // 0x101028e field public static final int requiredAccountType = 16843734; // 0x10103d6 field public static final int requiredAccountType = 16843734; // 0x10103d6 field public static final int requiredForAllUsers = 16843728; // 0x10103d0 field public static final int requiredForAllUsers = 16843728; // 0x10103d0 field public static final int requiredForProfile = 16843776; // 0x1010400 field public static final int requiredForProfile = 16843775; // 0x10103ff field public static final int requiresFadingEdge = 16843685; // 0x10103a5 field public static final int requiresFadingEdge = 16843685; // 0x10103a5 field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364 field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364 field public static final int resizeMode = 16843619; // 0x1010363 field public static final int resizeMode = 16843619; // 0x1010363 Loading Loading @@ -29017,7 +29016,6 @@ package android.view { method protected float getBottomFadingEdgeStrength(); method protected float getBottomFadingEdgeStrength(); method protected int getBottomPaddingOffset(); method protected int getBottomPaddingOffset(); method public float getCameraDistance(); method public float getCameraDistance(); method public final boolean getCastsShadow(); method public android.graphics.Rect getClipBounds(); method public android.graphics.Rect getClipBounds(); method public final boolean getClipToOutline(); method public final boolean getClipToOutline(); method public java.lang.CharSequence getContentDescription(); method public java.lang.CharSequence getContentDescription(); Loading Loading @@ -29287,7 +29285,6 @@ package android.view { method public void setBackgroundResource(int); method public void setBackgroundResource(int); method public final void setBottom(int); method public final void setBottom(int); method public void setCameraDistance(float); method public void setCameraDistance(float); method public void setCastsShadow(boolean); method public void setClickable(boolean); method public void setClickable(boolean); method public void setClipBounds(android.graphics.Rect); method public void setClipBounds(android.graphics.Rect); method public void setClipToOutline(boolean); method public void setClipToOutline(boolean); core/java/android/view/RenderNode.java +0 −21 Original line number Original line Diff line number Diff line Loading @@ -364,25 +364,6 @@ public class RenderNode { nSetClipToOutline(mNativeDisplayList, clipToOutline); nSetClipToOutline(mNativeDisplayList, clipToOutline); } } /** * Set whether the DisplayList should cast a shadow. * * The shape of the shadow casting area is defined by the outline of the display list, if set * and non-empty, otherwise it will be the bounds rect. */ public void setCastsShadow(boolean castsShadow) { nSetCastsShadow(mNativeDisplayList, castsShadow); } /** * Sets whether the DisplayList should be drawn with perspective applied from the global camera. * * If set to true, camera distance will be ignored. Defaults to false. */ public void setUsesGlobalCamera(boolean usesGlobalCamera) { nSetUsesGlobalCamera(mNativeDisplayList, usesGlobalCamera); } /** /** * Set the static matrix on the display list. The specified matrix is combined with other * Set the static matrix on the display list. The specified matrix is combined with other * transforms (such as {@link #setScaleX(float)}, {@link #setRotation(float)}, etc.) * transforms (such as {@link #setScaleX(float)}, {@link #setRotation(float)}, etc.) Loading Loading @@ -877,8 +858,6 @@ public class RenderNode { private static native void nSetIsolatedZVolume(long displayList, boolean isolateZVolume); private static native void nSetIsolatedZVolume(long displayList, boolean isolateZVolume); private static native void nSetOutline(long displayList, long nativePath); private static native void nSetOutline(long displayList, long nativePath); private static native void nSetClipToOutline(long displayList, boolean clipToOutline); private static native void nSetClipToOutline(long displayList, boolean clipToOutline); private static native void nSetCastsShadow(long displayList, boolean castsShadow); private static native void nSetUsesGlobalCamera(long displayList, boolean usesGlobalCamera); private static native void nSetAlpha(long displayList, float alpha); private static native void nSetAlpha(long displayList, float alpha); private static native void nSetHasOverlappingRendering(long displayList, private static native void nSetHasOverlappingRendering(long displayList, boolean hasOverlappingRendering); boolean hasOverlappingRendering); Loading core/java/android/view/View.java +2 −110 Original line number Original line Diff line number Diff line Loading @@ -2386,17 +2386,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ */ static final int PFLAG3_FITTING_SYSTEM_WINDOWS = 0x80; static final int PFLAG3_FITTING_SYSTEM_WINDOWS = 0x80; /** * Flag indicating that an view will cast a shadow onto the Z=0 plane if elevated. */ static final int PFLAG3_CASTS_SHADOW = 0x100; /** * Flag indicating that view will be transformed by the global camera if rotated in 3d, or given * a non-0 Z translation. */ static final int PFLAG3_USES_GLOBAL_CAMERA = 0x200; /* End of masks for mPrivateFlags3 */ /* End of masks for mPrivateFlags3 */ static final int DRAG_MASK = PFLAG2_DRAG_CAN_ACCEPT | PFLAG2_DRAG_HOVERED; static final int DRAG_MASK = PFLAG2_DRAG_CAN_ACCEPT | PFLAG2_DRAG_HOVERED; Loading Loading @@ -4039,11 +4028,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, case R.styleable.View_layerType: case R.styleable.View_layerType: setLayerType(a.getInt(attr, LAYER_TYPE_NONE), null); setLayerType(a.getInt(attr, LAYER_TYPE_NONE), null); break; break; case R.styleable.View_castsShadow: if (a.getBoolean(attr, false)) { mPrivateFlags3 |= PFLAG3_CASTS_SHADOW; } break; case R.styleable.View_textDirection: case R.styleable.View_textDirection: // Clear any text direction flag already set // Clear any text direction flag already set mPrivateFlags2 &= ~PFLAG2_TEXT_DIRECTION_MASK; mPrivateFlags2 &= ~PFLAG2_TEXT_DIRECTION_MASK; Loading Loading @@ -10852,7 +10836,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * * @param outline The new outline of the view. Must be non-null, and convex. * @param outline The new outline of the view. Must be non-null, and convex. * * * @see #setCastsShadow(boolean) * @see #getOutline(Path) * @see #getOutline(Path) * @see #getClipToOutline() * @see #getClipToOutline() * @see #setClipToOutline(boolean) * @see #setClipToOutline(boolean) Loading Loading @@ -10915,95 +10898,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } } } /** * Returns whether the View will cast shadows when its * {@link #setTranslationZ(float) z translation} is greater than 0, or it is * rotated in 3D. * * @see #setTranslationZ(float) * @see #setRotationX(float) * @see #setRotationY(float) * @see #setCastsShadow(boolean) * @attr ref android.R.styleable#View_castsShadow */ public final boolean getCastsShadow() { return ((mPrivateFlags3 & PFLAG3_CASTS_SHADOW) != 0); } /** * Set to true to enable this View to cast shadows. * <p> * If enabled, and the View has a z translation greater than 0, or is * rotated in 3D, the shadow will be cast onto its parent at the z = 0 * plane. * <p> * The shape of the shadow being cast is defined by the * {@link #setOutline(Path) outline} of the view, or the rectangular bounds * of the view if the outline is not set or is empty. * * @see #setTranslationZ(float) * @see #getCastsShadow() * @attr ref android.R.styleable#View_castsShadow */ public void setCastsShadow(boolean castsShadow) { // TODO : Add a fast invalidation here. if (getCastsShadow() != castsShadow) { if (castsShadow) { mPrivateFlags3 |= PFLAG3_CASTS_SHADOW; } else { mPrivateFlags3 &= ~PFLAG3_CASTS_SHADOW; } if (mDisplayList != null) { mDisplayList.setCastsShadow(castsShadow); } } } /** * Returns whether the View will be transformed by the global camera. * * @see #setUsesGlobalCamera(boolean) * * @hide */ public final boolean getUsesGlobalCamera() { return ((mPrivateFlags3 & PFLAG3_USES_GLOBAL_CAMERA) != 0); } /** * Sets whether the View should be transformed by the global camera. * <p> * If the view has a Z translation or 3D rotation, perspective from the * global camera will be applied. This enables an app to transform multiple * views in 3D with coherent perspective projection among them all. * <p> * Setting this to true will cause {@link #setCameraDistance() camera distance} * to be ignored, as the global camera's position will dictate perspective * transform. * <p> * This should not be used in conjunction with {@link android.graphics.Camera}. * * @see #getUsesGlobalCamera() * @see #setTranslationZ(float) * @see #setRotationX(float) * @see #setRotationY(float) * * @hide */ public void setUsesGlobalCamera(boolean usesGlobalCamera) { // TODO : Add a fast invalidation here. if (getUsesGlobalCamera() != usesGlobalCamera) { if (usesGlobalCamera) { mPrivateFlags3 |= PFLAG3_USES_GLOBAL_CAMERA; } else { mPrivateFlags3 &= ~PFLAG3_USES_GLOBAL_CAMERA; } if (mDisplayList != null) { mDisplayList.setUsesGlobalCamera(usesGlobalCamera); } } } /** /** * Hit rectangle in parent's coordinates * Hit rectangle in parent's coordinates * * Loading Loading @@ -11567,7 +11461,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } // Damage the entire IsolatedZVolume recieving this view's shadow. // Damage the entire IsolatedZVolume recieving this view's shadow. if (getCastsShadow() && getTranslationZ() != 0) { if (getTranslationZ() != 0) { damageIsolatedZVolume(); damageIsolatedZVolume(); } } } } Loading Loading @@ -11647,7 +11541,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } else { } else { damageInParent(); damageInParent(); } } if (invalidateParent && getCastsShadow() && getTranslationZ() != 0) { if (invalidateParent && getTranslationZ() != 0) { damageIsolatedZVolume(); damageIsolatedZVolume(); } } } } Loading Loading @@ -14685,8 +14579,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } displayList.setOutline(mOutline); displayList.setOutline(mOutline); displayList.setClipToOutline(getClipToOutline()); displayList.setClipToOutline(getClipToOutline()); displayList.setCastsShadow(getCastsShadow()); displayList.setUsesGlobalCamera(getUsesGlobalCamera()); float alpha = 1; float alpha = 1; if (mParent instanceof ViewGroup && (((ViewGroup) mParent).mGroupFlags & if (mParent instanceof ViewGroup && (((ViewGroup) mParent).mGroupFlags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) { ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) { core/jni/android_view_RenderNode.cpp +0 −14 Original line number Original line Diff line number Diff line Loading @@ -128,18 +128,6 @@ static void android_view_RenderNode_setClipToOutline(JNIEnv* env, displayList->properties().setClipToOutline(clipToOutline); displayList->properties().setClipToOutline(clipToOutline); } } static void android_view_RenderNode_setCastsShadow(JNIEnv* env, jobject clazz, jlong displayListPtr, jboolean castsShadow) { RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); displayList->properties().setCastsShadow(castsShadow); } static void android_view_RenderNode_setUsesGlobalCamera(JNIEnv* env, jobject clazz, jlong displayListPtr, jboolean usesGlobalCamera) { RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); displayList->properties().setUsesGlobalCamera(usesGlobalCamera); } static void android_view_RenderNode_setAlpha(JNIEnv* env, static void android_view_RenderNode_setAlpha(JNIEnv* env, jobject clazz, jlong displayListPtr, float alpha) { jobject clazz, jlong displayListPtr, float alpha) { RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); Loading Loading @@ -398,8 +386,6 @@ static JNINativeMethod gMethods[] = { { "nSetProjectionReceiver","(JZ)V", (void*) android_view_RenderNode_setProjectionReceiver }, { "nSetProjectionReceiver","(JZ)V", (void*) android_view_RenderNode_setProjectionReceiver }, { "nSetOutline", "(JJ)V", (void*) android_view_RenderNode_setOutline }, { "nSetOutline", "(JJ)V", (void*) android_view_RenderNode_setOutline }, { "nSetClipToOutline", "(JZ)V", (void*) android_view_RenderNode_setClipToOutline }, { "nSetClipToOutline", "(JZ)V", (void*) android_view_RenderNode_setClipToOutline }, { "nSetCastsShadow", "(JZ)V", (void*) android_view_RenderNode_setCastsShadow }, { "nSetUsesGlobalCamera", "(JZ)V", (void*) android_view_RenderNode_setUsesGlobalCamera }, { "nSetAlpha", "(JF)V", (void*) android_view_RenderNode_setAlpha }, { "nSetAlpha", "(JF)V", (void*) android_view_RenderNode_setAlpha }, { "nSetHasOverlappingRendering", "(JZ)V", { "nSetHasOverlappingRendering", "(JZ)V", (void*) android_view_RenderNode_setHasOverlappingRendering }, (void*) android_view_RenderNode_setHasOverlappingRendering }, Loading core/res/res/values/attrs.xml +0 −4 Original line number Original line Diff line number Diff line Loading @@ -2132,10 +2132,6 @@ <!-- scale of the view in the y direction. --> <!-- scale of the view in the y direction. --> <attr name="scaleY" format="float" /> <attr name="scaleY" format="float" /> <!-- Defines whether the View casts a shadow when it has a 3D rotation or Z translation.--> <attr name="castsShadow" format="boolean" /> <!-- Determines which side the vertical scroll bar should be placed on. --> <!-- Determines which side the vertical scroll bar should be placed on. --> <attr name="verticalScrollbarPosition"> <attr name="verticalScrollbarPosition"> <!-- Place the scroll bar wherever the system default determines. --> <!-- Place the scroll bar wherever the system default determines. --> Loading Loading
api/current.txt +2 −5 Original line number Original line Diff line number Diff line Loading @@ -346,7 +346,6 @@ package android { field public static final int canRetrieveWindowContent = 16843653; // 0x1010385 field public static final int canRetrieveWindowContent = 16843653; // 0x1010385 field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230 field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230 field public static final deprecated int capitalize = 16843113; // 0x1010169 field public static final deprecated int capitalize = 16843113; // 0x1010169 field public static final int castsShadow = 16843775; // 0x10103ff field public static final int category = 16843752; // 0x10103e8 field public static final int category = 16843752; // 0x10103e8 field public static final int centerBright = 16842956; // 0x10100cc field public static final int centerBright = 16842956; // 0x10100cc field public static final int centerColor = 16843275; // 0x101020b field public static final int centerColor = 16843275; // 0x101020b Loading Loading @@ -826,7 +825,7 @@ package android { field public static final int persistent = 16842765; // 0x101000d field public static final int persistent = 16842765; // 0x101000d field public static final int persistentDrawingCache = 16842990; // 0x10100ee field public static final int persistentDrawingCache = 16842990; // 0x10100ee field public static final deprecated int phoneNumber = 16843111; // 0x1010167 field public static final deprecated int phoneNumber = 16843111; // 0x1010167 field public static final int pinned = 16843777; // 0x1010401 field public static final int pinned = 16843776; // 0x1010400 field public static final int pivotX = 16843189; // 0x10101b5 field public static final int pivotX = 16843189; // 0x10101b5 field public static final int pivotY = 16843190; // 0x10101b6 field public static final int pivotY = 16843190; // 0x10101b6 field public static final int popupAnimationStyle = 16843465; // 0x10102c9 field public static final int popupAnimationStyle = 16843465; // 0x10102c9 Loading Loading @@ -890,7 +889,7 @@ package android { field public static final int required = 16843406; // 0x101028e field public static final int required = 16843406; // 0x101028e field public static final int requiredAccountType = 16843734; // 0x10103d6 field public static final int requiredAccountType = 16843734; // 0x10103d6 field public static final int requiredForAllUsers = 16843728; // 0x10103d0 field public static final int requiredForAllUsers = 16843728; // 0x10103d0 field public static final int requiredForProfile = 16843776; // 0x1010400 field public static final int requiredForProfile = 16843775; // 0x10103ff field public static final int requiresFadingEdge = 16843685; // 0x10103a5 field public static final int requiresFadingEdge = 16843685; // 0x10103a5 field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364 field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364 field public static final int resizeMode = 16843619; // 0x1010363 field public static final int resizeMode = 16843619; // 0x1010363 Loading Loading @@ -29017,7 +29016,6 @@ package android.view { method protected float getBottomFadingEdgeStrength(); method protected float getBottomFadingEdgeStrength(); method protected int getBottomPaddingOffset(); method protected int getBottomPaddingOffset(); method public float getCameraDistance(); method public float getCameraDistance(); method public final boolean getCastsShadow(); method public android.graphics.Rect getClipBounds(); method public android.graphics.Rect getClipBounds(); method public final boolean getClipToOutline(); method public final boolean getClipToOutline(); method public java.lang.CharSequence getContentDescription(); method public java.lang.CharSequence getContentDescription(); Loading Loading @@ -29287,7 +29285,6 @@ package android.view { method public void setBackgroundResource(int); method public void setBackgroundResource(int); method public final void setBottom(int); method public final void setBottom(int); method public void setCameraDistance(float); method public void setCameraDistance(float); method public void setCastsShadow(boolean); method public void setClickable(boolean); method public void setClickable(boolean); method public void setClipBounds(android.graphics.Rect); method public void setClipBounds(android.graphics.Rect); method public void setClipToOutline(boolean); method public void setClipToOutline(boolean);
core/java/android/view/RenderNode.java +0 −21 Original line number Original line Diff line number Diff line Loading @@ -364,25 +364,6 @@ public class RenderNode { nSetClipToOutline(mNativeDisplayList, clipToOutline); nSetClipToOutline(mNativeDisplayList, clipToOutline); } } /** * Set whether the DisplayList should cast a shadow. * * The shape of the shadow casting area is defined by the outline of the display list, if set * and non-empty, otherwise it will be the bounds rect. */ public void setCastsShadow(boolean castsShadow) { nSetCastsShadow(mNativeDisplayList, castsShadow); } /** * Sets whether the DisplayList should be drawn with perspective applied from the global camera. * * If set to true, camera distance will be ignored. Defaults to false. */ public void setUsesGlobalCamera(boolean usesGlobalCamera) { nSetUsesGlobalCamera(mNativeDisplayList, usesGlobalCamera); } /** /** * Set the static matrix on the display list. The specified matrix is combined with other * Set the static matrix on the display list. The specified matrix is combined with other * transforms (such as {@link #setScaleX(float)}, {@link #setRotation(float)}, etc.) * transforms (such as {@link #setScaleX(float)}, {@link #setRotation(float)}, etc.) Loading Loading @@ -877,8 +858,6 @@ public class RenderNode { private static native void nSetIsolatedZVolume(long displayList, boolean isolateZVolume); private static native void nSetIsolatedZVolume(long displayList, boolean isolateZVolume); private static native void nSetOutline(long displayList, long nativePath); private static native void nSetOutline(long displayList, long nativePath); private static native void nSetClipToOutline(long displayList, boolean clipToOutline); private static native void nSetClipToOutline(long displayList, boolean clipToOutline); private static native void nSetCastsShadow(long displayList, boolean castsShadow); private static native void nSetUsesGlobalCamera(long displayList, boolean usesGlobalCamera); private static native void nSetAlpha(long displayList, float alpha); private static native void nSetAlpha(long displayList, float alpha); private static native void nSetHasOverlappingRendering(long displayList, private static native void nSetHasOverlappingRendering(long displayList, boolean hasOverlappingRendering); boolean hasOverlappingRendering); Loading
core/java/android/view/View.java +2 −110 Original line number Original line Diff line number Diff line Loading @@ -2386,17 +2386,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ */ static final int PFLAG3_FITTING_SYSTEM_WINDOWS = 0x80; static final int PFLAG3_FITTING_SYSTEM_WINDOWS = 0x80; /** * Flag indicating that an view will cast a shadow onto the Z=0 plane if elevated. */ static final int PFLAG3_CASTS_SHADOW = 0x100; /** * Flag indicating that view will be transformed by the global camera if rotated in 3d, or given * a non-0 Z translation. */ static final int PFLAG3_USES_GLOBAL_CAMERA = 0x200; /* End of masks for mPrivateFlags3 */ /* End of masks for mPrivateFlags3 */ static final int DRAG_MASK = PFLAG2_DRAG_CAN_ACCEPT | PFLAG2_DRAG_HOVERED; static final int DRAG_MASK = PFLAG2_DRAG_CAN_ACCEPT | PFLAG2_DRAG_HOVERED; Loading Loading @@ -4039,11 +4028,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, case R.styleable.View_layerType: case R.styleable.View_layerType: setLayerType(a.getInt(attr, LAYER_TYPE_NONE), null); setLayerType(a.getInt(attr, LAYER_TYPE_NONE), null); break; break; case R.styleable.View_castsShadow: if (a.getBoolean(attr, false)) { mPrivateFlags3 |= PFLAG3_CASTS_SHADOW; } break; case R.styleable.View_textDirection: case R.styleable.View_textDirection: // Clear any text direction flag already set // Clear any text direction flag already set mPrivateFlags2 &= ~PFLAG2_TEXT_DIRECTION_MASK; mPrivateFlags2 &= ~PFLAG2_TEXT_DIRECTION_MASK; Loading Loading @@ -10852,7 +10836,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * * @param outline The new outline of the view. Must be non-null, and convex. * @param outline The new outline of the view. Must be non-null, and convex. * * * @see #setCastsShadow(boolean) * @see #getOutline(Path) * @see #getOutline(Path) * @see #getClipToOutline() * @see #getClipToOutline() * @see #setClipToOutline(boolean) * @see #setClipToOutline(boolean) Loading Loading @@ -10915,95 +10898,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } } } /** * Returns whether the View will cast shadows when its * {@link #setTranslationZ(float) z translation} is greater than 0, or it is * rotated in 3D. * * @see #setTranslationZ(float) * @see #setRotationX(float) * @see #setRotationY(float) * @see #setCastsShadow(boolean) * @attr ref android.R.styleable#View_castsShadow */ public final boolean getCastsShadow() { return ((mPrivateFlags3 & PFLAG3_CASTS_SHADOW) != 0); } /** * Set to true to enable this View to cast shadows. * <p> * If enabled, and the View has a z translation greater than 0, or is * rotated in 3D, the shadow will be cast onto its parent at the z = 0 * plane. * <p> * The shape of the shadow being cast is defined by the * {@link #setOutline(Path) outline} of the view, or the rectangular bounds * of the view if the outline is not set or is empty. * * @see #setTranslationZ(float) * @see #getCastsShadow() * @attr ref android.R.styleable#View_castsShadow */ public void setCastsShadow(boolean castsShadow) { // TODO : Add a fast invalidation here. if (getCastsShadow() != castsShadow) { if (castsShadow) { mPrivateFlags3 |= PFLAG3_CASTS_SHADOW; } else { mPrivateFlags3 &= ~PFLAG3_CASTS_SHADOW; } if (mDisplayList != null) { mDisplayList.setCastsShadow(castsShadow); } } } /** * Returns whether the View will be transformed by the global camera. * * @see #setUsesGlobalCamera(boolean) * * @hide */ public final boolean getUsesGlobalCamera() { return ((mPrivateFlags3 & PFLAG3_USES_GLOBAL_CAMERA) != 0); } /** * Sets whether the View should be transformed by the global camera. * <p> * If the view has a Z translation or 3D rotation, perspective from the * global camera will be applied. This enables an app to transform multiple * views in 3D with coherent perspective projection among them all. * <p> * Setting this to true will cause {@link #setCameraDistance() camera distance} * to be ignored, as the global camera's position will dictate perspective * transform. * <p> * This should not be used in conjunction with {@link android.graphics.Camera}. * * @see #getUsesGlobalCamera() * @see #setTranslationZ(float) * @see #setRotationX(float) * @see #setRotationY(float) * * @hide */ public void setUsesGlobalCamera(boolean usesGlobalCamera) { // TODO : Add a fast invalidation here. if (getUsesGlobalCamera() != usesGlobalCamera) { if (usesGlobalCamera) { mPrivateFlags3 |= PFLAG3_USES_GLOBAL_CAMERA; } else { mPrivateFlags3 &= ~PFLAG3_USES_GLOBAL_CAMERA; } if (mDisplayList != null) { mDisplayList.setUsesGlobalCamera(usesGlobalCamera); } } } /** /** * Hit rectangle in parent's coordinates * Hit rectangle in parent's coordinates * * Loading Loading @@ -11567,7 +11461,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } // Damage the entire IsolatedZVolume recieving this view's shadow. // Damage the entire IsolatedZVolume recieving this view's shadow. if (getCastsShadow() && getTranslationZ() != 0) { if (getTranslationZ() != 0) { damageIsolatedZVolume(); damageIsolatedZVolume(); } } } } Loading Loading @@ -11647,7 +11541,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } else { } else { damageInParent(); damageInParent(); } } if (invalidateParent && getCastsShadow() && getTranslationZ() != 0) { if (invalidateParent && getTranslationZ() != 0) { damageIsolatedZVolume(); damageIsolatedZVolume(); } } } } Loading Loading @@ -14685,8 +14579,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } displayList.setOutline(mOutline); displayList.setOutline(mOutline); displayList.setClipToOutline(getClipToOutline()); displayList.setClipToOutline(getClipToOutline()); displayList.setCastsShadow(getCastsShadow()); displayList.setUsesGlobalCamera(getUsesGlobalCamera()); float alpha = 1; float alpha = 1; if (mParent instanceof ViewGroup && (((ViewGroup) mParent).mGroupFlags & if (mParent instanceof ViewGroup && (((ViewGroup) mParent).mGroupFlags & ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) { ViewGroup.FLAG_SUPPORT_STATIC_TRANSFORMATIONS) != 0) {
core/jni/android_view_RenderNode.cpp +0 −14 Original line number Original line Diff line number Diff line Loading @@ -128,18 +128,6 @@ static void android_view_RenderNode_setClipToOutline(JNIEnv* env, displayList->properties().setClipToOutline(clipToOutline); displayList->properties().setClipToOutline(clipToOutline); } } static void android_view_RenderNode_setCastsShadow(JNIEnv* env, jobject clazz, jlong displayListPtr, jboolean castsShadow) { RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); displayList->properties().setCastsShadow(castsShadow); } static void android_view_RenderNode_setUsesGlobalCamera(JNIEnv* env, jobject clazz, jlong displayListPtr, jboolean usesGlobalCamera) { RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); displayList->properties().setUsesGlobalCamera(usesGlobalCamera); } static void android_view_RenderNode_setAlpha(JNIEnv* env, static void android_view_RenderNode_setAlpha(JNIEnv* env, jobject clazz, jlong displayListPtr, float alpha) { jobject clazz, jlong displayListPtr, float alpha) { RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr); Loading Loading @@ -398,8 +386,6 @@ static JNINativeMethod gMethods[] = { { "nSetProjectionReceiver","(JZ)V", (void*) android_view_RenderNode_setProjectionReceiver }, { "nSetProjectionReceiver","(JZ)V", (void*) android_view_RenderNode_setProjectionReceiver }, { "nSetOutline", "(JJ)V", (void*) android_view_RenderNode_setOutline }, { "nSetOutline", "(JJ)V", (void*) android_view_RenderNode_setOutline }, { "nSetClipToOutline", "(JZ)V", (void*) android_view_RenderNode_setClipToOutline }, { "nSetClipToOutline", "(JZ)V", (void*) android_view_RenderNode_setClipToOutline }, { "nSetCastsShadow", "(JZ)V", (void*) android_view_RenderNode_setCastsShadow }, { "nSetUsesGlobalCamera", "(JZ)V", (void*) android_view_RenderNode_setUsesGlobalCamera }, { "nSetAlpha", "(JF)V", (void*) android_view_RenderNode_setAlpha }, { "nSetAlpha", "(JF)V", (void*) android_view_RenderNode_setAlpha }, { "nSetHasOverlappingRendering", "(JZ)V", { "nSetHasOverlappingRendering", "(JZ)V", (void*) android_view_RenderNode_setHasOverlappingRendering }, (void*) android_view_RenderNode_setHasOverlappingRendering }, Loading
core/res/res/values/attrs.xml +0 −4 Original line number Original line Diff line number Diff line Loading @@ -2132,10 +2132,6 @@ <!-- scale of the view in the y direction. --> <!-- scale of the view in the y direction. --> <attr name="scaleY" format="float" /> <attr name="scaleY" format="float" /> <!-- Defines whether the View casts a shadow when it has a 3D rotation or Z translation.--> <attr name="castsShadow" format="boolean" /> <!-- Determines which side the vertical scroll bar should be placed on. --> <!-- Determines which side the vertical scroll bar should be placed on. --> <attr name="verticalScrollbarPosition"> <attr name="verticalScrollbarPosition"> <!-- Place the scroll bar wherever the system default determines. --> <!-- Place the scroll bar wherever the system default determines. --> Loading