diff options
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/view/DisplayList.java | 16 | ||||
-rw-r--r-- | core/java/android/view/View.java | 4 | ||||
-rw-r--r-- | core/java/android/view/ViewGroup.java | 41 |
3 files changed, 30 insertions, 31 deletions
diff --git a/core/java/android/view/DisplayList.java b/core/java/android/view/DisplayList.java index 439fc6c..5f6e7cf 100644 --- a/core/java/android/view/DisplayList.java +++ b/core/java/android/view/DisplayList.java @@ -406,26 +406,26 @@ public class DisplayList { * Set whether the display list should collect and Z order all 3d composited descendents, and * draw them in order with the default Z=0 content. * - * @param isContainedVolume true if the display list should collect and Z order descendents. + * @param isolateZVolume true if the display list should collect and Z order descendents. */ - public void setIsContainedVolume(boolean isContainedVolume) { + public void setIsolatedZVolume(boolean isolatedZVolume) { if (hasNativeDisplayList()) { - nSetIsContainedVolume(mFinalizer.mNativeDisplayList, isContainedVolume); + nSetIsolatedZVolume(mFinalizer.mNativeDisplayList, isolatedZVolume); } } /** * Sets whether the display list should be drawn immediately after the - * closest ancestor display list where isContainedVolume is true. If the + * closest ancestor display list where isolateZVolume is true. If the * display list itself satisfies this constraint, changing this attribute * has no effect on drawing order. * * @param shouldProject true if the display list should be projected onto a * containing volume. */ - public void setProjectToContainedVolume(boolean shouldProject) { + public void setProjectBackwards(boolean shouldProject) { if (hasNativeDisplayList()) { - nSetProjectToContainedVolume(mFinalizer.mNativeDisplayList, shouldProject); + nSetProjectBackwards(mFinalizer.mNativeDisplayList, shouldProject); } } @@ -1049,8 +1049,8 @@ public class DisplayList { private static native void nSetPivotX(long displayList, float pivotX); private static native void nSetCaching(long displayList, boolean caching); private static native void nSetClipToBounds(long displayList, boolean clipToBounds); - private static native void nSetProjectToContainedVolume(long displayList, boolean shouldProject); - private static native void nSetIsContainedVolume(long displayList, boolean isContainedVolume); + private static native void nSetProjectBackwards(long displayList, boolean shouldProject); + private static native void nSetIsolatedZVolume(long displayList, boolean isolateZVolume); private static native void nSetAlpha(long displayList, float alpha); private static native void nSetHasOverlappingRendering(long displayList, boolean hasOverlappingRendering); diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 52b1b39..9576602 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -14263,8 +14263,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, (((ViewGroup) mParent).mGroupFlags & ViewGroup.FLAG_CLIP_CHILDREN) != 0); } if (this instanceof ViewGroup) { - displayList.setIsContainedVolume( - (((ViewGroup) this).mGroupFlags & ViewGroup.FLAG_IS_CONTAINED_VOLUME) != 0); + displayList.setIsolatedZVolume( + (((ViewGroup) this).mGroupFlags & ViewGroup.FLAG_ISOLATED_Z_VOLUME) != 0); } float alpha = 1; if (mParent instanceof ViewGroup && (((ViewGroup) mParent).mGroupFlags & diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 241b1a7..bcf263b 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -358,7 +358,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * When true, indicates that all 3d composited descendents are contained within this group, and * will not be interleaved with other 3d composited content. */ - static final int FLAG_IS_CONTAINED_VOLUME = 0x1000000; + static final int FLAG_ISOLATED_Z_VOLUME = 0x1000000; /** * Indicates which types of drawing caches are to be kept in memory. @@ -492,7 +492,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager mGroupFlags |= FLAG_ANIMATION_DONE; mGroupFlags |= FLAG_ANIMATION_CACHE; mGroupFlags |= FLAG_ALWAYS_DRAWN_WITH_CACHE; - mGroupFlags |= FLAG_IS_CONTAINED_VOLUME; + mGroupFlags |= FLAG_ISOLATED_Z_VOLUME; if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB) { mGroupFlags |= FLAG_SPLIT_MOTION_EVENTS; @@ -520,6 +520,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager case R.styleable.ViewGroup_clipToPadding: setClipToPadding(a.getBoolean(attr, true)); break; + case R.styleable.ViewGroup_isolatedZVolume: + setIsolatedZVolume(a.getBoolean(attr, true)); + break; case R.styleable.ViewGroup_animationCache: setAnimationCacheEnabled(a.getBoolean(attr, true)); break; @@ -3115,34 +3118,30 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * independent Z volume. Views drawn in one contained volume will not * interleave with views in another, even if their Z values are interleaved. * The default value is true. - * @see #setIsContainedVolume(boolean) - * - * @return True if the ViewGroup is a contained volume. + * @see #setIsolatedZVolume(boolean) * - * @hide + * @return True if the ViewGroup has an isolated Z volume. */ - public boolean isContainedVolume() { - return ((mGroupFlags & FLAG_IS_CONTAINED_VOLUME) != 0); + public boolean hasIsolatedZVolume() { + return ((mGroupFlags & FLAG_ISOLATED_Z_VOLUME) != 0); } /** - * By default, only direct children of a group can interleave with - * interleaved Z values. Set to false on individual groups to enable Z + * By default, only direct children of a group can interleave drawing order + * by interleaving Z values. Set to false on individual groups to enable Z * interleaving of views that aren't direct siblings. * - * @return True if the group should be a contained volume with its own Z - * ordering space, false if its decendents should join the current Z - * ordering volume. - * @attr ref android.R.styleable#ViewGroup_isContainedVolume - * - * @hide + * @return True if the group should be an isolated Z volume with its own Z + * ordering space, false if its decendents should inhabit the + * inherited Z ordering volume. + * @attr ref android.R.styleable#ViewGroup_isolateZVolume */ - public void setIsContainedVolume(boolean isContainedVolume) { - boolean previousValue = (mGroupFlags & FLAG_IS_CONTAINED_VOLUME) == FLAG_IS_CONTAINED_VOLUME; - if (isContainedVolume != previousValue) { - setBooleanFlag(FLAG_IS_CONTAINED_VOLUME, isContainedVolume); + public void setIsolatedZVolume(boolean isolateZVolume) { + boolean previousValue = (mGroupFlags & FLAG_ISOLATED_Z_VOLUME) == FLAG_ISOLATED_Z_VOLUME; + if (isolateZVolume != previousValue) { + setBooleanFlag(FLAG_ISOLATED_Z_VOLUME, isolateZVolume); if (mDisplayList != null) { - mDisplayList.setIsContainedVolume(isContainedVolume); + mDisplayList.setIsolatedZVolume(isolateZVolume); } } } |