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

Commit ddd2c0b9 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Stop calling SkBitmap::setHasHardwareMipMap

Test: mmma -j frameworks/base/libs/hwui
      mmma -j frameworks/base/core/jni/

No one ever calls SkBitmap::hasHardwareMipMap, so there is no reason to
set it.

Change-Id: I5f7aec5353fbb38c83ef7f66e14f65f1a560558f
parent 50619770
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -286,7 +286,6 @@ void Bitmap::setAlphaType(SkAlphaType alphaType) {
}

void Bitmap::getSkBitmap(SkBitmap* outBitmap) {
    outBitmap->setHasHardwareMipMap(mHasHardwareMipMap);
    if (isHardware()) {
        outBitmap->allocPixels(SkImageInfo::Make(info().width(), info().height(),
                                                 info().colorType(), info().alphaType(), nullptr));
@@ -321,7 +320,6 @@ sk_sp<SkImage> Bitmap::makeImage(sk_sp<SkColorFilter>* outputColorFilter) {
        SkBitmap skiaBitmap;
        skiaBitmap.setInfo(info(), rowBytes());
        skiaBitmap.setPixelRef(sk_ref_sp(this), 0, 0);
        skiaBitmap.setHasHardwareMipMap(mHasHardwareMipMap);
        // Note we don't cache in this case, because the raster image holds a pointer to this Bitmap
        // internally and ~Bitmap won't be invoked.
        // TODO: refactor Bitmap to not derive from SkPixelRef, which would allow caching here.