OSDN Git Service

Implement a couple more surface attributes in eglQuerySurface.
authorPascal Muetschard <pmuetschard@google.com>
Mon, 17 Aug 2015 20:09:57 +0000 (13:09 -0700)
committerbohu <bohu@google.com>
Tue, 20 Oct 2015 17:53:38 +0000 (10:53 -0700)
Bug: 23036813

(cherry picked from commit 7c1d90fdcda89c2db9ae0b9af833c7d4e9eeab9c)

Change-Id: Idacdb8c3d63b7d7a2824e954c7455750008b2e9d

system/egl/egl.cpp

index 97d6b0c..a9f6cf7 100644 (file)
@@ -757,6 +757,15 @@ EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface eglSurface, EGLint attribu
             // and we ignore it when creating a PBuffer surface (default is EGL_FALSE)
             if (surface->getSurfaceType() & EGL_PBUFFER_BIT) *value = EGL_FALSE;
             break;
+        case EGL_MIPMAP_LEVEL:
+            // not modified for a window or pixmap surface
+            // and we ignore it when creating a PBuffer surface (default is 0)
+            if (surface->getSurfaceType() & EGL_PBUFFER_BIT) *value = 0;
+            break;
+        case EGL_MULTISAMPLE_RESOLVE:
+            // ignored when creating the surface, return default
+            *value = EGL_MULTISAMPLE_RESOLVE_DEFAULT;
+            break;
         //TODO: complete other attributes
         default:
             ALOGE("eglQuerySurface %x  EGL_BAD_ATTRIBUTE", attribute);