MCPcopy Create free account
hub / github.com/HumbleUI/Skija / makeSurface

Method makeSurface

shared/java/Surface.java:687–701  ·  view source on GitHub ↗

Returns a compatible Surface, or null. Returned Surface contains the same raster, GPU, or null properties as the original. Returned Surface does not share the same pixels. Returns null if imageInfo width or height are zero, or if imageInfo is incompatible with Surface. @param

(ImageInfo imageInfo)

Source from the content-addressed store, hash-verified

685 * @see <a href="https://fiddle.skia.org/c/@Surface_makeSurface">https://fiddle.skia.org/c/@Surface_makeSurface</a>
686 */
687 @Nullable
688 public Surface makeSurface(ImageInfo imageInfo) {
689 try {
690 Stats.onNativeCall();
691 long ptr = _nMakeSurfaceI(_ptr,
692 imageInfo._width,
693 imageInfo._height,
694 imageInfo._colorInfo._colorType.ordinal(),
695 imageInfo._colorInfo._alphaType.ordinal(),
696 Native.getPtr(imageInfo._colorInfo._colorSpace));
697 return new Surface(ptr);
698 } finally {
699 ReferenceUtil.reachabilityFence(this);
700 }
701 }
702
703 /**
704 * <p>Calls makeSurface(ImageInfo) with the same ImageInfo as this surface,

Calls 5

onNativeCallMethod · 0.95
_nMakeSurfaceIMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95
_nMakeSurfaceMethod · 0.95

Tested by 1

executeMethod · 0.64