MCPcopy Index your code
hub / github.com/HumbleUI/Skija / allocPixels

Method allocPixels

shared/java/Bitmap.java:466–481  ·  view source on GitHub ↗

Sets ImageInfo to info following the rules in setImageInfo() and allocates pixel memory. rowBytes must equal or exceed info.width() times info.bytesPerPixel(), or equal zero. Returns false and calls reset() if ImageInfo could not be set, or memory could not be allocated. On most p

(@NotNull ImageInfo info, long rowBytes)

Source from the content-addressed store, hash-verified

464 * @return true if pixel storage is allocated
465 */
466 public boolean allocPixels(@NotNull ImageInfo info, long rowBytes) {
467 try {
468 _imageInfo = null;
469 Stats.onNativeCall();
470 return _nAllocPixelsRowBytes(_ptr,
471 info._width,
472 info._height,
473 info._colorInfo._colorType.ordinal(),
474 info._colorInfo._alphaType.ordinal(),
475 Native.getPtr(info._colorInfo._colorSpace),
476 rowBytes);
477 } finally {
478 ReferenceUtil.reachabilityFence(this);
479 ReferenceUtil.reachabilityFence(info._colorInfo._colorSpace);
480 }
481 }
482
483 /**
484 * <p>Sets ImageInfo to info following the rules in {@link #setImageInfo(ImageInfo, long)} and allocates pixel

Callers 15

executeMethod · 0.95
readPixelsMethod · 0.95
makeFromImageMethod · 0.95
allocN32PixelsMethod · 0.95
baseMethod · 0.80
executeMethod · 0.80
drawGrayMethod · 0.80
drawBlurMethod · 0.80
drawBitmapCanvasMethod · 0.80
drawSubsetMethod · 0.80
drawPixelRefMethod · 0.80
drawAlphaMethod · 0.80

Calls 6

onNativeCallMethod · 0.95
_nAllocPixelsRowBytesMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95
_nAllocPixelsMethod · 0.95
getMinRowBytesMethod · 0.80

Tested by 3

executeMethod · 0.76
baseMethod · 0.64
executeMethod · 0.64