SurfaceTexture: add support for new connect values
This change adds support to SurfaceTextureClient for the new enum values that can be passed to the ANativeWindow connect call. Change-Id: I8c15418909e43a15673a9b22a5eb40df6923b273
This commit is contained in:
parent
6a90b3a3d7
commit
3e646d62e5
|
@ -309,6 +309,9 @@ int SurfaceTextureClient::connect(int api) {
|
|||
int err = NO_ERROR;
|
||||
switch (api) {
|
||||
case NATIVE_WINDOW_API_EGL:
|
||||
case NATIVE_WINDOW_API_CPU:
|
||||
case NATIVE_WINDOW_API_MEDIA:
|
||||
case NATIVE_WINDOW_API_CAMERA:
|
||||
if (mConnectedApi) {
|
||||
err = -EINVAL;
|
||||
} else {
|
||||
|
@ -328,6 +331,9 @@ int SurfaceTextureClient::disconnect(int api) {
|
|||
int err = NO_ERROR;
|
||||
switch (api) {
|
||||
case NATIVE_WINDOW_API_EGL:
|
||||
case NATIVE_WINDOW_API_CPU:
|
||||
case NATIVE_WINDOW_API_MEDIA:
|
||||
case NATIVE_WINDOW_API_CAMERA:
|
||||
if (mConnectedApi == api) {
|
||||
mConnectedApi = 0;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue