diff options
author | Romain Guy <romainguy@google.com> | 2013-02-14 18:03:37 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-02-19 12:30:02 -0800 |
commit | 52036b19a5f82bc4d75cfcbff99c65df8d25a99b (patch) | |
tree | 138a50b1b6ddc1075af93c4dab85d459aef1d6d3 /core/java/android/view/View.java | |
parent | 736ef1e9dedbdd0c24e27f170034f2f869fd083f (diff) | |
download | frameworks_base-52036b19a5f82bc4d75cfcbff99c65df8d25a99b.zip frameworks_base-52036b19a5f82bc4d75cfcbff99c65df8d25a99b.tar.gz frameworks_base-52036b19a5f82bc4d75cfcbff99c65df8d25a99b.tar.bz2 |
Expose display list APIs
The exposed APIs are slightly simpler than the full APIs used internally.
Only APIs useful to applications are exposed.
Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r-- | core/java/android/view/View.java | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 25cad87..dcf51e4 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -16,7 +16,6 @@ package android.view; -import android.app.ActivityThread; import android.content.ClipData; import android.content.Context; import android.content.res.Configuration; @@ -10050,7 +10049,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mTop += offset; mBottom += offset; if (mDisplayList != null) { - mDisplayList.offsetTopBottom(offset); + mDisplayList.offsetTopAndBottom(offset); invalidateViewProperty(false, false); } else { if (!matrixIsIdentity) { @@ -10098,7 +10097,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mLeft += offset; mRight += offset; if (mDisplayList != null) { - mDisplayList.offsetLeftRight(offset); + mDisplayList.offsetLeftAndRight(offset); invalidateViewProperty(false, false); } else { if (!matrixIsIdentity) { @@ -11687,7 +11686,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } if (mDisplayList != null) { - mDisplayList.setDirty(false); + mDisplayList.clearDirty(); } } @@ -11966,7 +11965,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mAttachInfo != null) { if (mDisplayList != null) { - mDisplayList.setDirty(true); + mDisplayList.markDirty(); mAttachInfo.mViewRootImpl.enqueueDisplayList(mDisplayList); } mAttachInfo.mViewRootImpl.cancelInvalidate(this); @@ -12670,8 +12669,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * @return The HardwareRenderer associated with that view or null if hardware rendering - * is not supported or this this has not been attached to a window. + * @return The {@link HardwareRenderer} associated with that view or null if + * hardware rendering is not supported or this view is not attached + * to a window. * * @hide */ @@ -12726,15 +12726,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } boolean caching = false; - final HardwareCanvas canvas = displayList.start(); int width = mRight - mLeft; int height = mBottom - mTop; int layerType = getLayerType(); + final HardwareCanvas canvas = displayList.start(width, height); + try { - canvas.setViewport(width, height); - // The dirty rect should always be null for a display list - canvas.onPreDraw(null); if (!isLayer && layerType != LAYER_TYPE_NONE) { if (layerType == LAYER_TYPE_HARDWARE) { final HardwareLayer layer = getHardwareLayer(); @@ -12772,8 +12770,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } } finally { - canvas.onPostDraw(); - displayList.end(); displayList.setCaching(caching); if (isLayer) { @@ -12818,7 +12814,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private void clearDisplayList() { if (mDisplayList != null) { - mDisplayList.invalidate(); mDisplayList.clear(); } } @@ -13394,7 +13389,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, alpha = transform.getAlpha(); } if ((transformType & Transformation.TYPE_MATRIX) != 0) { - displayList.setStaticMatrix(transform.getMatrix()); + displayList.setMatrix(transform.getMatrix()); } } } |