MCPcopy Create free account
hub / github.com/JetBrains/skija / BackendRenderTarget

Class BackendRenderTarget

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

Source from the content-addressed store, hash-verified

4import org.jetbrains.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 @ApiStatus.Internal
39 public BackendRenderTarget(long ptr) {
40 super(ptr, _FinalizerHolder.PTR);
41 }
42
43 @ApiStatus.Internal
44 public static class _FinalizerHolder {
45 public static final long PTR = _nGetFinalizer();
46 }
47
48 @ApiStatus.Internal public static native long _nGetFinalizer();
49 @ApiStatus.Internal public static native long _nMakeGL(int width, int height, int sampleCnt, int stencilBits, int fbId, int fbFormat);
50 @ApiStatus.Internal public static native long _nMakeMetal(int width, int height, long texturePtr);
51 @ApiStatus.Internal public static native long _nMakeDirect3D(int width, int height, long texturePtr, int format, int sampleCnt, int levelCnt);
52
53}

Callers

nothing calls this directly

Calls 1

staticLoadMethod · 0.95

Tested by

no test coverage detected