Skip to content

Commit 7036fdd

Browse files
Romain Guypixelflinger
authored andcommitted
Do not blend opaque windows.
This change ensures the wallpaper is rendered into an opaque surface which avoids a glClear() in SurfaceFlinger. This should save quite a bit of work on every frame when panning the workspace in launcher. Change-Id: Id43d3498a54c2d60ec4ee3377c92ef79bff55bc1
1 parent 892ac41 commit 7036fdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/java/com/android/server/wm/WindowState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ Surface createSurfaceLocked() {
636636
final boolean isHwAccelerated = (mAttrs.flags &
637637
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0;
638638
final int format = isHwAccelerated ? PixelFormat.TRANSLUCENT : mAttrs.format;
639-
if (isHwAccelerated && mAttrs.format == PixelFormat.OPAQUE) {
639+
if (!PixelFormat.formatHasAlpha(mAttrs.format)) {
640640
flags |= Surface.OPAQUE;
641641
}
642642
mSurface = new Surface(

0 commit comments

Comments
 (0)