diff options
| author | Chris Craik <ccraik@google.com> | 2014-02-07 18:47:57 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-07 18:47:57 +0000 |
| commit | 27bfb24518934f0344c79a1d655ea8d1208d2446 (patch) | |
| tree | 538f3f695b9e2ca35332db94c180361f92fbb00c /core/java/android | |
| parent | 1a88d834e8f7d21e714121c011fec82369a2e9f1 (diff) | |
| parent | 1df26446b7eac7050767c38ca977fde03a41a033 (diff) | |
Merge "Rework and clean up DisplayList projection"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/DisplayList.java | 12 | ||||
| -rw-r--r-- | core/java/android/view/View.java | 8 |
2 files changed, 13 insertions, 7 deletions
diff --git a/core/java/android/view/DisplayList.java b/core/java/android/view/DisplayList.java index 8b6335918ab9..418aec3fb3c0 100644 --- a/core/java/android/view/DisplayList.java +++ b/core/java/android/view/DisplayList.java @@ -431,6 +431,17 @@ public class DisplayList { } /** + * Sets whether the display list is a projection receiver - that its parent + * DisplayList should draw any descendent DisplayLists with + * ProjectBackwards=true directly on top of it. Default value is false. + */ + public void setProjectionReceiver(boolean shouldRecieve) { + if (hasNativeDisplayList()) { + nSetProjectionReceiver(mFinalizer.mNativeDisplayList, shouldRecieve); + } + } + + /** * Sets the outline, defining the shape that casts a shadow. * * Deep copies the native path to simplify reference ownership. @@ -1065,6 +1076,7 @@ public class DisplayList { private static native void nSetCaching(long displayList, boolean caching); private static native void nSetClipToBounds(long displayList, boolean clipToBounds); private static native void nSetProjectBackwards(long displayList, boolean shouldProject); + private static native void nSetProjectionReceiver(long displayList, boolean shouldRecieve); private static native void nSetIsolatedZVolume(long displayList, boolean isolateZVolume); private static native void nSetOutline(long displayList, long nativePath); private static native void nSetAlpha(long displayList, float alpha); diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 7a97d51ae504..7ce214092515 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -2335,7 +2335,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * 1 PFLAG3_IS_LAID_OUT * 1 PFLAG3_MEASURE_NEEDED_BEFORE_LAYOUT * 1 PFLAG3_CALLED_SUPER - * 1 PFLAG3_PROJECT_BACKGROUND * |-------|-------|-------|-------| */ @@ -2372,12 +2371,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, static final int PFLAG3_CALLED_SUPER = 0x10; /** - * Flag indicating that the background of this view will be drawn into a - * display list and projected onto the closest parent projection surface. - */ - static final int PFLAG3_PROJECT_BACKGROUND = 0x20; - - /** * Flag indicating that we're in the process of applying window insets. */ static final int PFLAG3_APPLYING_INSETS = 0x40; @@ -15148,6 +15141,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Set up drawable properties that are view-independent. displayList.setLeftTopRightBottom(bounds.left, bounds.top, bounds.right, bounds.bottom); displayList.setProjectBackwards(drawable.isProjected()); + displayList.setProjectionReceiver(true); displayList.setClipToBounds(false); return displayList; } |
