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

Commit e1fd0240 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 24551 into eclair

* changes:
  default dithering to ON (cheap, looks good) officially ignore filtering (expensive, no real improvement)
parents 84b4d37d d9512a30
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -193,6 +193,14 @@ public class NinePatchDrawable extends Drawable {
        getPaint().setDither(dither);
    }

    @Override
    public void setFilterBitmap(boolean filter) {
        // at the moment, we see no quality improvement, but a big slowdown
        // with filtering, so ignore this call for now
        //
        //getPaint().setFilterBitmap(filter);
    }

    @Override
    public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
            throws XmlPullParserException, IOException {
@@ -247,6 +255,8 @@ public class NinePatchDrawable extends Drawable {
    public Paint getPaint() {
        if (mPaint == null) {
            mPaint = new Paint();
            // dithering helps a lot, and is pretty cheap, so default on
            mPaint.setDither(true);
        }
        return mPaint;
    }