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

Method setImmutable

shared/java/Bitmap.java:265–270  ·  view source on GitHub ↗

Sets internal flag to mark Bitmap as immutable. Once set, pixels can not change. Any other bitmap sharing the same PixelRef are also marked as immutable. Once PixelRef is marked immutable, the setting cannot be cleared. Writing to immutable Bitmap pixels triggers an assert on debug builds

()

Source from the content-addressed store, hash-verified

263 * @see <a href="https://fiddle.skia.org/c/@Bitmap_setImmutable">https://fiddle.skia.org/c/@Bitmap_setImmutable</a>
264 */
265 @NotNull @Contract("-> this")
266 public Bitmap setImmutable() {
267 Stats.onNativeCall();
268 _nSetImmutable(_ptr);
269 return this;
270 }
271
272 /**
273 * <p>Resets to its initial state; all fields are set to zero, as if Bitmap had

Callers 12

drawGrayMethod · 0.45
drawBitmapCanvasMethod · 0.45
drawPixelsMethod · 0.45
drawSubsetMethod · 0.45
drawPixelRefMethod · 0.45
drawAlphaMethod · 0.45
drawEraseMethod · 0.45
CodecSceneMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45

Calls 2

onNativeCallMethod · 0.95
_nSetImmutableMethod · 0.95

Tested by

no test coverage detected