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

Class BackendRenderTarget

shared/java/BackendRenderTarget.java:6–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import io.github.humbleui.skija.impl.*;
5
6public class BackendRenderTarget extends Managed {
7 static { Library.staticLoad(); }
8
9 @NotNull @Contract("_, _, _, _, _, _ -> new")
10 public static BackendRenderTarget makeGL(int width, int height, int sampleCnt, int stencilBits, int fbId, int fbFormat) {
11 Stats.onNativeCall();
12 return new BackendRenderTarget(_nMakeGL(width, height, sampleCnt, stencilBits, fbId, fbFormat));
13 }
14
15 @NotNull @Contract("_, _, _ -> new")
16 public static BackendRenderTarget makeMetal(int width, int height, long texturePtr) {
17 Stats.onNativeCall();
18 return new BackendRenderTarget(_nMakeMetal(width, height, texturePtr));
19 }
20
21 /**
22 * <p>Creates Direct3D backend render target object from D3D12 texture resource.</p>
23 * <p>For more information refer to skia GrBackendRenderTarget class.</p>
24 *
25 * @param width width of the render target in pixels
26 * @param height height of the render target in pixels
27 * @param texturePtr pointer to ID3D12Resource texture resource object; must be not zero
28 * @param format pixel data DXGI_FORMAT fromat of the texturePtr resource
29 * @param sampleCnt samples count for texture resource
30 * @param levelCnt sampling quality level for texture resource
31 */
32 @NotNull @Contract("_, _, _, _, _, _ -> new")
33 public static BackendRenderTarget makeDirect3D(int width, int height, long texturePtr, int format, int sampleCnt, int levelCnt) {
34 Stats.onNativeCall();
35 return new BackendRenderTarget(_nMakeDirect3D(width, height, texturePtr, format, sampleCnt, levelCnt));
36 }
37
38 @NotNull @Contract("_, _, _, _, _, _, _, _, _ -> new")
39 public static BackendRenderTarget makeVulkan(int width, int height, long imagePtr, int imageTiling, int imageLayout, int format, int imageUsageFlags, int sampleCnt, int levelCnt) {
40 Stats.onNativeCall();
41 return new BackendRenderTarget(_nMakeVulkan(width, height, imagePtr, imageTiling, imageLayout, format, imageUsageFlags, sampleCnt, levelCnt));
42 }
43
44 @ApiStatus.Internal
45 public BackendRenderTarget(long ptr) {
46 super(ptr, _FinalizerHolder.PTR);
47 }
48
49 @ApiStatus.Internal
50 public static class _FinalizerHolder {
51 public static final long PTR = _nGetFinalizer();
52 }
53
54 @ApiStatus.Internal public static native long _nGetFinalizer();
55 @ApiStatus.Internal public static native long _nMakeGL(int width, int height, int sampleCnt, int stencilBits, int fbId, int fbFormat);
56 @ApiStatus.Internal public static native long _nMakeMetal(int width, int height, long texturePtr);
57 @ApiStatus.Internal public static native long _nMakeDirect3D(int width, int height, long texturePtr, int format, int sampleCnt, int levelCnt);
58 @ApiStatus.Internal public static native long _nMakeVulkan(int width, int height, long imagePtr, int imageTiling, int imageLayout, int format, int imageUsageFlags, int sampleCnt, int levelCnt);
59
60}

Callers

nothing calls this directly

Calls 1

staticLoadMethod · 0.95

Tested by

no test coverage detected