Reset texture bindings when unlocking discardable textures used by Skia

Before we unlock a discardable texture in CC, we tell Skia to flush
pending IO on the texture. However, this doesn't clear any outstanding
texture bindings involving this texture which Skia has created.
Unfortunately, the act of unlocking in CC does clear these bindings on
the GPU service side, leaving Skia's understanding of GL state incorrect.
This leads to errors if we quickly re-lock this texture and use it in
Skia, as Skia  will assume the texture is still bound, won't re-bind
it, and we'll hit an error when trying to draw.

This change resets Skia's texture bindings whenever we unlock textures,
preventing this scenario.

R=khushalsagar

Bug: 801769
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I4cdfa58b6696e95fb40fa7d48a8fec3f09e8398e
Reviewed-on: https://chromium-review.googlesource.com/866111
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529179}
1 file changed