forked from CinemaMod/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCefAcceleratedPaintInfoLinux.java
More file actions
62 lines (51 loc) · 1.73 KB
/
CefAcceleratedPaintInfoLinux.java
File metadata and controls
62 lines (51 loc) · 1.73 KB
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
60
61
62
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
package org.cef.handler;
/**
* Linux-specific accelerated paint info (dmabuf planes).
*/
public class CefAcceleratedPaintInfoLinux extends CefAcceleratedPaintInfo {
/**
* dmabuf plane count.
*/
public int plane_count = 0;
/**
* dmabuf plane file descriptors.
*/
public int[] plane_fds = null;
/**
* dmabuf plane strides (bytes per row).
*/
public int[] plane_strides = null;
/**
* dmabuf plane offsets.
*/
public long[] plane_offsets = null;
/**
* dmabuf plane sizes.
*/
public long[] plane_sizes = null;
/**
* dmabuf modifier.
*/
public long modifier = 0;
public CefAcceleratedPaintInfoLinux() {}
public CefAcceleratedPaintInfoLinux(int format, int width, int height) {
super(format, width, height);
}
public boolean hasDmaBufPlanes() {
return plane_count > 0 && plane_fds != null && plane_strides != null && plane_offsets != null;
}
@Override
public CefAcceleratedPaintInfoLinux clone() {
CefAcceleratedPaintInfoLinux clone = new CefAcceleratedPaintInfoLinux(format, width, height);
clone.plane_count = plane_count;
clone.modifier = modifier;
clone.plane_fds = plane_fds != null ? plane_fds.clone() : null;
clone.plane_strides = plane_strides != null ? plane_strides.clone() : null;
clone.plane_offsets = plane_offsets != null ? plane_offsets.clone() : null;
clone.plane_sizes = plane_sizes != null ? plane_sizes.clone() : null;
return clone;
}
}