forked from openstf/adbkit
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathFramebufferMeta.ts
59 lines (59 loc) · 1.53 KB
/
FramebufferMeta.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
export type ColorFormat = 'bgr' | 'bgra' | 'rgb' | 'rgba';
export default interface FramebufferMeta {
/**
* The framebuffer version. Useful for patching possible backwards-compatibility issues.
*/
version: number;
/**
* The framebuffer format for convenience. This can be one of `'bgr'`, `'bgra'`, `'rgb'`, `'rgba'`.
*/
format: ColorFormat;
/**
* The horizontal resolution of the framebuffer. This SHOULD always be the same as screen width. We have not encountered any device with incorrect framebuffer metadata, but according to rumors there might be some.
*/
width: number;
/**
* The vertical resolution of the framebuffer. This SHOULD always be the same as screen height.
*/
height: number;
/**
* Bits per pixel (i.e. color depth).
*/
bpp: number;
/**
* The raw byte size of the framebuffer.
*/
size: number;
/**
* The bit offset of the red color in a pixel.
*/
red_offset: number;
/**
* The bit length of the red color in a pixel.
*/
red_length: number;
/**
* The bit offset of the blue color in a pixel.
*/
blue_offset: number;
/**
* The bit length of the blue color in a pixel.
*/
blue_length: number;
/**
* The bit offset of the green color in a pixel.
*/
green_offset: number;
/**
* The bit length of the green color in a pixel.
*/
green_length: number;
/**
* The bit offset of alpha in a pixel.
*/
alpha_offset: number;
/**
* The bit length of alpha in a pixel. `0` when not available.
*/
alpha_length: number;
}