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

Method wrapBackendRenderTarget

shared/java/Surface.java:274–281  ·  view source on GitHub ↗

Wraps a GPU-backed buffer into Surface. Caller must ensure backendRenderTarget is valid for the lifetime of returned Surface. Surface is returned if all parameters are valid. backendRenderTarget is valid if its pixel configuration agrees with colorSpace and

(@NotNull DirectContext context,
                                                  @NotNull BackendRenderTarget rt,
                                                  @NotNull SurfaceOrigin origin,
                                                  @NotNull ColorType colorType,
                                                  @Nullable ColorSpace colorSpace)

Source from the content-addressed store, hash-verified

272 * @see <a href="https://fiddle.skia.org/c/@Surface_MakeFromBackendTexture">https://fiddle.skia.org/c/@Surface_MakeFromBackendTexture</a>
273 */
274 @NotNull
275 public static Surface wrapBackendRenderTarget(@NotNull DirectContext context,
276 @NotNull BackendRenderTarget rt,
277 @NotNull SurfaceOrigin origin,
278 @NotNull ColorType colorType,
279 @Nullable ColorSpace colorSpace) {
280 return wrapBackendRenderTarget(context, rt, origin, colorType, colorSpace, null);
281 }
282
283 /**
284 * @deprecated - use {@link #wrapBackendRenderTarget(DirectContext, BackendRenderTarget, SurfaceOrigin, ColorType, ColorSpace, SurfaceProps)}

Callers 3

initSkiaMethod · 0.95
initSkiaMethod · 0.95

Calls 4

onNativeCallMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected