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

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

Remove code that does nothing

Test: CtsGraphicsTestCases

When the comment was written, "the default" referred to
GraphicsJNI::colorSpaceForType, which was either SRGB or null, depending
on a build flag. In If7b1c00ad889446658f98e9ad644869e2eeabcdb, we
changed it to "decodeInfo.refColorSpace", but since bitmapInfo was just
assigned decodeInfo, it already has the same SkColorSpace, so this does
nothing. Remove the code and the comment.

Change-Id: Ib661621e30a6432707bb6894ca5334fba8eca81e
parent ee3bfe76
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -360,13 +360,7 @@ static jobject doDecode(JNIEnv* env, std::unique_ptr<SkStreamRewindable> stream,
    const SkImageInfo decodeInfo = SkImageInfo::Make(size.width(), size.height(),
            decodeColorType, alphaType, decodeColorSpace);

    // For wide gamut images, we will leave the color space on the SkBitmap.  Otherwise,
    // use the default.
    SkImageInfo bitmapInfo = decodeInfo;
    if (decodeInfo.colorSpace() && decodeInfo.colorSpace()->isSRGB()) {
        bitmapInfo = bitmapInfo.makeColorSpace(decodeInfo.refColorSpace());
    }

    if (decodeColorType == kGray_8_SkColorType) {
        // The legacy implementation of BitmapFactory used kAlpha8 for
        // grayscale images (before kGray8 existed).  While the codec