mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-28 05:12:15 +08:00

Original x11 adapter uses ~40% less CPU usage than kbinani/screenshot. Ideally, we should migrate 100% to kbinani/screenshot. But, the CPU usage difference is substantial. In the future, we should look deeper into kbinani/screenshot and try to improve it.
18 lines
446 B
Go
18 lines
446 B
Go
package screen
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestAlign64(t *testing.T) {
|
|
if ret := cAlign64(0x00010008); ret != 0x00010008 {
|
|
t.Errorf("Wrong alignment, expected %x, got %x", 0x00010008, ret)
|
|
}
|
|
if ret := cAlign64(0x00010006); ret != 0x00010008 {
|
|
t.Errorf("Wrong alignment, expected %x, got %x", 0x00010008, ret)
|
|
}
|
|
if ret := cAlign64(0x00010009); ret != 0x00010010 {
|
|
t.Errorf("Wrong alignment, expected %x, got %x", 0x00010010, ret)
|
|
}
|
|
}
|