Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75a0e448 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Optimize call to drawBitmap during screen rotation." into honeycomb

parents cab11490 8db9ac4b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.util.DisplayMetrics;
import android.util.Slog;
@@ -132,9 +134,11 @@ class ScreenRotationAnimation {
                }
        
                if (screenshot != null) {
                    c.drawBitmap(screenshot, 0, 0, new Paint(0));
                    Paint paint = new Paint(0);
                    paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
                    c.drawBitmap(screenshot, 0, 0, paint);
                } else {
                    c.drawColor(Color.GREEN);
                    c.drawColor(Color.GREEN, PorterDuff.Mode.SRC);
                }

                mSurface.unlockCanvasAndPost(c);