Reland "aw: Switch instrumentation shell to SurfaceView"
This is a reland of 012b87aa SetSurface is called when a surface is resized. On lollipop, destroying and recreating an egl surface for the same java surface fails, which then causes a CHECK failure. Instead, if the same Surface instance is set again, just skip native SetSurface. Original change's description: > aw: Switch instrumentation shell to SurfaceView > > Also refactor the fake draw_fn implementation. This is to prepare for > adding a vulkan draw_fn implementation. > > Split draw_fn implementation into: > allocator.cc/h: Controls functor data lifetime > context_manager: Effectively global. Responsible for owning the surface > and EGL context. Calls sync/draw/context_destroyed on > functor and responsible for owning the "impl reference" > to functor data. > > context_manager uses EGL bindings from ui/gl, but nothing else > to avoid conflicting with chromium side implementations, and to avoid > initializing a TaskRunner on render thread. Only GLES call is > glReadPixels after draw, which relies on chromium implementation not > releasing its bindings after draw. > > Refactor and simplify the java side by explicitly adding a thread to > post tasks and a WaitableEvent; this avoids saving state and using > a Lock object. > > Cq-Include-Trybots: luci.chromium.try:gpu-fyi-try-android-m-nexus-5x-64 > Bug: 1141687 > Change-Id: I71752b31f401fdb277062fe1347dfa826a20bb81 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587238 > Auto-Submit: Bo <boliu@chromium.org> > Commit-Queue: Jonathan Backer <backer@chromium.org> > Reviewed-by: Jonathan Backer <backer@chromium.org> > Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> > Cr-Commit-Position: refs/heads/master@{#837094} Bug: 1141687 Change-Id: I2af0a20201aba8156bfa7e9fec6ac37729f5ab55 Cq-Include-Trybots: luci.chromium.try:gpu-fyi-try-android-m-nexus-5x-64 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593878 Auto-Submit: Bo <boliu@chromium.org> Commit-Queue: Jonathan Backer <backer@chromium.org> Reviewed-by:Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by:
Jonathan Backer <backer@chromium.org> Cr-Commit-Position: refs/heads/master@{#837568}
Showing
Please register or sign in to comment