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 SurfaceColorFormat colorFormat,
@Nullable ColorSpace colorSpace)
| 220 | * @see <a href="https://fiddle.skia.org/c/@Surface_MakeFromBackendTexture">https://fiddle.skia.org/c/@Surface_MakeFromBackendTexture</a> |
| 221 | */ |
| 222 | @NotNull |
| 223 | public static Surface makeFromBackendRenderTarget(@NotNull DirectContext context, |
| 224 | @NotNull BackendRenderTarget rt, |
| 225 | @NotNull SurfaceOrigin origin, |
| 226 | @NotNull SurfaceColorFormat colorFormat, |
| 227 | @Nullable ColorSpace colorSpace) { |
| 228 | return makeFromBackendRenderTarget(context, rt, origin, colorFormat, colorSpace, null); |
| 229 | } |
| 230 | /** |
| 231 | * <p>Wraps a GPU-backed buffer into {@link Surface}.</p> |
| 232 | * |
no test coverage detected