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

Method getCanvas

shared/java/Surface.java:661–673  ·  view source on GitHub ↗

Returns Canvas that draws into Surface. Subsequent calls return the same Canvas. Canvas returned is managed and owned by Surface, and is deleted when Surface is deleted. @return Canvas for Surface

()

Source from the content-addressed store, hash-verified

659 * @return Canvas for Surface
660 */
661 @NotNull
662 public Canvas getCanvas() {
663 try {
664 if (_canvas == null) {
665 Stats.onNativeCall();
666 long ptr = _nGetCanvas(_ptr);
667 _canvas = ptr == 0 ? null : new Canvas(ptr, false, this);
668 }
669 return _canvas;
670 } finally {
671 ReferenceUtil.reachabilityFence(this);
672 }
673 }
674
675 /**
676 * <p>Returns a compatible Surface, or null.</p>

Callers 12

baseMethod · 0.80
makeSubsetMethod · 0.80
drawSineMethod · 0.80
drawMethod · 0.80
createGraphicsMethod · 0.80
onPaintMethod · 0.80
acceptMethod · 0.80
initSkiaMethod · 0.80
drawFrameMethod · 0.80
mainMethod · 0.80
onResizeMethod · 0.80

Calls 3

onNativeCallMethod · 0.95
_nGetCanvasMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by 2

baseMethod · 0.64
makeSubsetMethod · 0.64