summaryrefslogtreecommitdiff
path: root/opengl/tests/gl_basic/gl_basic.cpp
diff options
context:
space:
mode:
authorJiwen 'Steve' Cai <jwcai@google.com>2017-04-21 18:49:53 -0700
committerJiwen 'Steve' Cai <jwcai@google.com>2017-05-01 16:40:36 -0700
commit2041913a05b79b96c5c084f30bb8944049a976c8 (patch)
tree3fd46103823db004a1698221605a14674a840a5d /opengl/tests/gl_basic/gl_basic.cpp
parent8e20f172ec8bea9a602f5270edecc225fecb9ce4 (diff)
BufferQueue: plumbing mConsumerIsProtected
This replaces current logic in BufferQueue that uses GRALLOC_USAGE_PROTECTED to indicate whether an ANativeWindow is capable of handling hardware protected gralloc buffers. Current logic is problematic as it enforces producer to use protected buffer no matter whether producer side is capable of writing into a protected buffer. This new solution, however, introduces a new NATIVE_WINDOW_* flag that consumer can set on IGraphicBufferConsumer to indicate its capacity, which can then be queried by producer via Surface::query (or IGraphicBufferProducer::query). When consumer is capable of reading protected buffer (e.g. a protected GL context), the producer can generate either a protected or unprotected buffer. When consumer is not capable of reading protected buffer, the producer should only generate unprotected buffer. Bug: 35726763 Test: videoplayer-nodrm-protected.apk and videoplayer-drm-protected.apk both works. Change-Id: I1bf6814c9f1f81f9e04f0e89646b0733ff1a4758
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions