diff options
| author | John Reck <jreck@google.com> | 2014-04-09 23:01:02 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-09 23:01:02 +0000 |
| commit | 8e1f918738abf70a4dc86dbb12b386a9deea37f8 (patch) | |
| tree | 2f8b775662768ed77b50ec5740e5d7af608e56c8 /core/java/android/view/View.java | |
| parent | 3c86a27d3e9044d04d0f176e59a1ebbcd774a54c (diff) | |
| parent | 8de65a8e05285df52a1e6f0c1d5616dd233298a7 (diff) | |
| download | frameworks_base-8e1f918738abf70a4dc86dbb12b386a9deea37f8.zip frameworks_base-8e1f918738abf70a4dc86dbb12b386a9deea37f8.tar.gz frameworks_base-8e1f918738abf70a4dc86dbb12b386a9deea37f8.tar.bz2 | |
Merge "Switch DisplayListData to a staging model"
Diffstat (limited to 'core/java/android/view/View.java')
| -rw-r--r-- | core/java/android/view/View.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 6c414f6..9761f1a 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -13549,11 +13549,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return A new or reused DisplayList object. */ private void updateDisplayListIfDirty(@NonNull RenderNode renderNode, boolean isLayer) { - final HardwareRenderer renderer = getHardwareRenderer(); if (renderNode == null) { throw new IllegalArgumentException("RenderNode must not be null"); } - if (renderer == null || !canHaveDisplayList()) { + if (!canHaveDisplayList()) { // can't populate RenderNode, don't try return; } @@ -13627,21 +13626,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } } finally { - renderNode.end(renderer, canvas); + renderNode.end(canvas); renderNode.setCaching(caching); if (isLayer) { renderNode.setLeftTopRightBottom(0, 0, width, height); } else { setDisplayListProperties(renderNode); } - - if (renderer != getHardwareRenderer()) { - Log.w(VIEW_LOG_TAG, "View was detached during a draw() call!"); - // TODO: Should this be elevated to a crash? - // For now have it behaves the same as it previously did, it - // will result in the DisplayListData being destroyed later - // than it could be but oh well... - } } } else if (!isLayer) { mPrivateFlags |= PFLAG_DRAWN | PFLAG_DRAWING_CACHE_VALID; @@ -14913,7 +14904,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final int height = bounds.height(); final HardwareCanvas canvas = displayList.start(width, height); drawable.draw(canvas); - displayList.end(getHardwareRenderer(), canvas); + displayList.end(canvas); // Set up drawable properties that are view-independent. displayList.setLeftTopRightBottom(bounds.left, bounds.top, bounds.right, bounds.bottom); |
