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

Commit d4328600 authored by Diego Perez's avatar Diego Perez Committed by Android (Google) Code Review
Browse files

Merge changes Ic3affb60,If09a6623

* changes:
  Fix NopCanvas initialization
  NopCanvas is only hw accelerated during construction
parents cc28e747 74f36500
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -31,14 +31,18 @@ import android.graphics.RectF;
 * Canvas implementation that does not do any rendering
 */
public class NopCanvas extends Canvas {
    private boolean mIsInitialized = false;

    public NopCanvas() {
        super();
        mIsInitialized = true;
    }

    @Override
    public boolean isHardwareAccelerated() {
        // Return true so there is no allocations for the software renderer in the constructor
        return true;
        // We return true the first time so there are no allocations for the software renderer in
        // the constructor
        return !mIsInitialized;
    }

    @Override