Android EglBase: Add helper functions to query the surface size
BUG=webrtc:4742 R=glaznev@webrtc.org Review URL: https://codereview.webrtc.org/1299543004 . Cr-Commit-Position: refs/heads/master@{#9739}
This commit is contained in:
parent
081f34b564
commit
d476b95504
@ -127,6 +127,18 @@ public final class EglBase {
|
||||
return eglSurface != EGL14.EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
public int surfaceWidth() {
|
||||
final int widthArray[] = new int[1];
|
||||
EGL14.eglQuerySurface(eglDisplay, eglSurface, EGL14.EGL_WIDTH, widthArray, 0);
|
||||
return widthArray[0];
|
||||
}
|
||||
|
||||
public int surfaceHeight() {
|
||||
final int heightArray[] = new int[1];
|
||||
EGL14.eglQuerySurface(eglDisplay, eglSurface, EGL14.EGL_HEIGHT, heightArray, 0);
|
||||
return heightArray[0];
|
||||
}
|
||||
|
||||
public void releaseSurface() {
|
||||
if (eglSurface != EGL14.EGL_NO_SURFACE) {
|
||||
EGL14.eglDestroySurface(eglDisplay, eglSurface);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user