summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Donner <cdonner@google.com>2016-12-09 15:34:56 -0800
committerCraig Donner <cdonner@google.com>2016-12-09 16:31:01 -0800
commit304f78173fc392c1891a5d5d3ff44c6a4aee85a1 (patch)
tree43d5d929359c4fcc52185f13e3b43913a316e757
parenta52c368fe219f2036bf2d3c09783283c89811cb7 (diff)
downloadnative-304f78173fc392c1891a5d5d3ff44c6a4aee85a1.tar.gz
Allow both RENDER and TEXTURE flags when creating native client buffers.
Bug: 33057441 Change-Id: I64ebf6bb5cb534d7f67a9338ebac4bf23a47d607
-rw-r--r--opengl/libs/EGL/eglApi.cpp6
-rw-r--r--opengl/specs/EGL_ANDROID_create_native_client_buffer.txt11
2 files changed, 2 insertions, 15 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index f41e6e2311..4a0764843f 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -1848,12 +1848,6 @@ EGLClientBuffer eglCreateNativeClientBufferANDROID(const EGLint *attrib_list)
if (value & EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID) {
usage |= GRALLOC_USAGE_HW_TEXTURE;
}
- // The buffer must be used for either a texture or a
- // renderbuffer.
- if ((value & EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID) &&
- (value & EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID)) {
- return setError(EGL_BAD_PARAMETER, (EGLClientBuffer)0);
- }
break;
default:
return setError(EGL_BAD_PARAMETER, (EGLClientBuffer)0);
diff --git a/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt b/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt
index a6fae80d7d..51c6c61782 100644
--- a/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt
+++ b/opengl/specs/EGL_ANDROID_create_native_client_buffer.txt
@@ -124,12 +124,10 @@ Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors)
desirable) do not route the entire composition to the external sink.
EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID: The buffer will be
- used to create a renderbuffer. This flag must not be set if
- EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID is set.
+ used to create a color-renderable texture.
EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID: The buffer will be used to
- create a texture. This flag must not be set if
- EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID is set.
+ create a filterable texture.
Errors
@@ -149,11 +147,6 @@ Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors)
with the value of EGL_FORMAT, the error EGL_BAD_PARAMETER is
Generated.
- * If both the EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID and
- EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID are set in the value of
- EGL_NATIVE_BUFFER_USAGE_ANDROID, the error EGL_BAD_PARAMETER is
- Generated."
-
Issues
1. Should this extension define what combinations of formats and usage flags