Merge "Fix null deref & update compress" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
900174ef17
@@ -96,8 +96,8 @@ public final class Gainmap implements Parcelable {
|
|||||||
throw new RuntimeException("internal error: native gainmap is 0");
|
throw new RuntimeException("internal error: native gainmap is 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
mGainmapContents = gainmapContents;
|
|
||||||
mNativePtr = nativeGainmap;
|
mNativePtr = nativeGainmap;
|
||||||
|
setGainmapContents(gainmapContents);
|
||||||
|
|
||||||
NoImagePreloadHolder.sRegistry.registerNativeAllocation(this, nativeGainmap);
|
NoImagePreloadHolder.sRegistry.registerNativeAllocation(this, nativeGainmap);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ bool Bitmap::compress(JavaCompressFormat format, int32_t quality, SkWStream* str
|
|||||||
SkBitmap baseBitmap = getSkBitmap();
|
SkBitmap baseBitmap = getSkBitmap();
|
||||||
SkBitmap gainmapBitmap = gainmap()->bitmap->getSkBitmap();
|
SkBitmap gainmapBitmap = gainmap()->bitmap->getSkBitmap();
|
||||||
SkJpegEncoder::Options options{.fQuality = quality};
|
SkJpegEncoder::Options options{.fQuality = quality};
|
||||||
return SkJpegGainmapEncoder::EncodeJpegR(stream, baseBitmap.pixmap(), options,
|
return SkJpegGainmapEncoder::EncodeHDRGM(stream, baseBitmap.pixmap(), options,
|
||||||
gainmapBitmap.pixmap(), options, gainmap()->info);
|
gainmapBitmap.pixmap(), options, gainmap()->info);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
BIN
tests/SilkFX/assets/gainmaps/granddam.jpg
Normal file
BIN
tests/SilkFX/assets/gainmaps/granddam.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
BIN
tests/SilkFX/assets/gainmaps/lightbulb.jpg
Normal file
BIN
tests/SilkFX/assets/gainmaps/lightbulb.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 MiB |
BIN
tests/SilkFX/assets/gainmaps/porsche911.jpg
Normal file
BIN
tests/SilkFX/assets/gainmaps/porsche911.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 MiB |
Reference in New Issue
Block a user