in shared/java/Surface.java [91:113]
public static Surface makeRasterDirect(@NotNull ImageInfo imageInfo,
long pixelsPtr,
long rowBytes,
@Nullable SurfaceProps surfaceProps) {
try {
assert imageInfo != null : "Can’t makeRasterDirect with imageInfo == null";
Stats.onNativeCall();
long ptr = _nMakeRasterDirect(
imageInfo._width,
imageInfo._height,
imageInfo._colorInfo._colorType.ordinal(),
imageInfo._colorInfo._alphaType.ordinal(),
Native.getPtr(imageInfo._colorInfo._colorSpace),
pixelsPtr,
rowBytes,
surfaceProps);
if (ptr == 0)
throw new IllegalArgumentException(String.format("Failed Surface.makeRasterDirect(%s, %d, %d, %s)", imageInfo, pixelsPtr, rowBytes, surfaceProps));
return new Surface(ptr);
} finally {
Reference.reachabilityFence(imageInfo._colorInfo._colorSpace);
}
}