- Add fields to CpuConsumer::LockedBuffer for new information
- New lock methods for GraphicBuffer and GraphicBufferMapper for
the format
Bug: 8734880
Change-Id: If31f82c62d64b6942cf4cc6e5715585c03273f12
When EGLImage extension is not available, SurfaceFlinger will fallback to using
glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an
extra copy. However this code path has never been exercised and had some bugs
which this patch fix.
Mainly the scale factor wasn't computed right when falling back on glDrawElements.
We also fallback to this mode of operation if a buffer doesn't have the adequate
usage bits for EGLImage usage.
This changes only code that is currently not executed. Some refactoring was needed to
keep the change clean. This doesn't change anything functionaly.