Package: GL
Fix crash screen of webapp on Mac
webkit rendering in this way:
1. context A loaded textures with tiles of screen via glTexSubImage2D
2. context B, sharing state with A, use these textures to render into a FBO,
which was already linked as a texture via glFramebufferTexture2D
3. finally the texture is composited with tool bars in main window
The issue happend in step 2, where only some of texutres are shared
successfully, and others are not initialized(Seems from previous application).
Or in step 1, some textures are not really loaded by glTexSubImage2D
This should be host Mac GL driver's issue. This work around use glGetTexImage
to read texture back right after glTexSubImage2D, thus guarantee a synchronization.
Signed-off-by: edwin.zhai <edwin.zhai@intel.com>