There is no check that the texture handle returned by CompositorOGL::GetTemporaryTexture is valid

NEW
Unassigned

Status

()

4 years ago
4 years ago

People

(Reporter: nical, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
In PerFrameTexturePool::GetTexture we do check that the texture handle is not null here:
http://dxr.mozilla.org/mozilla-central/source/gfx/layers/opengl/CompositorOGL.cpp?from=CompositorOGL.cpp&case=true#1705
but either way we return the handle, and the user of this (GrallocTextureSourceOGL) doesn't check that the handle is null. It's not clear to me how this could be failing, but we should handle this case somehow (at least return false in GrallocTextureHostOGL::Lock).
I noticed this because in some rare cases we can see several low-res tiles showing something some random content (sometimes the header of the app) when scrolling very fast [1], so it looks like there are cases where binding a gralloc buffer to a texture somehow fails and we end up compositing random content instead (not sure this has to do with this particular missing check, though).

[1]: https://dl.dropboxusercontent.com/u/7742672/VID_20140825_121546.mp4
You need to log in before you can comment on or make changes to this bug.