Cherry-pick: Work around broken GL_TEXTURE_BINDING_EXTERNAL_OES query
Cherry-pick of Chromium crrev.com/r229254
BUG: 11392857
Conflicts:
content/common/gpu/stream_texture_manager_android.cc
Original description:
glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texture_id) returns
GL_INVALID_ENUM on older Android NVIDIA drivers.
The reason for the query is to restore correct texture bindings,
since SurfaceTexture.updateTexImage() implies a call to glBindTexture().
Since we now only call this before drawing, we can just set the correct
active texture unit (which gets restored after draw).
Change-Id: Ideb06f7dc97ee0b870e67ceb10bc8883b3127df5
3 files changed