summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewRootImpl.java
diff options
context:
space:
mode:
authorRobert Carr <racarr@google.com>2020-04-22 16:24:34 -0700
committerRobert Carr <racarr@google.com>2020-04-27 12:54:11 -0700
commitae8e0aea36f751a6876c9401a031a973822604e0 (patch)
treeef1a67e269f96768d73386aa614718b6ec79d742 /core/java/android/view/ViewRootImpl.java
parent082d0c47b7ff95916295e805c5452fa607ee10e7 (diff)
BLAST: Avoid JNI call on creation
JNI calls aren't free and we don't need to burn one to call update with the values we just passed in. Bug: 152501005 Test: Existing tests pass Change-Id: Iaf272edb03d4ec195b75e9ef7e6c122604025dcb
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
-rw-r--r--core/java/android/view/ViewRootImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 8b1e6cbdb6ff..6f85072a0472 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -1793,8 +1793,9 @@ public final class ViewRootImpl implements ViewParent,
// We only return the Surface the first time, as otherwise
// it hasn't changed and there is no need to update.
ret = mBlastBufferQueue.getSurface();
+ } else {
+ mBlastBufferQueue.update(mBlastSurfaceControl, width, height);
}
- mBlastBufferQueue.update(mBlastSurfaceControl, width, height);
return ret;
}