from b/31668620
Came from this innocent-looking re-ordering (which I reviewed..) from this larger CL: https://codereview.chromium.org/2036563002/diff/180001/android_webview/browser/render_thread_manager.cc#newcode289
The reorder is required because HardwareRenderer constructor runs GL, so must be moved to after ScopedAllowGL.
Main manifestation of the bug is the first frame of a webview has a non-zero fbo, it's ignored: HardwareRenderer constructor runs GL which triggers virtual context restore, and hat comes before SetBackingFrameBufferObject, so the context restore overwrites the fbo to 0, and for that one frame, webview renders to screen rather than to the fbo.
The more subtle although less likely issue, is that ScopedAllowGL constructor can also run any pending GL as well, which may also cause state restore. Probably should address both if possible.
Comment 1 by boliu@chromium.org
, Sep 23 2016