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