summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Carr <racarr@google.com>2021-07-14 16:36:46 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-07-14 16:36:46 +0000
commit02962aeb72eb57dcf0749dd902f8f7c3137beab7 (patch)
tree6d231e9cebec1359827f8254fa6ae300a2daaf8e
parent34d8deda8a2aa82304d73f64aa732deb12034164 (diff)
parentb10b4141a5d11617527dfd0a54a74915c683cb8a (diff)
downloadbase-02962aeb72eb57dcf0749dd902f8f7c3137beab7.tar.gz
Merge "ViewRootImpl: Use mWindowAttributes directly for BBQ" into sc-dev am: b10b4141a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14908372 Change-Id: I428164a097ab227394e6aaffc457cfa550a4c51f
-rw-r--r--core/java/android/view/ViewRootImpl.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 280685065aaf..3550a31f9038 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -1955,22 +1955,23 @@ public final class ViewRootImpl implements ViewParent,
return mBoundsLayer;
}
- Surface getOrCreateBLASTSurface(int width, int height,
- @Nullable WindowManager.LayoutParams params) {
+ Surface getOrCreateBLASTSurface() {
if (!mSurfaceControl.isValid()) {
return null;
}
- int format = params == null ? PixelFormat.TRANSLUCENT : params.format;
Surface ret = null;
if (mBlastBufferQueue == null) {
- mBlastBufferQueue = new BLASTBufferQueue(mTag, mSurfaceControl, width, height,
- format);
+ mBlastBufferQueue = new BLASTBufferQueue(mTag, mSurfaceControl,
+ mSurfaceSize.x, mSurfaceSize.y,
+ mWindowAttributes.format);
// We only return the Surface the first time, as otherwise
// it hasn't changed and there is no need to update.
ret = mBlastBufferQueue.createSurface();
} else {
- mBlastBufferQueue.update(mSurfaceControl, width, height, format);
+ mBlastBufferQueue.update(mSurfaceControl,
+ mSurfaceSize.x, mSurfaceSize.y,
+ mWindowAttributes.format);
}
return ret;
@@ -7784,8 +7785,7 @@ public final class ViewRootImpl implements ViewParent,
if (!useBLAST()) {
mSurface.copyFrom(mSurfaceControl);
} else {
- final Surface blastSurface = getOrCreateBLASTSurface(mSurfaceSize.x, mSurfaceSize.y,
- params);
+ final Surface blastSurface = getOrCreateBLASTSurface();
// If blastSurface == null that means it hasn't changed since the last time we
// called. In this situation, avoid calling transferFrom as we would then
// inc the generation ID and cause EGL resources to be recreated.