Simplify OffscreenCanvasResourceProvider

There was a flickering bug with OffscreenCanvasResourceProvider::
SetTransferableResourceToSharedGPUContext(), probably due to
state tracking of the GL texture object. Instead of fixing it,
we can just use the nice pre-canned RAII model provided by
AcceleratedStaticBitmapImage.  This makes the code much simpler
and it fixes the glitch.

BUG=788439
TBR=xlai@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ifb19e96802c4ed1e41c8a01101066a0d7e3ab22a
Reviewed-on: https://chromium-review.googlesource.com/794108
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Olivia Lai <xlai@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520155}
3 files changed